OpenCores
URL https://opencores.org/ocsvn/ht_tunnel/ht_tunnel/trunk

Subversion Repositories ht_tunnel

[/] [ht_tunnel/] [tags/] [START/] [rtl/] [systemc/] [vc_ht_tunnel_l1/] [main.cpp] - Blame information for rev 19

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 acastong
//main.cpp for vc_ht_tunnel_l1
2
 
3
/* ***** BEGIN LICENSE BLOCK *****
4
 * Version: MPL 1.1
5
 *
6
 * The contents of this file are subject to the Mozilla Public License Version
7
 * 1.1 (the "License"); you may not use this file except in compliance with
8
 * the License. You may obtain a copy of the License at
9
 * http://www.mozilla.org/MPL/
10
 *
11
 * Software distributed under the License is distributed on an "AS IS" basis,
12
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13
 * for the specific language governing rights and limitations under the
14
 * License.
15
 *
16
 * The Original Code is HyperTransport Tunnel IP Core.
17
 *
18
 * The Initial Developer of the Original Code is
19
 * Ecole Polytechnique de Montreal.
20
 * Portions created by the Initial Developer are Copyright (C) 2005
21
 * the Initial Developer. All Rights Reserved.
22
 *
23
 * Contributor(s):
24
 *   Ami Castonguay <acastong@grm.polymtl.ca>
25
 *
26
 * Alternatively, the contents of this file may be used under the terms
27
 * of the Polytechnique HyperTransport Tunnel IP Core Source Code License
28
 * (the  "PHTICSCL License", see the file PHTICSCL.txt), in which case the
29
 * provisions of PHTICSCL License are applicable instead of those
30
 * above. If you wish to allow use of your version of this file only
31
 * under the terms of the PHTICSCL License and not to allow others to use
32
 * your version of this file under the MPL, indicate your decision by
33
 * deleting the provisions above and replace them with the notice and
34
 * other provisions required by the PHTICSCL License. If you do not delete
35
 * the provisions above, a recipient may use your version of this file
36
 * under either the MPL or the PHTICSCL License."
37
 *
38
 * ***** END LICENSE BLOCK ***** */
39
 
40
#include "../core_synth/synth_datatypes.h"
41
 
42
#include <iostream>
43
#include <string>
44
#include <sstream>
45
#include <iomanip>
46
#include <ctime>
47
 
48
#include "vc_ht_tunnel_l1.h"
49
 
50
using namespace std;
51
 
52
// Main Function
53
/**
54
  This main file has not purpose other than to test if the design compiles
55
  and runs properly.
56
*/
57
int sc_main( int argc, char* argv[] )
58
{
59
 
60
    sc_clock clk("CLOCK",5,SC_NS);
61
 
62
        //------------------------------------------
63
        // Instanciation de FLOW CONTROL
64
        //------------------------------------------
65
        vc_ht_tunnel_l1* the_ht_tunnel = new vc_ht_tunnel_l1("the_ht_tunnel");
66
 
67
        // ***************************************************
68
        //  Signals
69
        // ***************************************************  
70
        /// The Clock, LDTSTOP and reset signals
71
        sc_signal<bool>                 resetx;
72
        sc_signal<bool>                 pwrok;
73
        sc_signal<bool>                 ldtstopx;
74
 
75
        //Link0 signals
76
        //sc_signal<bool >              receive_clk0;
77
        sc_signal<bool>                                         phy0_available_lk0;
78
        sc_signal<sc_bv<CAD_IN_DEPTH> >         phy0_ctl_lk0;
79
        sc_signal<sc_bv<CAD_IN_DEPTH> >         phy0_cad_lk0[CAD_IN_WIDTH];
80
 
81
        //sc_signal< bool >     transmit_clk0;
82
        sc_signal<sc_bv<CAD_OUT_DEPTH> >        lk0_ctl_phy0;
83
        sc_signal<sc_bv<CAD_OUT_DEPTH> >        lk0_cad_phy0[CAD_OUT_WIDTH];
84
        sc_signal<bool>                                         phy0_consume_lk0;
85
 
86
        sc_signal<bool>                 lk0_disable_drivers_phy0;
87
        sc_signal<bool>                 lk0_disable_receivers_phy0;
88
 
89
#ifndef INTERNAL_SHIFTER_ALIGNMENT
90
        ///High speed deserializer should stall shifting bits for lk_deser_stall_cycles_phy cycles
91
        /** Cannot be asserted with a lk_deser_stall_cycles_phy value of 0*/
92
        sc_signal<bool > lk0_deser_stall_phy0;
93
        ///Number of bit times to stall deserializing incoming data when lk_deser_stall_phy is asserted
94
        sc_signal<sc_uint<LOG2_CAD_IN_DEPTH> > lk0_deser_stall_cycles_phy0;
95
#endif
96
 
97
        //Link1 signals
98
        //sc_signal<bool >              receive_clk1;
99
        sc_signal<bool>                                         phy1_available_lk1;
100
        sc_signal<sc_bv<CAD_IN_DEPTH> >         phy1_ctl_lk1;
101
        sc_signal<sc_bv<CAD_IN_DEPTH> >         phy1_cad_lk1[CAD_IN_WIDTH];
102
 
103
        //sc_signal< bool >     transmit_clk0;
104
        sc_signal<sc_bv<CAD_OUT_DEPTH> >        lk1_ctl_phy1;
105
        sc_signal<sc_bv<CAD_OUT_DEPTH> >        lk1_cad_phy1[CAD_OUT_WIDTH];
106
        sc_signal<bool>                                         phy1_consume_lk1;
107
 
108
        sc_signal<bool>                 lk1_disable_drivers_phy1;
109
        sc_signal<bool>                 lk1_disable_receivers_phy1;
110
 
111
#ifndef INTERNAL_SHIFTER_ALIGNMENT
112
        ///High speed deserializer should stall shifting bits for lk_deser_stall_cycles_phy cycles
113
        /** Cannot be asserted with a lk_deser_stall_cycles_phy value of 0*/
114
        sc_signal<bool > lk1_deser_stall_phy1;
115
        ///Number of bit times to stall deserializing incoming data when lk_deser_stall_phy is asserted
116
        sc_signal<sc_uint<LOG2_CAD_IN_DEPTH> > lk1_deser_stall_cycles_phy1;
117
#endif
118
 
119
        /////////////////////////////////////////////////////
120
        // Interface to UserInterface memory - synchronous
121
        /////////////////////////////////////////////////////
122
 
123
        sc_signal<bool> ui_memory_write0;
124
        sc_signal<bool> ui_memory_write1;//20
125
        sc_signal<sc_bv<USER_MEMORY_ADDRESS_WIDTH> > ui_memory_write_address;
126
        sc_signal<sc_bv<32> > ui_memory_write_data;
127
 
128
        sc_signal<sc_bv<USER_MEMORY_ADDRESS_WIDTH> > ui_memory_read_address0;
129
        sc_signal<sc_bv<USER_MEMORY_ADDRESS_WIDTH> > ui_memory_read_address1;
130
        sc_signal<sc_bv<32> > ui_memory_read_data0;
131
        sc_signal<sc_bv<32> > ui_memory_read_data1;
132
 
133
#ifdef RETRY_MODE_ENABLED
134
        //////////////////////////////////////////
135
        //      Memory interface flowcontrol0- synchronous
136
        /////////////////////////////////////////
137
        sc_signal<bool> history_memory_write0;
138
        sc_signal<sc_uint<LOG2_HISTORY_MEMORY_SIZE> > history_memory_write_address0;
139
        sc_signal<sc_bv<32> > history_memory_write_data0;
140
        sc_signal<sc_uint<LOG2_HISTORY_MEMORY_SIZE> > history_memory_read_address0;//30
141
        sc_signal<sc_bv<32> > history_memory_output0;
142
 
143
        //////////////////////////////////////////
144
        //      Memory interface flowcontrol1- synchronous
145
        /////////////////////////////////////////
146
        sc_signal<bool> history_memory_write1;
147
        sc_signal<sc_uint<LOG2_HISTORY_MEMORY_SIZE> > history_memory_write_address1;
148
        sc_signal<sc_bv<32> > history_memory_write_data1;
149
        sc_signal<sc_uint<LOG2_HISTORY_MEMORY_SIZE> > history_memory_read_address1;
150
        sc_signal<sc_bv<32> > history_memory_output1;
151
 
152
#endif
153
 
154
        ////////////////////////////////////
155
        // Memory interface databuffer0 - synchronous
156
        ////////////////////////////////////
157
 
158
        sc_signal<bool> memory_write0;
159
        sc_signal<sc_uint<2> > memory_write_address_vc0;
160
        sc_signal<sc_uint<BUFFERS_ADDRESS_WIDTH> > memory_write_address_buffer0;
161
        sc_signal<sc_uint<4> > memory_write_address_pos0;//40
162
        sc_signal<sc_bv<32> > memory_write_data0;
163
 
164
        sc_signal<sc_uint<2> > memory_read_address_vc0[2];
165
        sc_signal<sc_uint<BUFFERS_ADDRESS_WIDTH> >memory_read_address_buffer0[2];
166
        sc_signal<sc_uint<4> > memory_read_address_pos0[2];//50
167
 
168
        sc_signal<sc_bv<32> > memory_output0[2];
169
 
170
        //////////////////////////////////////
171
        // Memory interface databuffer1 - synchronous
172
        ////////////////////////////////////
173
 
174
        sc_signal<bool> memory_write1;
175
        sc_signal<sc_uint<2> > memory_write_address_vc1;
176
        sc_signal<sc_uint<BUFFERS_ADDRESS_WIDTH> > memory_write_address_buffer1;
177
        sc_signal<sc_uint<4> > memory_write_address_pos1;
178
        sc_signal<sc_bv<32> > memory_write_data1;
179
 
180
        sc_signal<sc_uint<2> > memory_read_address_vc1[2];
181
        sc_signal<sc_uint<BUFFERS_ADDRESS_WIDTH> >memory_read_address_buffer1[2];
182
        sc_signal<sc_uint<4> > memory_read_address_pos1[2];
183
 
184
        sc_signal<sc_bv<32> > memory_output1[2];
185
 
186
 
187
        ///////////////////////////////////////
188
        // Interface to command memory 0
189
        ///////////////////////////////////////
190
        sc_signal<sc_bv<CMD_BUFFER_MEM_WIDTH> > ro0_command_packet_wr_data;
191
        sc_signal<bool > ro0_command_packet_write;
192
        sc_signal<sc_uint<LOG2_NB_OF_BUFFERS+2> > ro0_command_packet_wr_addr;
193
        sc_signal<sc_uint<LOG2_NB_OF_BUFFERS+2> > ro0_command_packet_rd_addr[2];
194
        sc_signal<sc_bv<CMD_BUFFER_MEM_WIDTH> > command_packet_rd_data_ro0[2];
195
 
196
        ///////////////////////////////////////
197
        // Interface to command memory 1
198
        ///////////////////////////////////////
199
        sc_signal<sc_bv<CMD_BUFFER_MEM_WIDTH> > ro1_command_packet_wr_data;
200
        sc_signal<bool > ro1_command_packet_write;
201
        sc_signal<sc_uint<LOG2_NB_OF_BUFFERS+2> > ro1_command_packet_wr_addr;
202
        sc_signal<sc_uint<LOG2_NB_OF_BUFFERS+2> > ro1_command_packet_rd_addr[2];
203
        sc_signal<sc_bv<CMD_BUFFER_MEM_WIDTH> > command_packet_rd_data_ro1[2];
204
 
205
 
206
        //************************************
207
        // Reset generated by link
208
        //************************************
209
        //sc_signal<bool>               warmrstx;
210
        //sc_signal<bool>               coldrstx;
211
 
212
        //sc_signal<bool>               dummy_warmrstx;
213
        //sc_signal<bool>               dummy_coldrstx;
214
 
215
        //******************************************
216
        //                      Signals to User
217
        //******************************************
218
        //------------------------------------------
219
        // Signals to send received packets to User
220
        //------------------------------------------
221
 
222
 
223
        /**The actual control/data packet to the user*/
224
        sc_signal<sc_bv<64> >           ui_packet_usr;
225
 
226
        /**The virtual channel of the ctl/data packet*/
227
        sc_signal<VirtualChannel>       ui_vc_usr;
228
 
229
        /**The side from which came the packet*/
230
        sc_signal< bool >                       ui_side_usr;
231
 
232
        /**If the packet is a direct_route packet - only valid for
233
           requests (posted and non-posted) */
234
        sc_signal<bool>                 ui_directroute_usr;
235
 
236
        /**If this is the last part of the packet*/
237
        sc_signal< bool >                       ui_eop_usr;
238
 
239
        /**If there is another packet available*/
240
        sc_signal< bool >                       ui_available_usr;
241
 
242
        /**If what is read is 64 bits or 32 bits*/
243
        sc_signal< bool >                       ui_output_64bits_usr;
244
 
245
        /**To allow the user to consume the packets*/
246
        sc_signal< bool >                       usr_consume_ui;
247
 
248
 
249
        //------------------------------------------
250
        // Signals to allow the User to send packets
251
        //------------------------------------------
252
 
253
        /**The actual control/data packet from the user*/
254
        sc_signal<sc_bv<64> >           usr_packet_ui;
255
 
256
        /**If there is another packet available*/
257
        sc_signal< bool >                       usr_available_ui;
258
 
259
        /**
260
        The side to send the packet if it is a response
261
        This bit is ignored if the packet is not a response
262
        since the side to send a request is determined automatically
263
        taking in acount DirectRoute functionnality.
264
        */
265
        sc_signal< bool >                       usr_side_ui;
266
 
267
        /**If the packet is trying to be sent to a VC that is full,
268
        We let the user know that he is doing something illegal
269
        Packet is not consumed if this is 1
270
        */
271
        //sc_signal < bool >            ui_invalid_usr;
272
 
273
        /**Which what type of ctl packets can be sent to side0*/
274
        sc_signal<sc_bv<6> >            ui_freevc0_usr;
275
        /**Which what type of ctl packets can be sent to side0*/
276
        sc_signal<sc_bv<6> >            ui_freevc1_usr;
277
 
278
        //-----------------------------------------------
279
        // Content of CSR that might be useful to user
280
        //-----------------------------------------------
281
        /** Signals table containing all 40 bits Base Addresses from BARs implemented */
282
        sc_signal<sc_bv<40> > csr_bar[NbRegsBars];
283
        /** Signal from register Interface->Command->csr_unit_id */
284
        sc_signal<sc_bv<5> > csr_unit_id;
285
 
286
        //------------------------------------------
287
        // Signals to affect CSR
288
        //------------------------------------------
289
        sc_signal<bool> usr_receivedResponseError_csr;
290
 
291
        //--------------------------------------------------------
292
        // Interface for having registers outside CSR if necessary
293
        //--------------------------------------------------------
294
 
295
        ///Signals to allow external registers with minimal logic
296
        /**
297
                Connect usr_read_data_csr to zeroes if not used!
298
        */
299
        //@{
300
        sc_signal<sc_uint<6> >  csr_read_addr_usr;
301
        sc_signal<sc_bv<32> >   usr_read_data_csr;
302
        sc_signal<bool >        csr_write_usr;
303
        sc_signal<sc_uint<6> >  csr_write_addr_usr;
304
        sc_signal<sc_bv<32> >   csr_write_data_usr;
305
        /**Every bit is a byte mask for the dword to write*/
306
        sc_signal<sc_bv<4> >    csr_write_mask_usr;
307
        //@}
308
 
309
        // ***************************************************
310
        //  LINKING DUT
311
        // ***************************************************  
312
 
313
        the_ht_tunnel->clk(clk);
314
        the_ht_tunnel->resetx(resetx);
315
        the_ht_tunnel->pwrok(pwrok);
316
        the_ht_tunnel->ldtstopx(ldtstopx);
317
 
318
        the_ht_tunnel->phy0_available_lk0(phy0_available_lk0);
319
        the_ht_tunnel->phy0_ctl_lk0(phy0_ctl_lk0);
320
 
321
        for(int n = 0; n < CAD_IN_WIDTH; n++){
322
                the_ht_tunnel->phy0_cad_lk0[n](phy0_cad_lk0[n]);
323
                the_ht_tunnel->lk0_cad_phy0[n](lk0_cad_phy0[n]);
324
                the_ht_tunnel->phy1_cad_lk1[n](phy1_cad_lk1[n]);
325
                the_ht_tunnel->lk1_cad_phy1[n](lk1_cad_phy1[n]);
326
        }
327
 
328
        the_ht_tunnel->lk0_ctl_phy0(lk0_ctl_phy0);
329
        the_ht_tunnel->phy0_consume_lk0(phy0_consume_lk0);
330
 
331
        the_ht_tunnel->lk0_disable_drivers_phy0(lk0_disable_drivers_phy0);
332
        the_ht_tunnel->lk0_disable_receivers_phy0(lk0_disable_receivers_phy0);
333
 
334
#ifndef INTERNAL_SHIFTER_ALIGNMENT
335
        the_ht_tunnel->lk0_deser_stall_phy0(lk0_deser_stall_phy0);
336
        the_ht_tunnel->lk0_deser_stall_cycles_phy0(lk0_deser_stall_cycles_phy0);
337
#endif
338
 
339
        the_ht_tunnel->phy1_available_lk1(phy1_available_lk1);
340
        the_ht_tunnel->phy1_ctl_lk1(phy1_ctl_lk1);
341
 
342
        the_ht_tunnel->lk1_ctl_phy1(lk1_ctl_phy1);
343
        the_ht_tunnel->phy1_consume_lk1(phy1_consume_lk1);
344
 
345
        the_ht_tunnel->lk1_disable_drivers_phy1(lk1_disable_drivers_phy1);
346
        the_ht_tunnel->lk1_disable_receivers_phy1(lk1_disable_receivers_phy1);
347
 
348
#ifndef INTERNAL_SHIFTER_ALIGNMENT
349
        the_ht_tunnel->lk1_deser_stall_phy1(lk1_deser_stall_phy1);
350
        the_ht_tunnel->lk1_deser_stall_cycles_phy1(lk1_deser_stall_cycles_phy1);
351
#endif
352
 
353
        the_ht_tunnel->ui_memory_write0(ui_memory_write0);
354
        the_ht_tunnel->ui_memory_write1(ui_memory_write1);//20
355
        the_ht_tunnel->ui_memory_write_address(ui_memory_write_address);
356
        the_ht_tunnel->ui_memory_write_data(ui_memory_write_data);
357
 
358
        the_ht_tunnel->ui_memory_read_address0(ui_memory_read_address0);
359
        the_ht_tunnel->ui_memory_read_address1(ui_memory_read_address1);
360
        the_ht_tunnel->ui_memory_read_data0(ui_memory_read_data0);
361
        the_ht_tunnel->ui_memory_read_data1(ui_memory_read_data1);
362
 
363
#ifdef RETRY_MODE_ENABLED
364
        the_ht_tunnel->history_memory_write0(history_memory_write0);
365
        the_ht_tunnel->history_memory_write_address0(history_memory_write_address0);
366
        the_ht_tunnel->history_memory_write_data0(history_memory_write_data0);
367
        the_ht_tunnel->history_memory_read_address0(history_memory_read_address0);//30
368
        the_ht_tunnel->history_memory_output0(history_memory_output0);
369
 
370
        the_ht_tunnel->history_memory_write1(history_memory_write1);
371
        the_ht_tunnel->history_memory_write_address1(history_memory_write_address1);
372
        the_ht_tunnel->history_memory_write_data1(history_memory_write_data1);
373
        the_ht_tunnel->history_memory_read_address1(history_memory_read_address1);
374
        the_ht_tunnel->history_memory_output1(history_memory_output1);
375
 
376
#endif
377
 
378
 
379
        the_ht_tunnel->memory_write0(memory_write0);
380
        the_ht_tunnel->memory_write_address_vc0(memory_write_address_vc0);
381
        the_ht_tunnel->memory_write_address_buffer0(memory_write_address_buffer0);
382
        the_ht_tunnel->memory_write_address_pos0(memory_write_address_pos0);//40
383
        the_ht_tunnel->memory_write_data0(memory_write_data0);
384
 
385
        the_ht_tunnel->memory_read_address_vc0[0](memory_read_address_vc0[0]);
386
        the_ht_tunnel->memory_read_address_buffer0[0](memory_read_address_buffer0[0]);
387
        the_ht_tunnel->memory_read_address_pos0[0](memory_read_address_pos0[0]);//50
388
        the_ht_tunnel->memory_output0[0](memory_output0[0]);
389
 
390
        the_ht_tunnel->memory_read_address_vc0[1](memory_read_address_vc0[1]);
391
        the_ht_tunnel->memory_read_address_buffer0[1](memory_read_address_buffer0[1]);
392
        the_ht_tunnel->memory_read_address_pos0[1](memory_read_address_pos0[1]);//50
393
        the_ht_tunnel->memory_output0[1](memory_output0[1]);
394
 
395
 
396
        the_ht_tunnel->memory_write1(memory_write1);
397
        the_ht_tunnel->memory_write_address_vc1(memory_write_address_vc1);
398
        the_ht_tunnel->memory_write_address_buffer1(memory_write_address_buffer1);
399
        the_ht_tunnel->memory_write_address_pos1(memory_write_address_pos1);
400
        the_ht_tunnel->memory_write_data1(memory_write_data1);
401
 
402
        the_ht_tunnel->memory_read_address_vc1[0](memory_read_address_vc1[0]);
403
        the_ht_tunnel->memory_read_address_buffer1[0](memory_read_address_buffer1[0]);
404
        the_ht_tunnel->memory_read_address_pos1[0](memory_read_address_pos1[0]);
405
        the_ht_tunnel->memory_output1[0](memory_output1[0]);
406
 
407
        the_ht_tunnel->memory_read_address_vc1[1](memory_read_address_vc1[1]);
408
        the_ht_tunnel->memory_read_address_buffer1[1](memory_read_address_buffer1[1]);
409
        the_ht_tunnel->memory_read_address_pos1[1](memory_read_address_pos1[1]);
410
        the_ht_tunnel->memory_output1[1](memory_output1[1]);
411
 
412
        the_ht_tunnel->ro0_command_packet_wr_data(ro0_command_packet_wr_data);
413
        the_ht_tunnel->ro0_command_packet_write(ro0_command_packet_write);
414
        the_ht_tunnel->ro0_command_packet_wr_addr(ro0_command_packet_wr_addr);
415
        the_ht_tunnel->ro0_command_packet_rd_addr[0](ro0_command_packet_rd_addr[0]);
416
        the_ht_tunnel->command_packet_rd_data_ro0[0](command_packet_rd_data_ro0[0]);
417
        the_ht_tunnel->ro0_command_packet_rd_addr[1](ro0_command_packet_rd_addr[1]);
418
        the_ht_tunnel->command_packet_rd_data_ro0[1](command_packet_rd_data_ro0[1]);
419
 
420
        the_ht_tunnel->ro1_command_packet_wr_data(ro1_command_packet_wr_data);
421
        the_ht_tunnel->ro1_command_packet_write(ro1_command_packet_write);
422
        the_ht_tunnel->ro1_command_packet_wr_addr(ro1_command_packet_wr_addr);
423
        the_ht_tunnel->ro1_command_packet_rd_addr[0](ro1_command_packet_rd_addr[0]);
424
        the_ht_tunnel->command_packet_rd_data_ro1[0](command_packet_rd_data_ro1[0]);
425
        the_ht_tunnel->ro1_command_packet_rd_addr[1](ro1_command_packet_rd_addr[1]);
426
        the_ht_tunnel->command_packet_rd_data_ro1[1](command_packet_rd_data_ro1[1]);
427
 
428
        the_ht_tunnel->ui_packet_usr(ui_packet_usr);
429
        the_ht_tunnel->ui_vc_usr(ui_vc_usr);
430
        the_ht_tunnel->ui_side_usr(ui_side_usr);
431
#ifdef ENABLE_DIRECTROUTE
432
        the_ht_tunnel->ui_directroute_usr(ui_directroute_usr);
433
#endif
434
        the_ht_tunnel->ui_eop_usr(ui_eop_usr);
435
        the_ht_tunnel->ui_available_usr(ui_available_usr);
436
        the_ht_tunnel->ui_output_64bits_usr(ui_output_64bits_usr);
437
        the_ht_tunnel->usr_consume_ui(usr_consume_ui);
438
        the_ht_tunnel->usr_packet_ui(usr_packet_ui);
439
        the_ht_tunnel->usr_available_ui(usr_available_ui);
440
        the_ht_tunnel->usr_side_ui(usr_side_ui);
441
        the_ht_tunnel->ui_freevc0_usr(ui_freevc0_usr);
442
        the_ht_tunnel->ui_freevc1_usr(ui_freevc1_usr);
443
        for(int n = 0; n < NbRegsBars; n++)
444
                the_ht_tunnel->csr_bar[n](csr_bar[n]);
445
        the_ht_tunnel->csr_unit_id(csr_unit_id);
446
        the_ht_tunnel->usr_receivedResponseError_csr(usr_receivedResponseError_csr);
447
 
448
        the_ht_tunnel->csr_read_addr_usr(csr_read_addr_usr);
449
        the_ht_tunnel->usr_read_data_csr(usr_read_data_csr);
450
        the_ht_tunnel->csr_write_usr(csr_write_usr);
451
        the_ht_tunnel->csr_write_addr_usr(csr_write_addr_usr);
452
        the_ht_tunnel->csr_write_data_usr(csr_write_data_usr);
453
        the_ht_tunnel->csr_write_mask_usr(csr_write_mask_usr);
454
 
455
 
456
        //------------------------------------------
457
        // start the simulation
458
        //------------------------------------------
459
 
460
        cout << "Starting simulation" << endl;
461
 
462
        sc_start(10);
463
 
464
        printf("end of simulation");
465
 
466
        delete the_ht_tunnel;
467
        return 0;
468
}
469
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.