6 `uvm_component_utils(cl_scb_test_io_std_comparer_printer)
11 extern function new(string name = "cl_scb_test_io_std_comparer_printer",
12 uvm_component parent = null);
16 extern task run_phase(uvm_phase phase);
19 function cl_scb_test_io_std_comparer_printer::new(string name = "cl_scb_test_io_std_comparer_printer",
20 uvm_component parent = null);
21 super.new(name, parent);
24 task cl_scb_test_io_std_comparer_printer::run_phase(uvm_phase phase);
27 uvm_comparer comparer;
30 phase.raise_objection(this);
33 uvm_top = uvm_root::get();
34 uvm_top.set_report_severity_id_override(UVM_ERROR, "COMPARE_ERROR", UVM_INFO);
36 super.run_phase(phase);
38 this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_default_printer_verbosity(1'b1);
39 this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_default_enable_comparer_report(1'b1);
40 comparer = this.scb_env.syoscb_cfgs.syoscb_cfg[0].get_default_comparer();
42 this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_default_comparer(comparer);
45 item1 = cl_tb_seq_item::type_id::create("item1");
46 item1.use_data = 1'b1;
47 item1.min_data_size = 10;
48 item1.max_data_size = 10;
50 if(!item1.randomize()) begin
51 `uvm_fatal("TEST_ERROR", "Unable to randomize")
54 this.scb_env.syoscb[0].add_item("Q1", "P1", item1);
56 item2 = cl_tb_seq_item::type_id::create("item2");
57 item2.use_data = 1'b1;
58 item2.min_data_size = 10;
59 item2.max_data_size = 10;
61 if(!item2.randomize()) begin
62 `uvm_fatal("TEST_ERROR", "Unable to randomize")
65 this.scb_env.syoscb[0].add_item("Q2", "P1", item2);
67 this.scb_env.syoscb[0].flush_queues();
70 if(!item1.randomize() with {int_a == 2;}) begin
71 `uvm_fatal("TEST_ERROR", "Unable to randomize")
74 this.scb_env.syoscb[0].add_item("Q1", "P1", item1);
76 if(!item2.randomize() with {int_a == 2;}) begin
77 `uvm_fatal("TEST_ERROR", "Unable to randomize")
80 this.scb_env.syoscb[0].add_item("Q2", "P1", item2);
82 this.scb_env.syoscb[0].flush_queues();
85 item1.min_data_size = 100;
86 item1.max_data_size = 100;
88 if(!item1.randomize() with {int_a == 2;}) begin
89 `uvm_fatal("TEST_ERROR", "Unable to randomize")
92 this.scb_env.syoscb[0].add_item("Q1", "P1", item1);
94 $cast(item2, item1.clone());
95 item2.data[50] = item1.data[50]+1;
97 this.scb_env.syoscb[0].add_item("Q2", "P1", item2);
99 this.scb_env.syoscb[0].flush_queues();
101 phase.drop_objection(this);
Tests uvm_comparer and uvm_printer related features.
static void set_show_max(uvm_comparer comparer, int unsigned sm)
Sets the value of the show_max knob in the given comparer.