SyoSil ApS UVM Scoreboard  1.0.3.0
cl_scbs_test_io_std_cc.svh
1 /// Simple IO compare with STD queue test. Testing the cl_syoscbs class
2 // using TLM hook up to monitors
3 
5  //-------------------------------------
6  // UVM Macros
7  //-------------------------------------
8  `uvm_component_utils(cl_scbs_test_io_std_cc)
9 
10  //-------------------------------------
11  // Constructor
12  //-------------------------------------
13  extern function new(string name = "cl_scbs_test_io_std_cc",
14  uvm_component parent = null);
15 
16  extern task run_phase(uvm_phase phase);
17  extern function void extract_phase(uvm_phase phase);
18 endclass : cl_scbs_test_io_std_cc
19 
20 function cl_scbs_test_io_std_cc::new(string name = "cl_scbs_test_io_std_cc",
21  uvm_component parent = null);
22  super.new(name, parent);
23 endfunction : new
24 
25 task cl_scbs_test_io_std_cc::run_phase(uvm_phase phase);
26  t_scb_compare_greed global_greed[];
27  int unsigned ws;
28 
29  phase.raise_objection(this);
30  super.run_phase(phase);
31 
32  // Generate random wait
33  ws = $urandom_range(1000, 90);
34 
35  `uvm_info("TEST", $sformatf("Waiting %0d time units", ws), UVM_NONE);
36 
37  // Do the wait
38  #(ws);
39 
40  `uvm_info("TEST", $sformatf("Wait done"), UVM_NONE);
41 
42  this.scbs_env.syoscbs.compare_control_all(1'b0);
43 
44  // Inserting a random error will return a miscompare if the end greedy is enabled
45  this.rnd_scb_insert();
46 
47  // Keeping the injection of the random insert, but disabling the drain in the extract phase.
48  global_greed[0] = pk_syoscb::SYOSCB_COMPARE_NOT_GREEDY;
49  this.scbs_env.syoscbs_cfg.set_scb_end_greediness(.idxs({}), .eg(global_greed));
50 
51  phase.drop_objection(this);
52 endtask: run_phase
53 
54 function void cl_scbs_test_io_std_cc::extract_phase(uvm_phase phase);
55  super.extract_phase(phase);
56 
57  this.scbs_env.syoscbs.flush_queues_all();
58 endfunction: extract_phase
Simple IO compare with standard queues using TLM based API.
Simple IO compare with STD queue test. Testing the cl_syoscbs class.

Project: SyoSil ApS UVM Scoreboard, Revision: 1.0.3.0

Copyright 2014-2022 SyoSil ApS
All Rights Reserved Worldwide

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
doxygen
Doxygen Version: 1.8.14
Generated with IDV SV Filter Version: 2.6.3
Fri Sep 2 2022 14:38:43
Find a documentation bug? Report bugs to: scoreboard@syosil.com