SyoSil ApS UVM Scoreboard  1.0.3.0
cl_scb_test_io_std_dump_custom_printer.svh
1 // NOTE: This file contains a number of tests that showcase using queue/producer-specific printers when printing
2 // as well as performing queue overrides / using the xml printer supplied with the syoscb
3 
4 /// Sets custom printer overrides for Q1/P1 and Q2/P2. The remaining queues will use the default printer.
5 // Dump everything into the same file
7  //-------------------------------------
8  // UVM Macros
9  //-------------------------------------
10  `uvm_component_utils(cl_scb_test_io_std_dump_simple)
11 
12  //-------------------------------------
13  // Functions
14  //-------------------------------------
15  extern function new(string name = "cl_scb_test_io_std_dump_simple", uvm_component parent = null);
16  extern function void check_phase(uvm_phase phase);
18 
19 function cl_scb_test_io_std_dump_simple::new(string name = "cl_scb_test_io_std_dump_simple",
20  uvm_component parent = null);
21  super.new(name, parent);
22 endfunction: new
23 
24 function void cl_scb_test_io_std_dump_simple::check_phase(uvm_phase phase);
25  uvm_tree_printer q1p1;
26  uvm_line_printer q2p2;
27 
28  super.check_phase(phase);
29 
30  q1p1 = new;
31  q2p2 = new;
32 
33  this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_full_scb_dump(1'b1);
34  this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_full_scb_dump_type(pk_syoscb::TXT);
35  void'(this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_full_scb_dump_split(1'b0));
36  this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_full_scb_dump_file_name("simple");
37  this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_printer(q1p1, '{"Q1"}, '{"P1"});
38  this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_printer(q2p2, '{"Q2"}, '{"P2"});
39 endfunction: check_phase
40 
41 /// Sets the default printer override. Since no specific printers are set, all queues rely on the default printer.
42 // Dumps everything into the same file
44  //-------------------------------------
45  // UVM Macros
46  //-------------------------------------
47  `uvm_component_utils(cl_scb_test_io_std_dump_default)
48 
49  //-------------------------------------
50  // Constructor
51  //-------------------------------------
52  extern function new(string name = "cl_scb_test_io_std_dump_default", uvm_component parent = null);
53 
54  //-------------------------------------
55  // Functions
56  //-------------------------------------
57  extern function void check_phase(uvm_phase phase);
59 
60 function cl_scb_test_io_std_dump_default::new(string name = "cl_scb_test_io_std_dump_default", uvm_component parent = null);
61  super.new(name, parent);
62 endfunction: new
63 
64 
65 function void cl_scb_test_io_std_dump_default::check_phase(uvm_phase phase);
66  uvm_tree_printer default_printer;
67 
68  super.check_phase(phase);
69 
70  default_printer = new;
71 
72  this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_full_scb_dump(1'b1);
73  this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_full_scb_dump_type(pk_syoscb::TXT);
74  void'(this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_full_scb_dump_split(1'b0));
75  this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_full_scb_dump_file_name("default");
76  this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_default_printer(default_printer);
77 endfunction: check_phase
78 
79 /// Sets the default printer override as well as specific printer overrides.
80 // Dumps into separate files for each queue
82  //-------------------------------------
83  // UVM Macros
84  //-------------------------------------
85  `uvm_component_utils(cl_scb_test_io_std_dump_mixed)
86 
87  //-------------------------------------
88  // Constructor
89  //-------------------------------------
90  extern function new(string name = "cl_scb_test_io_std_dump_mixed", uvm_component parent = null);
91 
92  //-------------------------------------
93  // Functions
94  //-------------------------------------
95  extern function void check_phase(uvm_phase phase);
97 
98 function cl_scb_test_io_std_dump_mixed::new(string name = "cl_scb_test_io_std_dump_mixed", uvm_component parent = null);
99  super.new(name, parent);
100 endfunction: new
101 
102 function void cl_scb_test_io_std_dump_mixed::check_phase(uvm_phase phase);
103  uvm_tree_printer q1p1;
104  uvm_line_printer q2p2;
105  uvm_table_printer default_printer;
106 
107  super.check_phase(phase);
108 
109  q1p1 = new;
110  q2p2 = new;
111  default_printer = new;
112 
113  this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_full_scb_dump(1'b1);
114  this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_full_scb_dump_type(pk_syoscb::TXT);
115  void'(this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_full_scb_dump_split(1'b1));
116  this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_full_scb_dump_file_name("mixed");
117  this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_printer(q1p1, '{"Q1"}, '{"P1"});
118  this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_printer(q2p2, '{"Q2"}, '{"P2"});
119  this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_default_printer(default_printer);
120 endfunction: check_phase
121 
122 /// Uses XML/split printing to generate multiple XML files once the test is finished.
124  //-------------------------------------
125  // Non randomizable variables
126  //-------------------------------------
127 
128 
129  //-------------------------------------
130  // UVM Macros
131  //-------------------------------------
132  `uvm_component_utils_begin(cl_scb_test_io_std_dump_xml_split)
133 
134  `uvm_component_utils_end
135 
136  //-------------------------------------
137  // Constructor
138  //-------------------------------------
139  function new(string name = "cl_scb_test_io_std_dump_xml_split", uvm_component parent = null);
140  super.new(name, parent);
141  endfunction: new
142 
143  //-------------------------------------
144  // Functions
145  //-------------------------------------
146  extern virtual function void check_phase(uvm_phase phase);
147 
148 
150 
151 function void cl_scb_test_io_std_dump_xml_split::check_phase(uvm_phase phase);
152  this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_full_scb_dump_type(pk_syoscb::XML);
153  void'(this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_full_scb_dump_split(1'b1));
154  this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_full_scb_dump_file_name("xml_split");
155 endfunction: check_phase
156 
157 /// Uses XML/join printing to generate a single XML file once the test is finished.
159  //-------------------------------------
160  // Non randomizable variables
161  //-------------------------------------
162 
163 
164  //-------------------------------------
165  // UVM Macros
166  //-------------------------------------
167  `uvm_component_utils_begin(cl_scb_test_io_std_dump_xml_join)
168 
169  `uvm_component_utils_end
170 
171  //-------------------------------------
172  // Constructor
173  //-------------------------------------
174  function new(string name = "cl_scb_test_io_std_dump_xml_join", uvm_component parent = null);
175  super.new(name, parent);
176  endfunction: new
177 
178  //-------------------------------------
179  // Functions
180  //-------------------------------------
181  extern virtual function void check_phase(uvm_phase phase);
182 
184 
185 function void cl_scb_test_io_std_dump_xml_join::check_phase(uvm_phase phase);
186  this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_full_scb_dump_type(pk_syoscb::XML);
187  void'(this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_full_scb_dump_split(1'b0));
188  this.scb_env.syoscb_cfgs.syoscb_cfg[0].set_full_scb_dump_file_name("xml_join");
189 endfunction: check_phase
Sets the default printer override. Since no specific printers are set, all queues rely on the default...
Sets the default printer override as well as specific printer overrides.
Uses XML/join printing to generate a single XML file once the test is finished.
SCB dump test using the function based API.
Sets custom printer overrides for Q1/P1 and Q2/P2. The remaining queues will use the default printer...
Uses XML/split printing to generate multiple XML files once the test is finished. ...

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