12 `uvm_component_utils_begin(cl_scb_test_iop_std_msw)
14 `uvm_component_utils_end
19 function new(string name = "cl_scb_test_iop_std_msw", uvm_component parent = null);
20 super.new(name, parent);
26 extern function void pre_build();
27 extern task run_phase(uvm_phase phase);
32 function void cl_scb_test_iop_std_msw::pre_build();
35 this.syoscb_cfgs.syoscb_cfg[0].set_compare_type(pk_syoscb::SYOSCB_COMPARE_IOP);
36 if(!this.syoscb_cfgs.syoscb_cfg[0].set_primary_queue("Q2")) begin
37 `uvm_fatal("cl_scb_test_iop_std_msw", "Unable to set primary queue")
39 endfunction: pre_build
41 task cl_scb_test_iop_std_msw::run_phase(uvm_phase phase);
44 cl_tb_seq_item ctsi1, ctsi2, ctsi3;
45 phase.raise_objection(this);
46 super.run_phase(phase);
48 ctsi1 = cl_tb_seq_item::type_id::create("ctsi1");
49 ctsi2 = cl_tb_seq_item::type_id::create("ctsi2");
50 ctsi3 = cl_tb_seq_item::type_id::create("ctsi3");
52 if(!ctsi1.randomize()) begin
53 `uvm_fatal("RAND", "Unable to randomize ctsi1")
56 if(!ctsi2.randomize()) begin
57 `uvm_fatal("RAND", "Unable to randomize ctsi2")
60 if(!ctsi3.randomize()) begin
61 `uvm_fatal("RAND", "Unable to randomize ctsi3")
71 this.scb_env.syoscb[0].add_item("Q1", "P1", ctsi1);
72 this.scb_env.syoscb[0].add_item("Q1", "P2", ctsi2);
74 this.scb_env.syoscb[0].add_item("Q2", "P3", ctsi3);
75 this.scb_env.syoscb[0].add_item("Q2", "P1", ctsi1);
77 if(!(this.scb_env.syoscb[0].get_total_cnt_add_items() == 4
78 && this.scb_env.syoscb[0].get_total_queue_size() == 2)) begin
79 `uvm_error("TEST", "Did not generate a match with ctsi1 in both queues");
82 this.scb_env.syoscb[0].add_item("Q1", "P3", ctsi3);
83 this.scb_env.syoscb[0].add_item("Q2", "P2", ctsi2);
86 phase.drop_objection(this);
This test ensures that IOP compares correctly search through the primary queue, comparing not only th...