SyoSil ApS UVM Scoreboard  1.0.3.0
cl_scb_test_io_std_disable_compare.svh
1 /// Tests the ability to flush queues and disable compare during runtime for std queues.
2 
3 class cl_scb_test_io_std_disable_compare extends cl_scb_test_single_scb;
4  //-------------------------------------
5  // UVM Macros
6  //-------------------------------------
7  `uvm_component_utils(cl_scb_test_io_std_disable_compare)
8 
9  //-------------------------------------
10  // Constructor
11  //-------------------------------------
12  extern function new(string name = "cl_scb_test_io_std_disable_compare",
13  uvm_component parent = null);
14  //-------------------------------------
15  // UVM Phase methods
16  //-------------------------------------
17  extern task run_phase(uvm_phase phase);
19 
20 function cl_scb_test_io_std_disable_compare::new(string name = "cl_scb_test_io_std_disable_compare",
21  uvm_component parent = null);
22  super.new(name, parent);
23 endfunction : new
24 
25 task cl_scb_test_io_std_disable_compare::run_phase(uvm_phase phase);
26  phase.raise_objection(this);
27 
28  super.run_phase(phase);
29 
30  fork
31  for(int unsigned i=0; i<10; i++) begin
32  cl_tb_seq_item item1;
33  item1 = cl_tb_seq_item::type_id::create("item1");
34  item1.int_a = i;
35  scb_env.syoscb[0].add_item("Q1", "P1", item1);
36  end
37 
38  for(int unsigned i=0; i<10; i++) begin
39  cl_tb_seq_item item1;
40  item1 = cl_tb_seq_item::type_id::create("item1");
41  item1.int_a = i;
42  scb_env.syoscb[0].add_item("Q2", "P1", item1);
43  end
44  join
45 
46  if(!scb_env.syoscb[0].empty_queues()) begin
47  `uvm_error("TEST_ERROR", "All queues not empty 1st time around!");
48  end
49 
50  scb_env.syoscb[0].compare_control(1'b0);
51 
52  fork
53  for(int unsigned i=0; i<8; i++) begin
54  cl_tb_seq_item item1;
55  item1 = cl_tb_seq_item::type_id::create("item1");
56  item1.int_a = i;
57  scb_env.syoscb[0].add_item("Q1", "P1", item1);
58  end
59 
60  for(int unsigned i=0; i<7; i++) begin
61  cl_tb_seq_item item1;
62  item1 = cl_tb_seq_item::type_id::create("item1");
63  item1.int_a = i+1000;
64  scb_env.syoscb[0].add_item("Q2", "P1", item1);
65  end
66  join
67 
68  scb_env.syoscb[0].flush_queues();
69 
70  if(!scb_env.syoscb[0].empty_queues()) begin
71  `uvm_error("TEST_ERROR", "All queues not empty 2nd time around!");
72  end
73 
74  scb_env.syoscb[0].compare_control(1'b1);
75 
76  fork
77  for(int unsigned i=0; i<10; i++) begin
78  cl_tb_seq_item item1;
79  item1 = cl_tb_seq_item::type_id::create("item1");
80  item1.int_a = i;
81  scb_env.syoscb[0].add_item("Q1", "P1", item1);
82  end
83 
84  for(int unsigned i=0; i<10; i++) begin
85  cl_tb_seq_item item1;
86  item1 = cl_tb_seq_item::type_id::create("item1");
87  item1.int_a = i;
88  scb_env.syoscb[0].add_item("Q2", "P1", item1);
89  end
90  join
91 
92  phase.drop_objection(this);
93 endtask: run_phase
Tests the ability to flush queues and disable compare during runtime for std queues.

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:37:01
Find a documentation bug? Report bugs to: scoreboard@syosil.com