SyoSil ApS UVM Scoreboard  1.0.3.0
cl_scb_test_cmp_io.svh
1 /// Base class for specializations of cl_scb_test_cmp_base using IO compare.
2 /// Implementations are provided below using typedefs
3 /// \param ATYPE Type of the top-level objects to instantiate
4 /// \param suffix A string suffix to add to the nest name
5 class cl_scb_test_cmp_io#(type ATYPE = cl_tb_cmp_a_f_seq_item#(cl_tb_cmp_b_f_seq_item#(cl_tb_seq_item)),
6  string suffix = "") extends cl_scb_test_cmp_base#(ATYPE);
7 
8  //Since this is a parameterized test which we wish to run directly, we can't use the uvm factory macros
9  //https://forums.accellera.org/topic/730-running-a-parameterized-test/
10  typedef uvm_component_registry #(cl_scb_test_cmp_io#(ATYPE, suffix), $sformatf("cl_scb_test_cmp_io_%s", suffix)) type_id;
11 
12  static function type_id get_type();
13  return type_id::get();
14  endfunction
15 
16  virtual function uvm_object_wrapper get_object_type();
17  return type_id::get();
18  endfunction
19 
20  //-------------------------------------
21  // Constructor
22  //-------------------------------------
23  extern function new(string name = "cl_scb_test_cmp_io", uvm_component parent = null);
24 
25  extern virtual function void check_phase(uvm_phase phase);
26 
27 endclass: cl_scb_test_cmp_io
28 
29 function cl_scb_test_cmp_io::new(string name = "cl_scb_test_cmp_io", uvm_component parent = null);
30  super.new(name, parent);
31 endfunction
32 
33 function void cl_scb_test_cmp_io::check_phase(uvm_phase phase);
34  uvm_report_server rs;
35  int num_cmp_err;
36  super.check_phase(phase);
37 
38  //We expect exactly 7 errors to have occured
39  rs = uvm_report_server::get_server();
40  num_cmp_err = rs.get_id_count("COMPARE_ERROR");
41 
42  if(num_cmp_err != 7) begin
43  `uvm_error("TEST", $sformatf("Number of COMPARE_ERRORs was not 1 as expected. Got %0d COMPARE_ERROR instead", num_cmp_err))
44  end
45 endfunction: check_phase
46 
47 // Specializations: The suffix <xy> indicates which comparison method is used in a/b respectively:
48 // f: field macros. d: manual do_compare implementation. m: mix of field macros and manual do_compare implementation
51 
54 
57 
60 
63 
66 
69 
72 
75 
76 
An "a" type item which used a mix of do_compare implementation and field macros.
A "b" type item which used a mix of do_compare implementation and field macros.
Base class for specializations of cl_scb_test_cmp_base using IO compare.
Base class for field macro/manual do_compare comparison tests.
A "b" type item which used a manual do_compare implementation instead of field macros.
An "a" type item which used a manual do_compare implementation instead of field macros.
A "b" type item which used a field macros instead of manually implementing do_compare.
An "a" type item which used a field macros instead of manually implementing do_compare.

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