SyoSil ApS UVM Scoreboard  1.0.3.0
cl_scb_test_ooo_std_dump_orphans_abort.svh
1 /// Tests queue and orphan dumping when an error occurs mid-simulation
2 /// This test fails on purpose, and is therefore not included in the regression tests
3 class cl_scb_test_ooo_std_dump_orphans_abort extends cl_scb_test_single_scb;
4 
5  //-------------------------------------
6  // UVM Macros
7  //-------------------------------------
8  `uvm_component_utils_begin(cl_scb_test_ooo_std_dump_orphans_abort)
9 
10  `uvm_component_utils_end
11 
12  //-------------------------------------
13  // Constructor
14  //-------------------------------------
15  function new(string name = "cl_scb_test_ooo_std_dump_orphans_abort", uvm_component parent = null);
16  super.new(name, parent);
17  endfunction: new
18 
19  //-------------------------------------
20  // Functions
21  //-------------------------------------
22  extern function void pre_build();
23  extern task run_phase(uvm_phase phase);
24 
25 
27 
28 function void cl_scb_test_ooo_std_dump_orphans_abort::pre_build();
29  super.pre_build();
30 
31  this.syoscb_cfgs.syoscb_cfg[0].set_compare_type(pk_syoscb::SYOSCB_COMPARE_OOO);
32  this.syoscb_cfgs.syoscb_cfg[0].set_dump_orphans_to_files(1'b1); //Print to file
33  this.syoscb_cfgs.syoscb_cfg[0].set_max_print_orphans(0); //Print all orphans (5 in Q1, 2 in Q2)
34  this.syoscb_cfgs.syoscb_cfg[0].set_full_scb_dump(1'b1); //Dump all entries
35  this.syoscb_cfgs.syoscb_cfg[0].set_full_scb_max_queue_size("Q1", 15); //Set queue size larger than input size
36  this.syoscb_cfgs.syoscb_cfg[0].set_full_scb_max_queue_size("Q2", 15); //Set queue size larger than input size
37  this.syoscb_cfgs.syoscb_cfg[0].set_full_scb_dump_type(pk_syoscb::XML);
38  this.syoscb_cfgs.syoscb_cfg[0].set_orphan_dump_type(pk_syoscb::XML);
39 
40 
41  this.syoscb_cfgs.syoscb_cfg[0].set_orphan_dump_file_name("abort");
42  this.syoscb_cfgs.syoscb_cfg[0].set_full_scb_dump_file_name("abort");
43 endfunction: pre_build
44 
45 task cl_scb_test_ooo_std_dump_orphans_abort::run_phase(uvm_phase phase);
46  phase.raise_objection(this);
47  super.run_phase(phase);
48 
49  //Add items
50  fork
51  for(int unsigned i=0; i<10; i++) begin
52  cl_tb_seq_item item1;
53  item1 = cl_tb_seq_item::type_id::create("item1");
54  item1.int_a = i;
55  this.scb_env.syoscb[0].add_item("Q1", "P1", item1);
56  end
57 
58  for(int unsigned i=0; i<5; i++) begin //Only match the first 5 items in Q1, leaving 5 orphans in Q1
59  cl_tb_seq_item item1;
60  item1 = cl_tb_seq_item::type_id::create("item1");
61  item1.int_a = i;
62  this.scb_env.syoscb[0].add_item("Q2", "P1", item1);
63  end
64 
65  for(int unsigned i=10; i<12; i++) begin //Add another 2 items to Q2 which will be orphaned
66  cl_tb_seq_item item1;
67  item1 = cl_tb_seq_item::type_id::create("item1");
68  item1.int_a = i;
69  this.scb_env.syoscb[0].add_item("Q2", "P1", item1);
70  end
71  join
72 
73  phase.drop_objection(this);
74 endtask: run_phase
Tests queue and orphan dumping when an error occurs mid-simulation This test fails on purpose...

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