SyoSil ApS UVM Scoreboard  1.0.3.0
cl_scb_test_io_md5_disable_compare.svh
1 /// Tests the ability to flush queues and disable compare during runtime for md5 hashed queues.
2 
3 class cl_scb_test_io_md5_disable_compare extends cl_scb_test_single_scb;
4  //-------------------------------------
5  // UVM Macros
6  //-------------------------------------
7  `uvm_component_utils(cl_scb_test_io_md5_disable_compare)
8 
9  //-------------------------------------
10  // Constructor
11  //-------------------------------------
12  extern function new(string name = "cl_scb_test_io_md5_disable_compare",
13  uvm_component parent = null);
14  extern virtual function void pre_build();
15  //-------------------------------------
16  // UVM Phase methods
17  //-------------------------------------
18  extern task run_phase(uvm_phase phase);
20 
21 function cl_scb_test_io_md5_disable_compare::new(string name = "cl_scb_test_io_md5_disable_compare",
22  uvm_component parent = null);
23  super.new(name, parent);
24 endfunction : new
25 
26 function void cl_scb_test_io_md5_disable_compare::pre_build();
27  super.pre_build();
28 
29  this.syoscb_cfgs.syoscb_cfg[0].set_queue_type(pk_syoscb::SYOSCB_QUEUE_MD5);
30 endfunction : pre_build
31 
32 task cl_scb_test_io_md5_disable_compare::run_phase(uvm_phase phase);
33  phase.raise_objection(this);
34 
35  super.run_phase(phase);
36 
37  fork
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("Q1", "P1", item1);
43  end
44 
45  for(int unsigned i=0; i<10; i++) begin
46  cl_tb_seq_item item1;
47  item1 = cl_tb_seq_item::type_id::create("item1");
48  item1.int_a = i;
49  scb_env.syoscb[0].add_item("Q2", "P1", item1);
50  end
51  join
52 
53  if(!scb_env.syoscb[0].empty_queues()) begin
54  `uvm_error("TEST_ERROR", "All queues not empty 1st time around!");
55  end
56 
57  scb_env.syoscb[0].compare_control(1'b0);
58 
59  fork
60  for(int unsigned i=0; i<8; i++) begin
61  cl_tb_seq_item item1;
62  item1 = cl_tb_seq_item::type_id::create("item1");
63  item1.int_a = i;
64  scb_env.syoscb[0].add_item("Q1", "P1", item1);
65  end
66 
67  for(int unsigned i=0; i<7; i++) begin
68  cl_tb_seq_item item1;
69  item1 = cl_tb_seq_item::type_id::create("item1");
70  item1.int_a = i+1000;
71  scb_env.syoscb[0].add_item("Q2", "P1", item1);
72  end
73  join
74 
75  scb_env.syoscb[0].flush_queues();
76 
77  if(!scb_env.syoscb[0].empty_queues()) begin
78  `uvm_error("TEST_ERROR", "All queues not empty 2nd time around!");
79  end
80 
81  scb_env.syoscb[0].compare_control(1'b1);
82 
83  fork
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("Q1", "P1", item1);
89  end
90 
91  for(int unsigned i=0; i<10; i++) begin
92  cl_tb_seq_item item1;
93  item1 = cl_tb_seq_item::type_id::create("item1");
94  item1.int_a = i;
95  scb_env.syoscb[0].add_item("Q2", "P1", item1);
96  end
97  join
98 
99  phase.drop_objection(this);
100 endtask: run_phase
Tests the ability to flush queues and disable compare during runtime for md5 hashed 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:36:54
Find a documentation bug? Report bugs to: scoreboard@syosil.com