SyoSil ApS UVM Scoreboard  1.0.3.0
cl_scb_test_ooo_io_md5_simple.svh
1 /// Simple test with two SCBs with different compares, both using MD5 queues
2 
4  //-------------------------------------
5  // UVM Macros
6  //-------------------------------------
7  `uvm_component_utils(cl_scb_test_ooo_io_md5_simple)
8 
9  //-------------------------------------
10  // Constructor
11  //-------------------------------------
12  extern function new(string name = "cl_scb_test_ooo_io_md5_simple", uvm_component parent = null);
13  extern virtual function void pre_build();
14 
15  //-------------------------------------
16  // UVM Phase methods
17  //-------------------------------------
18  extern task run_phase(uvm_phase phase);
20 
21 function cl_scb_test_ooo_io_md5_simple::new(string name = "cl_scb_test_ooo_io_md5_simple",
22  uvm_component parent = null);
23  super.new(name, parent);
24 endfunction : new
25 
26 function void cl_scb_test_ooo_io_md5_simple::pre_build();
27  super.pre_build();
28 
29  // Both scbs runs with MD5 queues
30  this.syoscb_cfgs.syoscb_cfg[0].set_queue_type(pk_syoscb::SYOSCB_QUEUE_MD5);
31  this.syoscb_cfgs.syoscb_cfg[1].set_queue_type(pk_syoscb::SYOSCB_QUEUE_MD5);
32 
33  // syoscb0 runs with the OOO compare
34  this.syoscb_cfgs.syoscb_cfg[0].set_compare_type(pk_syoscb::SYOSCB_COMPARE_OOO);
35 
36  // syoscb1 runs with the IO compare
37  this.syoscb_cfgs.syoscb_cfg[1].set_compare_type(pk_syoscb::SYOSCB_COMPARE_IO);
38 endfunction : pre_build
39 
40 task cl_scb_test_ooo_io_md5_simple::run_phase(uvm_phase phase);
41  phase.raise_objection(this);
42 
43  super.run_phase(phase);
44 
45  fork
46  // Insert items in Q1 as P1 with int_a from 0 to 9
47  // in both syoscb[0] and syoscb[1]
48  for(int unsigned i=0; i<10; i++) begin
49  cl_tb_seq_item item1;
50  item1 = cl_tb_seq_item::type_id::create("item1");
51  item1.int_a = i;
52  scb_env.syoscb[0].add_item("Q1", "P1", item1);
53  scb_env.syoscb[1].add_item("Q1", "P1", item1);
54  end
55 
56  // Insert items in Q2 as P1 with int_a from 9 to 0
57  // but only in syoscb[0] as it runs with an OOO compare
58  for(int i=9; i>=0; i--) begin
59  cl_tb_seq_item item1;
60  item1 = cl_tb_seq_item::type_id::create("item1");
61  item1.int_a = i;
62  scb_env.syoscb[0].add_item("Q2", "P1", item1);
63  end
64 
65  // Insert items in Q2 as P1 with int_a from 0 to 9
66  // but only in syoscb[1] as it runs with an IO compare
67  for(int i=0; i<10; i++) begin
68  cl_tb_seq_item item1;
69  item1 = cl_tb_seq_item::type_id::create("item1");
70  item1.int_a = i;
71  scb_env.syoscb[1].add_item("Q2", "P1", item1);
72  end
73  join
74 
75  phase.drop_objection(this);
76 endtask: run_phase
Base class for all SCB tests usings two scoreboards.
Simple test with two SCBs with different compares, both using MD5 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:51
Find a documentation bug? Report bugs to: scoreboard@syosil.com