SyoSil ApS UVM Scoreboard  1.0.3.0
cl_scb_test_ooo_std_gp.svh
1 /// Simple OOO compare test for TLM generic payload using the function based API
2 
3 class cl_scb_test_ooo_std_gp extends cl_scb_test_single_scb;
4  //-------------------------------------
5  // UVM Macros
6  //-------------------------------------
7  `uvm_component_utils(cl_scb_test_ooo_std_gp)
8 
9  //-------------------------------------
10  // Constructor
11  //-------------------------------------
12  extern function new(string name = "cl_scb_test_ooo_std_gp", uvm_component parent = null);
13  extern virtual function void pre_build();
14  //-------------------------------------
15  // UVM Phase methods
16  //-------------------------------------
17  extern task run_phase(uvm_phase phase);
18 endclass : cl_scb_test_ooo_std_gp
19 
20 function cl_scb_test_ooo_std_gp::new(string name = "cl_scb_test_ooo_std_gp",
21  uvm_component parent = null);
22  super.new(name, parent);
23 endfunction : new
24 
25 function void cl_scb_test_ooo_std_gp::pre_build();
26  super.pre_build();
27 
28  this.syoscb_cfgs.syoscb_cfg[0].set_compare_type(pk_syoscb::SYOSCB_COMPARE_OOO);
29 endfunction : pre_build
30 
31 task cl_scb_test_ooo_std_gp::run_phase(uvm_phase phase);
32  phase.raise_objection(this);
33 
34  super.run_phase(phase);
35 
36  begin
37  uvm_tlm_generic_payload gp;
38 
39  // Create
40  gp = uvm_tlm_generic_payload::type_id::create("gp0");
41 
42  // Command
43  gp.set_write();
44 
45  // Address
46  gp.set_address(64'h0);
47 
48  // Data
49  begin
50  byte unsigned gp_data[];
51 
52  gp_data = new[4];
53 
54  gp_data[0] = 8'h0;
55  gp_data[1] = 8'h1;
56  gp_data[2] = 8'h2;
57  gp_data[3] = 8'h3;
58 
59  gp.set_data_length(4);
60  gp.set_data(gp_data);
61  end
62 
63  // Byte enable
64  begin
65  byte unsigned gp_be[];
66 
67  gp_be = new[4];
68 
69  gp_be[0] = 8'hff;
70  gp_be[1] = 8'hff;
71  gp_be[2] = 8'hff;
72  gp_be[3] = 8'hff;
73 
74  gp.set_byte_enable_length(4);
75  gp.set_byte_enable(gp_be);
76  end
77 
78  // Status
79  gp.set_response_status(UVM_TLM_OK_RESPONSE);
80 
81  gp.print();
82 
83  scb_env.syoscb[0].add_item("Q1", "P1", gp);
84  end
85 
86  begin
87  uvm_tlm_generic_payload gp;
88 
89  // Create
90  gp = uvm_tlm_generic_payload::type_id::create("gp1");
91 
92  // Command
93  gp.set_write();
94 
95  // Address
96  gp.set_address(64'h0);
97 
98  // Data
99  begin
100  byte unsigned gp_data[];
101 
102  gp_data = new[4];
103 
104  gp_data[0] = 8'h0;
105  gp_data[1] = 8'h1;
106  gp_data[2] = 8'h2;
107  gp_data[3] = 8'h3;
108 
109  gp.set_data_length(4);
110  gp.set_data(gp_data);
111  end
112 
113  // Byte enable
114  begin
115  byte unsigned gp_be[];
116 
117  gp_be = new[4];
118 
119  gp_be[0] = 8'hff;
120  gp_be[1] = 8'hff;
121  gp_be[2] = 8'hff;
122  gp_be[3] = 8'hff;
123 
124  gp.set_byte_enable_length(4);
125  gp.set_byte_enable(gp_be);
126  end
127 
128  // Status
129  gp.set_response_status(UVM_TLM_OK_RESPONSE);
130 
131  gp.print();
132 
133  scb_env.syoscb[0].add_item("Q2", "P1", gp);
134  end
135 
136  phase.drop_objection(this);
137 endtask: run_phase
Simple OOO compare test for TLM generic payload using the function based API.

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