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