7 `uvm_component_utils(cl_scb_test_io_std_comparer_report)
12 extern function new(string name = "cl_scb_test_io_std_comparer_report",
13 uvm_component parent = null);
18 extern task run_phase(uvm_phase phase);
21 task add_match(string producer);
25 for(int i=0; i<2; i++) begin
26 item1 = cl_tb_seq_item::type_id::create("item1");
28 this.scb_env.syoscb[0].add_item("Q1", producer, item1);
30 for(int i=0; i<2; i++) begin
31 item2 = cl_tb_seq_item::type_id::create("item2");
33 this.scb_env.syoscb[0].add_item("Q2", producer, item2);
39 task add_nomatch(string producer);
44 item1 = cl_tb_seq_item::type_id::create("item1");
46 this.scb_env.syoscb[0].add_item("Q1", producer, item1);
49 item2 = cl_tb_seq_item::type_id::create("item2");
51 this.scb_env.syoscb[0].add_item("Q2", producer, item2);
55 endclass: cl_scb_test_io_std_comparer_report
57 function cl_scb_test_io_std_comparer_report::new(string name = "cl_scb_test_io_std_comparer_report",
58 uvm_component parent = null);
59 super.new(name, parent);
62 task cl_scb_test_io_std_comparer_report::run_phase(uvm_phase phase);
63 uvm_comparer q2p1, q2p2;
65 phase.raise_objection(this);
67 super.run_phase(phase);
70 uvm_root::get().set_report_severity_id_override(UVM_ERROR, "COMPARE_ERROR", UVM_INFO);
75 this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_enable_comparer_report(1'b0, '{"Q2"}, {"P1"});
76 this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_enable_comparer_report(1'b1, '{"Q2"}, {"P2"});
78 cl_syoscb_comparer_config::set_verbosity(q2p1, UVM_HIGH);
79 cl_syoscb_comparer_config::set_verbosity(q2p2, UVM_HIGH);
81 this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_comparer(q2p1, '{"Q2"}, '{"P1"});
82 this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_comparer(q2p2, '{"Q2"}, '{"P2"});
89 this.scb_env.syoscb[0].flush_queues();
95 this.scb_env.syoscb[0].flush_queues();
96 phase.drop_objection(this);
Illustrates how to use queue/producer-specific comparers instead of a default comparer.