1 |
2 |
acastong |
//main.cpp for reordering_l2 testbench
|
2 |
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
3 |
|
|
* Version: MPL 1.1
|
4 |
|
|
*
|
5 |
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
6 |
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
7 |
|
|
* the License. You may obtain a copy of the License at
|
8 |
|
|
* http://www.mozilla.org/MPL/
|
9 |
|
|
*
|
10 |
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
11 |
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
12 |
|
|
* for the specific language governing rights and limitations under the
|
13 |
|
|
* License.
|
14 |
|
|
*
|
15 |
|
|
* The Original Code is HyperTransport Tunnel IP Core.
|
16 |
|
|
*
|
17 |
|
|
* The Initial Developer of the Original Code is
|
18 |
|
|
* Ecole Polytechnique de Montreal.
|
19 |
|
|
* Portions created by the Initial Developer are Copyright (C) 2005
|
20 |
|
|
* the Initial Developer. All Rights Reserved.
|
21 |
|
|
*
|
22 |
|
|
* Contributor(s):
|
23 |
|
|
* Ami Castonguay <acastong@grm.polymtl.ca>
|
24 |
|
|
*
|
25 |
|
|
* Alternatively, the contents of this file may be used under the terms
|
26 |
|
|
* of the Polytechnique HyperTransport Tunnel IP Core Source Code License
|
27 |
|
|
* (the "PHTICSCL License", see the file PHTICSCL.txt), in which case the
|
28 |
|
|
* provisions of PHTICSCL License are applicable instead of those
|
29 |
|
|
* above. If you wish to allow use of your version of this file only
|
30 |
|
|
* under the terms of the PHTICSCL License and not to allow others to use
|
31 |
|
|
* your version of this file under the MPL, indicate your decision by
|
32 |
|
|
* deleting the provisions above and replace them with the notice and
|
33 |
|
|
* other provisions required by the PHTICSCL License. If you do not delete
|
34 |
|
|
* the provisions above, a recipient may use your version of this file
|
35 |
|
|
* under either the MPL or the PHTICSCL License."
|
36 |
|
|
*
|
37 |
|
|
* ***** END LICENSE BLOCK ***** */
|
38 |
|
|
|
39 |
|
|
#include "../../rtl/systemc/core_synth/synth_datatypes.h"
|
40 |
|
|
#include "../../rtl/systemc/core_synth/constants.h"
|
41 |
|
|
|
42 |
|
|
#include "../../rtl/systemc/reordering_l2/reordering_l2.h"
|
43 |
|
|
#include "../../rtl/systemc/reordering_l2/posted_vc_l3.h"
|
44 |
|
|
#include "../../rtl/systemc/reordering_l2/response_vc_l3.h"
|
45 |
|
|
#include "../../rtl/systemc/reordering_l2/nposted_vc_l3.h"
|
46 |
|
|
#include "../../rtl/systemc/reordering_l2/nophandler_l3.h"
|
47 |
|
|
#include "../../rtl/systemc/reordering_l2/final_reordering_l3.h"
|
48 |
|
|
#include "../../rtl/systemc/reordering_l2/address_manager_l3.h"
|
49 |
|
|
|
50 |
|
|
#include "reordering_l2_tb.h"
|
51 |
|
|
|
52 |
|
|
#include <iostream>
|
53 |
|
|
#include <string>
|
54 |
|
|
#include <sstream>
|
55 |
|
|
#include <iomanip>
|
56 |
|
|
|
57 |
|
|
using namespace std;
|
58 |
|
|
|
59 |
|
|
int sc_main( int argc, char* argv[] ){
|
60 |
|
|
|
61 |
|
|
//The Design Under Test
|
62 |
|
|
reordering_l2* dut = new reordering_l2("reordering_l2");
|
63 |
|
|
//The TestBench
|
64 |
|
|
reordering_l2_tb* tb = new reordering_l2_tb("reordering_l2_tb");
|
65 |
|
|
|
66 |
|
|
|
67 |
|
|
//Signals used to link the design to the testbench
|
68 |
|
|
sc_clock clk("clk", 1); // system clk
|
69 |
|
|
sc_signal<bool> resetx;
|
70 |
|
|
sc_signal<syn_ControlPacketComplete> ro_packet_csr;
|
71 |
|
|
sc_signal<syn_ControlPacketComplete> ro_packet_ui;
|
72 |
|
|
sc_signal<syn_ControlPacketComplete> ro_packet_fwd;
|
73 |
|
|
sc_signal<VirtualChannel> ro_packet_vc_fwd;
|
74 |
|
|
|
75 |
|
|
sc_signal<bool> ro_available_csr;
|
76 |
|
|
sc_signal<bool> ro_available_ui;
|
77 |
|
|
sc_signal<bool> ro_available_fwd;
|
78 |
|
|
|
79 |
|
|
sc_signal<bool> csr_ack_ro;
|
80 |
|
|
sc_signal<bool> ui_ack_ro;
|
81 |
|
|
sc_signal<bool> fwd_ack_ro;
|
82 |
|
|
|
83 |
|
|
sc_signal<bool> eh_ack_ro;
|
84 |
|
|
sc_signal<bool> fc_nop_sent;
|
85 |
|
|
sc_signal<syn_ControlPacketComplete> cd_packet_ro;
|
86 |
|
|
sc_signal<bool> cd_available_ro;
|
87 |
|
|
sc_signal<bool> cd_data_pending_ro;
|
88 |
|
|
sc_signal<sc_uint<BUFFERS_ADDRESS_WIDTH> > cd_data_pending_addr_ro;
|
89 |
|
|
sc_signal<sc_bv<5> > csr_unit_id;
|
90 |
|
|
sc_signal<sc_bv<40> > csr_bar[NbRegsBars];
|
91 |
|
|
sc_signal<bool> csr_memory_space_enable;
|
92 |
|
|
sc_signal<bool> csr_io_space_enable;
|
93 |
|
|
sc_signal<sc_bv<32> > csr_direct_route_enable;
|
94 |
|
|
sc_signal<sc_bv<5> > clumped_unit_id[32];
|
95 |
|
|
sc_signal<bool> csr_sync;
|
96 |
|
|
|
97 |
|
|
#ifdef ENABLE_REORDERING
|
98 |
|
|
sc_signal<bool> csr_unitid_reorder_disable;
|
99 |
|
|
#endif
|
100 |
|
|
sc_signal<sc_bv <6> > fwd_next_node_buffer_status_ro;
|
101 |
|
|
|
102 |
|
|
sc_signal<sc_bv <6> > ro_buffer_cnt_fc;
|
103 |
|
|
sc_signal<bool> ro_nop_req_fc;
|
104 |
|
|
|
105 |
|
|
sc_signal<bool> ro_overflow_csr;
|
106 |
|
|
|
107 |
|
|
#ifdef RETRY_MODE_ENABLED
|
108 |
|
|
sc_signal< bool > lk_rx_connected;
|
109 |
|
|
sc_signal< bool > csr_retry;
|
110 |
|
|
sc_signal<bool> cd_received_non_flow_stomped_ro;
|
111 |
|
|
#endif
|
112 |
|
|
|
113 |
|
|
sc_signal<sc_bv<CMD_BUFFER_MEM_WIDTH> > ro_command_packet_wr_data;
|
114 |
|
|
sc_signal<bool > ro_command_packet_write;
|
115 |
|
|
sc_signal<sc_uint<LOG2_NB_OF_BUFFERS+2> > ro_command_packet_wr_addr;
|
116 |
|
|
sc_signal<sc_uint<LOG2_NB_OF_BUFFERS+2> > ro_command_packet_rd_addr[2];
|
117 |
|
|
sc_signal<sc_bv<CMD_BUFFER_MEM_WIDTH> > command_packet_rd_data_ro[2];
|
118 |
|
|
|
119 |
|
|
////////////////////////////////////////////////////////////////
|
120 |
|
|
////////////////////////////////////////////////////////////////
|
121 |
|
|
// DUT connections
|
122 |
|
|
////////////////////////////////////////////////////////////////
|
123 |
|
|
////////////////////////////////////////////////////////////////
|
124 |
|
|
|
125 |
|
|
//Signals used to link the design to the testbench
|
126 |
|
|
dut->clk(clk);
|
127 |
|
|
dut->resetx(resetx);
|
128 |
|
|
dut->ro_packet_csr(ro_packet_csr);
|
129 |
|
|
dut->ro_packet_ui(ro_packet_ui);
|
130 |
|
|
dut->ro_packet_fwd(ro_packet_fwd);
|
131 |
|
|
dut->ro_packet_vc_fwd(ro_packet_vc_fwd);
|
132 |
|
|
dut->ro_available_csr(ro_available_csr);
|
133 |
|
|
dut->ro_available_ui(ro_available_ui);
|
134 |
|
|
dut->ro_available_fwd(ro_available_fwd);
|
135 |
|
|
|
136 |
|
|
dut->csr_ack_ro(csr_ack_ro);
|
137 |
|
|
dut->ui_ack_ro(ui_ack_ro);
|
138 |
|
|
dut->fwd_ack_ro(fwd_ack_ro);
|
139 |
|
|
|
140 |
|
|
dut->eh_ack_ro(eh_ack_ro);
|
141 |
|
|
dut->fc_nop_sent(fc_nop_sent);
|
142 |
|
|
dut->cd_packet_ro(cd_packet_ro);
|
143 |
|
|
dut->cd_available_ro(cd_available_ro);
|
144 |
|
|
dut->cd_data_pending_ro(cd_data_pending_ro);
|
145 |
|
|
dut->cd_data_pending_addr_ro(cd_data_pending_addr_ro);
|
146 |
|
|
dut->csr_unit_id(csr_unit_id);
|
147 |
|
|
for(int n = 0; n < NbRegsBars; n++)
|
148 |
|
|
dut->csr_bar[n](csr_bar[n]);
|
149 |
|
|
dut->csr_memory_space_enable(csr_memory_space_enable);
|
150 |
|
|
dut->csr_io_space_enable(csr_io_space_enable);
|
151 |
|
|
dut->csr_direct_route_enable(csr_direct_route_enable);
|
152 |
|
|
dut->csr_sync(csr_sync);
|
153 |
|
|
|
154 |
|
|
for(int n = 0; n < 32; n++)
|
155 |
|
|
dut->clumped_unit_id[n](clumped_unit_id[n]);
|
156 |
|
|
|
157 |
|
|
#ifdef ENABLE_REORDERING
|
158 |
|
|
dut->csr_unitid_reorder_disable(csr_unitid_reorder_disable);
|
159 |
|
|
#endif
|
160 |
|
|
dut->fwd_next_node_buffer_status_ro(fwd_next_node_buffer_status_ro);
|
161 |
|
|
|
162 |
|
|
dut->ro_buffer_cnt_fc(ro_buffer_cnt_fc);
|
163 |
|
|
dut->ro_nop_req_fc(ro_nop_req_fc);
|
164 |
|
|
|
165 |
|
|
dut->ro_overflow_csr(ro_overflow_csr);
|
166 |
|
|
|
167 |
|
|
#ifdef RETRY_MODE_ENABLED
|
168 |
|
|
dut->lk_rx_connected(lk_rx_connected);
|
169 |
|
|
dut->csr_retry(csr_retry);
|
170 |
|
|
dut->cd_received_non_flow_stomped_ro(cd_received_non_flow_stomped_ro);
|
171 |
|
|
#endif
|
172 |
|
|
|
173 |
|
|
dut->ro_command_packet_wr_data(ro_command_packet_wr_data);
|
174 |
|
|
dut->ro_command_packet_write(ro_command_packet_write);
|
175 |
|
|
dut->ro_command_packet_wr_addr(ro_command_packet_wr_addr);
|
176 |
|
|
dut->ro_command_packet_rd_addr[0](ro_command_packet_rd_addr[0]);
|
177 |
|
|
dut->ro_command_packet_rd_addr[1](ro_command_packet_rd_addr[1]);
|
178 |
|
|
dut->command_packet_rd_data_ro[0](command_packet_rd_data_ro[0]);
|
179 |
|
|
dut->command_packet_rd_data_ro[1](command_packet_rd_data_ro[1]);
|
180 |
|
|
|
181 |
|
|
////////////////////////////////////////////////////////////////
|
182 |
|
|
////////////////////////////////////////////////////////////////
|
183 |
|
|
// TB connections
|
184 |
|
|
////////////////////////////////////////////////////////////////
|
185 |
|
|
////////////////////////////////////////////////////////////////
|
186 |
|
|
|
187 |
|
|
tb->clk(clk);
|
188 |
|
|
tb->resetx(resetx);
|
189 |
|
|
tb->ro_packet_csr(ro_packet_csr);
|
190 |
|
|
tb->ro_packet_ui(ro_packet_ui);
|
191 |
|
|
tb->ro_packet_fwd(ro_packet_fwd);
|
192 |
|
|
|
193 |
|
|
tb->ro_available_csr(ro_available_csr);
|
194 |
|
|
tb->ro_available_ui(ro_available_ui);
|
195 |
|
|
tb->ro_available_fwd(ro_available_fwd);
|
196 |
|
|
|
197 |
|
|
tb->csr_ack_ro(csr_ack_ro);
|
198 |
|
|
tb->ui_ack_ro(ui_ack_ro);
|
199 |
|
|
tb->fwd_ack_ro(fwd_ack_ro);
|
200 |
|
|
|
201 |
|
|
tb->eh_ack_ro(eh_ack_ro);
|
202 |
|
|
tb->fc_nop_sent(fc_nop_sent);
|
203 |
|
|
tb->cd_packet_ro(cd_packet_ro);
|
204 |
|
|
tb->cd_available_ro(cd_available_ro);
|
205 |
|
|
tb->cd_data_pending_ro(cd_data_pending_ro);
|
206 |
|
|
tb->cd_data_pending_addr_ro(cd_data_pending_addr_ro);
|
207 |
|
|
tb->csr_unit_id(csr_unit_id);
|
208 |
|
|
for(int n = 0; n < NbRegsBars; n++)
|
209 |
|
|
tb->csr_bar[n](csr_bar[n]);
|
210 |
|
|
tb->csr_memory_space_enable(csr_memory_space_enable);
|
211 |
|
|
tb->csr_io_space_enable(csr_io_space_enable);
|
212 |
|
|
tb->csr_direct_route_enable(csr_direct_route_enable);
|
213 |
|
|
tb->csr_sync(csr_sync);
|
214 |
|
|
|
215 |
|
|
for(int n = 0; n < 32; n++)
|
216 |
|
|
tb->clumped_unit_id[n](clumped_unit_id[n]);
|
217 |
|
|
|
218 |
|
|
#ifdef ENABLE_REORDERING
|
219 |
|
|
tb->csr_unitid_reorder_disable(csr_unitid_reorder_disable);
|
220 |
|
|
#endif
|
221 |
|
|
tb->fwd_next_node_buffer_status_ro(fwd_next_node_buffer_status_ro);
|
222 |
|
|
|
223 |
|
|
tb->ro_buffer_cnt_fc(ro_buffer_cnt_fc);
|
224 |
|
|
tb->ro_nop_req_fc(ro_nop_req_fc);
|
225 |
|
|
|
226 |
|
|
tb->ro_overflow_csr(ro_overflow_csr);
|
227 |
|
|
|
228 |
|
|
#ifdef RETRY_MODE_ENABLED
|
229 |
|
|
tb->lk_rx_connected(lk_rx_connected);
|
230 |
|
|
tb->csr_retry(csr_retry);
|
231 |
|
|
#endif
|
232 |
|
|
|
233 |
|
|
tb->ro_command_packet_wr_data(ro_command_packet_wr_data);
|
234 |
|
|
tb->ro_command_packet_write(ro_command_packet_write);
|
235 |
|
|
tb->ro_command_packet_wr_addr(ro_command_packet_wr_addr);
|
236 |
|
|
tb->ro_command_packet_rd_addr[0](ro_command_packet_rd_addr[0]);
|
237 |
|
|
tb->ro_command_packet_rd_addr[1](ro_command_packet_rd_addr[1]);
|
238 |
|
|
tb->command_packet_rd_data_ro[0](command_packet_rd_data_ro[0]);
|
239 |
|
|
tb->command_packet_rd_data_ro[1](command_packet_rd_data_ro[1]);
|
240 |
|
|
|
241 |
|
|
////////////////////////////////////////////////////////////////
|
242 |
|
|
////////////////////////////////////////////////////////////////
|
243 |
|
|
// Trace signals
|
244 |
|
|
////////////////////////////////////////////////////////////////
|
245 |
|
|
////////////////////////////////////////////////////////////////
|
246 |
|
|
|
247 |
|
|
sc_trace_file *tf = sc_create_vcd_trace_file("sim_reordering_l2");
|
248 |
|
|
|
249 |
|
|
sc_trace(tf,clk,"clk");
|
250 |
|
|
sc_trace(tf,resetx,"resetx");
|
251 |
|
|
sc_trace(tf,ro_packet_csr,"ro_packet_csr");
|
252 |
|
|
sc_trace(tf,ro_packet_ui,"ro_packet_ui");
|
253 |
|
|
sc_trace(tf,ro_packet_fwd,"ro_packet_fwd");
|
254 |
|
|
|
255 |
|
|
sc_trace(tf,ro_available_csr,"ro_available_csr");
|
256 |
|
|
sc_trace(tf,ro_available_ui,"ro_available_ui");
|
257 |
|
|
sc_trace(tf,ro_available_fwd,"ro_available_fwd");
|
258 |
|
|
|
259 |
|
|
sc_trace(tf,csr_ack_ro,"csr_ack_ro");
|
260 |
|
|
sc_trace(tf,ui_ack_ro,"ui_ack_ro");
|
261 |
|
|
sc_trace(tf,fwd_ack_ro,"fwd_ack_ro");
|
262 |
|
|
|
263 |
|
|
sc_trace(tf,eh_ack_ro,"eh_ack_ro");
|
264 |
|
|
sc_trace(tf,fc_nop_sent,"fc_nop_sent");
|
265 |
|
|
sc_trace(tf,cd_packet_ro,"cd_packet_ro");
|
266 |
|
|
sc_trace(tf,cd_available_ro,"cd_available_ro");
|
267 |
|
|
sc_trace(tf,cd_data_pending_ro,"cd_data_pending_ro");
|
268 |
|
|
sc_trace(tf,cd_data_pending_addr_ro,"cd_data_pending_addr_ro");
|
269 |
|
|
sc_trace(tf,csr_unit_id,"csr_unit_id");
|
270 |
|
|
for(int n = 0; n < NbRegsBars; n++){
|
271 |
|
|
ostringstream o;
|
272 |
|
|
o << "csr_bar(" << n << ")";
|
273 |
|
|
sc_trace(tf,csr_bar[n],o.str().c_str());
|
274 |
|
|
}
|
275 |
|
|
sc_trace(tf,csr_memory_space_enable,"csr_memory_space_enable");
|
276 |
|
|
sc_trace(tf,csr_io_space_enable,"csr_io_space_enable");
|
277 |
|
|
sc_trace(tf,csr_direct_route_enable,"csr_direct_route_enable");
|
278 |
|
|
//sc_trace(tf,csr_clumping_configuration,"csr_clumping_configuration");
|
279 |
|
|
|
280 |
|
|
#ifdef ENABLE_REORDERING
|
281 |
|
|
sc_trace(tf,csr_unitid_reorder_disable,"csr_unitid_reorder_disable");
|
282 |
|
|
#endif
|
283 |
|
|
sc_trace(tf,fwd_next_node_buffer_status_ro,"fwd_next_node_buffer_status_ro");
|
284 |
|
|
|
285 |
|
|
sc_trace(tf,ro_buffer_cnt_fc,"ro_buffer_cnt_fc");
|
286 |
|
|
sc_trace(tf,ro_nop_req_fc,"ro_nop_req_fc");
|
287 |
|
|
|
288 |
|
|
sc_trace(tf,ro_overflow_csr,"ro_overflow_csr");
|
289 |
|
|
|
290 |
|
|
#ifdef RETRY_MODE_ENABLED
|
291 |
|
|
sc_trace(tf,lk_rx_connected,"lk_rx_connected");
|
292 |
|
|
sc_trace(tf,csr_retry,"csr_retry");
|
293 |
|
|
#endif
|
294 |
|
|
|
295 |
|
|
/*
|
296 |
|
|
sc_trace(tf,dut->vc_npc_out_packet[0],"vc_npc_out_packet(0)");
|
297 |
|
|
sc_trace(tf,dut->vc_npc_out_packet[1],"vc_npc_out_packet(1)");
|
298 |
|
|
sc_trace(tf,dut->vc_npc_packet_available[0],"vc_npc_packet_available(0)");
|
299 |
|
|
sc_trace(tf,dut->vc_npc_packet_available[1],"vc_npc_packet_available(1)");
|
300 |
|
|
sc_trace(tf,dut->vc_npc_acknowledge[0],"vc_npc_acknowledge(0)");
|
301 |
|
|
sc_trace(tf,dut->vc_npc_acknowledge[1],"vc_npc_acknowledge(1)");
|
302 |
|
|
*/
|
303 |
|
|
|
304 |
|
|
sc_trace(tf,dut->vc_rc_module->compare_with_higher,"AAA.compare_with_higher");
|
305 |
|
|
|
306 |
|
|
sc_trace(tf,dut->addressManagerModule->first_free_one_hot[0],"ADDR_MANAGER.first_free_one_hot[0]");
|
307 |
|
|
sc_trace(tf,dut->addressManagerModule->first_free_one_hot[1],"ADDR_MANAGER.first_free_one_hot[1]");
|
308 |
|
|
sc_trace(tf,dut->addressManagerModule->first_free_one_hot[2],"ADDR_MANAGER.first_free_one_hot[2]");
|
309 |
|
|
|
310 |
|
|
sc_trace(tf,dut->addressManagerModule->buffer_used[2][0],"ADDR_MANAGER.buffer_used[2][0]");
|
311 |
|
|
sc_trace(tf,dut->addressManagerModule->buffer_used[2][1],"ADDR_MANAGER.buffer_used[2][1]");
|
312 |
|
|
sc_trace(tf,dut->addressManagerModule->buffer_used[2][2],"ADDR_MANAGER.buffer_used[2][2]");
|
313 |
|
|
sc_trace(tf,dut->addressManagerModule->buffer_used[2][3],"ADDR_MANAGER.buffer_used[2][3]");
|
314 |
|
|
|
315 |
|
|
sc_trace(tf,dut->addressManagerModule->use_address,"ADDR_MANAGER.use_address");
|
316 |
|
|
sc_trace(tf,dut->addressManagerModule->new_packet_available[0],"ADDR_MANAGER.new_packet_available[0]");
|
317 |
|
|
sc_trace(tf,dut->addressManagerModule->new_packet_available[1],"ADDR_MANAGER.new_packet_available[1]");
|
318 |
|
|
sc_trace(tf,dut->addressManagerModule->new_packet_available[2],"ADDR_MANAGER.new_packet_available[2]");
|
319 |
|
|
|
320 |
|
|
sc_trace(tf,dut->addressManagerModule->ro_command_packet_rd_addr[0],"ADDR_MANAGER.ro_command_packet_rd_addr[0]");
|
321 |
|
|
sc_trace(tf,dut->addressManagerModule->ro_command_packet_rd_addr[1],"ADDR_MANAGER.ro_command_packet_rd_addr[1]");
|
322 |
|
|
sc_trace(tf,dut->addressManagerModule->buffers_cleared[0],"ADDR_MANAGER.buffers_cleared[0]");
|
323 |
|
|
|
324 |
|
|
sc_trace(tf,dut->vc_rc_module->in_packet_destination[0],"RESPONSE.in_packet_destination[0]");
|
325 |
|
|
sc_trace(tf,dut->vc_rc_module->in_packet_destination[1],"RESPONSE.in_packet_destination[1]");
|
326 |
|
|
sc_trace(tf,dut->vc_rc_module->in_packet_addr,"RESPONSE.in_packet_addr");
|
327 |
|
|
|
328 |
|
|
sc_trace(tf,dut->vc_rc_module->packet_available[0],"RESPONSE.available[0]");
|
329 |
|
|
sc_trace(tf,dut->vc_rc_module->packet_available[1],"RESPONSE.available[1]");
|
330 |
|
|
sc_trace(tf,dut->vc_rc_module->out_packet_addr[0],"RESPONSE.out_packet_addr[0]");
|
331 |
|
|
sc_trace(tf,dut->vc_rc_module->out_packet_addr[1],"RESPONSE.out_packet_addr[1]");
|
332 |
|
|
|
333 |
|
|
/*sc_trace(tf,dut->vc_rc_module->out_packet_seqid[0],"RESPONSE.out_packet_seqid[0]");
|
334 |
|
|
sc_trace(tf,dut->vc_rc_module->out_packet_seqid[1],"RESPONSE.out_packet_seqid[1]");
|
335 |
|
|
sc_trace(tf,dut->vc_rc_module->in_packet_seqid,"RESPONSE.in_packet_seqid");*/
|
336 |
|
|
|
337 |
|
|
sc_trace(tf,dut->ro_command_packet_rd_addr[0],"AAA.ro_command_packet_rd_addr[0]");
|
338 |
|
|
sc_trace(tf,dut->ro_command_packet_rd_addr[1],"AAA.ro_command_packet_rd_addr[1]");
|
339 |
|
|
sc_trace(tf,dut->ro_command_packet_wr_addr,"AAA.ro_command_packet_wr_addr");
|
340 |
|
|
sc_trace(tf,dut->ro_command_packet_wr_data,"AAA.ro_command_packet_wr_data");
|
341 |
|
|
sc_trace(tf,dut->ro_command_packet_write,"AAA.ro_command_packet_write");
|
342 |
|
|
sc_trace(tf,dut->command_packet_rd_data_ro[0],"AAA.command_packet_rd_data_ro[0]");
|
343 |
|
|
sc_trace(tf,dut->command_packet_rd_data_ro[1],"AAA.command_packet_rd_data_ro[1]");
|
344 |
|
|
sc_trace(tf,dut->finalReorderingModule->response_requested[0],"AAA.response_requested[0]");
|
345 |
|
|
sc_trace(tf,dut->finalReorderingModule->response_requested[1],"AAA.response_requested[1]");
|
346 |
|
|
|
347 |
|
|
sc_trace(tf,dut->vc_rc_module->packet_addr_register[0],"packet_addr_register[0]");
|
348 |
|
|
sc_trace(tf,dut->vc_rc_module->destination_registers[0],"destination_registers[0]");
|
349 |
|
|
sc_trace(tf,dut->vc_rc_module->packet_passpw_register[0],"packet_passpw_register[0]");
|
350 |
|
|
|
351 |
|
|
sc_trace(tf,dut->vc_rc_module->packet_addr_register[1],"packet_addr_register[1]");
|
352 |
|
|
sc_trace(tf,dut->vc_rc_module->destination_registers[1],"destination_registers[1]");
|
353 |
|
|
sc_trace(tf,dut->vc_rc_module->packet_passpw_register[1],"packet_passpw_register[1]");
|
354 |
|
|
|
355 |
|
|
sc_trace(tf,dut->vc_rc_module->packet_addr_register[2],"packet_addr_register[2]");
|
356 |
|
|
sc_trace(tf,dut->vc_rc_module->destination_registers[2],"destination_registers[2]");
|
357 |
|
|
sc_trace(tf,dut->vc_rc_module->packet_passpw_register[2],"packet_passpw_register[2]");
|
358 |
|
|
|
359 |
|
|
sc_trace(tf,dut->vc_rc_module->packet_addr_register[3],"packet_addr_register[3]");
|
360 |
|
|
sc_trace(tf,dut->vc_rc_module->destination_registers[3],"destination_registers[3]");
|
361 |
|
|
sc_trace(tf,dut->vc_rc_module->packet_passpw_register[3],"packet_passpw_register[3]");
|
362 |
|
|
|
363 |
|
|
sc_trace(tf,dut->vc_rc_module->packet_addr_register[4],"packet_addr_register[4]");
|
364 |
|
|
sc_trace(tf,dut->vc_rc_module->destination_registers[4],"destination_registers[4]");
|
365 |
|
|
sc_trace(tf,dut->vc_rc_module->packet_passpw_register[4],"packet_passpw_register[4]");
|
366 |
|
|
|
367 |
|
|
sc_trace(tf,dut->vc_rc_module->packet_addr_register[5],"packet_addr_register[5]");
|
368 |
|
|
sc_trace(tf,dut->vc_rc_module->destination_registers[5],"destination_registers[5]");
|
369 |
|
|
sc_trace(tf,dut->vc_rc_module->packet_passpw_register[5],"packet_passpw_register[5]");
|
370 |
|
|
|
371 |
|
|
sc_trace(tf,dut->vc_rc_module->packet_addr_register[6],"packet_addr_register[6]");
|
372 |
|
|
sc_trace(tf,dut->vc_rc_module->destination_registers[6],"destination_registers[6]");
|
373 |
|
|
sc_trace(tf,dut->vc_rc_module->packet_passpw_register[6],"packet_passpw_register[6]");
|
374 |
|
|
|
375 |
|
|
sc_trace(tf,dut->vc_npc_module->out_packet_addr[0],"BBB.out_packet_addr[0]");
|
376 |
|
|
sc_trace(tf,dut->vc_npc_module->out_packet_addr[1],"BBB.out_packet_addr[1]");
|
377 |
|
|
sc_trace(tf,dut->vc_npc_module->out_packet_seqid[0],"BBB.out_packet_seqid[0]");
|
378 |
|
|
sc_trace(tf,dut->vc_npc_module->out_packet_seqid[1],"BBB.out_packet_seqid[1]");
|
379 |
|
|
sc_trace(tf,dut->vc_npc_module->packet_available[0],"BBB.packet_available[0]");
|
380 |
|
|
sc_trace(tf,dut->vc_npc_module->packet_available[1],"BBB.packet_available[1]");
|
381 |
|
|
sc_trace(tf,dut->vc_npc_module->acknowledge[0],"BBB.acknowledge[0]");
|
382 |
|
|
sc_trace(tf,dut->vc_npc_module->acknowledge[1],"BBB.acknowledge[1]");
|
383 |
|
|
|
384 |
|
|
sc_trace(tf,dut->finalReorderingModule->response_packet_buffer_accepted[0].read().packet,"final_packet_accepted0");
|
385 |
|
|
sc_trace(tf,dut->finalReorderingModule->response_packet_buffer_accepted[1].read().packet,"final_packet_accepted1");
|
386 |
|
|
sc_trace(tf,dut->finalReorderingModule->response_packet_buffer_rejected[0].read().packet,"final_packet_rejected0");
|
387 |
|
|
sc_trace(tf,dut->finalReorderingModule->response_packet_buffer_rejected_loaded[0],"final_packet_rejected_l0");
|
388 |
|
|
sc_trace(tf,dut->finalReorderingModule->response_packet_buffer_rejected[1].read().packet,"final_packet_rejected1");
|
389 |
|
|
sc_trace(tf,dut->finalReorderingModule->response_packet_buffer_rejected_loaded[1],"final_packet_rejected_l1");
|
390 |
|
|
|
391 |
|
|
sc_trace(tf,dut->finalReorderingModule->response_packet_buffer_accepted_loaded[0],"final_packet_accepted_rc_l0");
|
392 |
|
|
sc_trace(tf,dut->finalReorderingModule->response_packet_buffer_accepted_loaded[1],"final_packet_accepted_rc_l1");
|
393 |
|
|
sc_trace(tf,dut->finalReorderingModule->posted_packet_buffer_accepted_loaded[0],"final_packet_accepted_pc_l0");
|
394 |
|
|
sc_trace(tf,dut->finalReorderingModule->posted_packet_buffer_accepted_loaded[1],"final_packet_accepted_pc_l1");
|
395 |
|
|
sc_trace(tf,dut->finalReorderingModule->nposted_packet_buffer_accepted_loaded[0],"final_packet_accepted_npc_l0");
|
396 |
|
|
sc_trace(tf,dut->finalReorderingModule->nposted_packet_buffer_accepted_loaded[1],"final_packet_accepted_npc_l1");
|
397 |
|
|
|
398 |
|
|
|
399 |
|
|
sc_trace(tf,dut->finalReorderingModule->fetched_packet_available[0],"fetched_packet_available[0]");
|
400 |
|
|
sc_trace(tf,dut->finalReorderingModule->fetched_packet_available[1],"fetched_packet_available[1]");
|
401 |
|
|
sc_trace(tf,dut->finalReorderingModule->fetched_packet[0],"fetched_packet[0]");
|
402 |
|
|
sc_trace(tf,dut->finalReorderingModule->fetched_packet[1],"fetched_packet[1]");
|
403 |
|
|
sc_trace(tf,dut->finalReorderingModule->fetched_packet_vc[0],"fetched_packet_vc[0]");
|
404 |
|
|
sc_trace(tf,dut->finalReorderingModule->fetched_packet_vc[1],"fetched_packet_vc[1]");
|
405 |
|
|
|
406 |
|
|
//To notify that packets have been received, one signal per VC
|
407 |
|
|
sc_trace(tf,dut->nopHandlerModule->received_packet[0],"received_packet[0]");
|
408 |
|
|
sc_trace(tf,dut->nopHandlerModule->received_packet[1],"received_packet[1]");
|
409 |
|
|
sc_trace(tf,dut->nopHandlerModule->received_packet[2],"received_packet[2]");
|
410 |
|
|
//To notify that packets have been sent and the buffer is free, one signal per VC
|
411 |
|
|
sc_trace(tf,dut->nopHandlerModule->buffers_cleared[0],"buffers_cleared[0]");
|
412 |
|
|
sc_trace(tf,dut->nopHandlerModule->buffers_cleared[1],"buffers_cleared[1]");
|
413 |
|
|
sc_trace(tf,dut->nopHandlerModule->buffers_cleared[2],"buffers_cleared[2]");
|
414 |
|
|
|
415 |
|
|
//Count of the number of buffers that are advertised as being free to the next node
|
416 |
|
|
sc_trace(tf,dut->nopHandlerModule->bufferCount[0],"bufferCount[0]");
|
417 |
|
|
sc_trace(tf,dut->nopHandlerModule->bufferCount[1],"bufferCount[1]");
|
418 |
|
|
sc_trace(tf,dut->nopHandlerModule->bufferCount[2],"bufferCount[2]");
|
419 |
|
|
|
420 |
|
|
//The number of free buffers
|
421 |
|
|
sc_trace(tf,dut->nopHandlerModule->freeBuffers[0],"freeBuffers[0]");
|
422 |
|
|
sc_trace(tf,dut->nopHandlerModule->freeBuffers[1],"freeBuffers[1]");
|
423 |
|
|
sc_trace(tf,dut->nopHandlerModule->freeBuffers[2],"freeBuffers[2]");
|
424 |
|
|
|
425 |
|
|
//An internal register that keeps track of the previous value of ro_buffer_cnt_fc
|
426 |
|
|
//sc_trace(tf,dut->nopHandlerModule->bufferFreedNop,"bufferFreedNop");
|
427 |
|
|
|
428 |
|
|
|
429 |
|
|
//------------------------------------------
|
430 |
|
|
// Start simulation
|
431 |
|
|
//------------------------------------------
|
432 |
|
|
cout << "Start of History Buffer simulation" << endl;
|
433 |
|
|
sc_start(450);
|
434 |
|
|
|
435 |
|
|
|
436 |
|
|
sc_close_vcd_trace_file(tf);
|
437 |
|
|
cout << "End of simulation" << endl;
|
438 |
|
|
|
439 |
|
|
delete dut;
|
440 |
|
|
delete tb;
|
441 |
|
|
return 0;
|
442 |
|
|
}
|
443 |
|
|
|