6 type MON = cl_tb_tlm_monitor#(cl_tb_seq_item),
11 cl_tb_env_scbs#(FIN, MON, FT) scbs_env;
23 extern function new(
string name =
"cl_scbs_test_base", uvm_component parent = null);
24 extern virtual function void pre_build();
25 extern virtual task rnd_scb_insert();
30 extern virtual function void build_phase(uvm_phase phase);
34 function cl_scbs_test_base::new(
string name =
"cl_scbs_test_base", uvm_component parent = null);
35 super.new(name, parent);
38 function void cl_scbs_test_base::build_phase(uvm_phase phase);
41 super.build_phase(phase);
43 this.scbs_env = cl_tb_env_scbs#(FIN, MON, FT)::type_id::create(
"scbs_env",
this);
44 endfunction: build_phase
46 function void cl_scbs_test_base::pre_build();
47 this.scbs_cfg = cl_syoscbs_cfg::type_id::create(
"scbs_cfg");
64 this.scbs_cfg.init(
"myscbs", NO_OF_SCBS, {}, {}, {});
65 for(
int i=0; i<NO_OF_SCBS; i++) begin
67 cfg.set_compare_type(pk_syoscb::SYOSCB_COMPARE_IO);
68 cfg.set_queue_type(pk_syoscb::SYOSCB_QUEUE_STD);
69 this.scbs_cfg.set_cfg(cfg, i);
74 "cfg", this.scbs_cfg);
78 cl_syoscbs_base::type_id::set_type_override(
cl_syoscbs#(FIN)::get_type());
79 endfunction: pre_build
81 task cl_scbs_test_base::rnd_scb_insert();
82 int unsigned item_cnt;
85 repeat ($urandom_range(100, 1)) begin
92 ws = $urandom_range(100, 10);
94 `uvm_info("TEST", $sformatf("[%0d]: Waiting %0d time units",
95 item_cnt, ws), UVM_NONE);
100 `uvm_info(
"TEST", $sformatf(
"[%0d]: Wait done", item_cnt), UVM_NONE);
103 scb_idx = $urandom_range(this.scbs_env.syoscbs_cfg.get_no_scbs()-1, 0);
106 scb = this.scbs_env.syoscbs.get_scb(scb_idx);
108 item = cl_tb_seq_item::type_id::create($sformatf(
"scb[%0d]-item[%0d]", scb_idx, item_cnt));
110 if(!item.randomize()) begin
111 `uvm_fatal(
"TEST_ERROR",
"Unable to randomize")
114 scb.add_item(((item_cnt % 2) == 0) ?
"Q1" :
"Q2",
"P1", item);
116 endtask: rnd_scb_insert
Base class for all SCBs tests.
Top level class implementing the root of the SyoSil UVM scoreboard.
Configuration object for the cl_syoscbs_base scoreboard wrapper.
Default implementation of a scoreboard wrapper.
Configuration class for the SyoSil UVM scoreboard.
Base class for a filter transformation.