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

Subversion Repositories async_sdm_noc

[/] [async_sdm_noc/] [branches/] [clos_opt/] [vc/] [tb/] [rtwrapper.v] - Blame information for rev 67

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 44 wsong0210
/*
2
 Asynchronous SDM NoC
3
 (C)2011 Wei Song
4
 Advanced Processor Technologies Group
5
 Computer Science, the Univ. of Manchester, UK
6
 
7
 Authors:
8
 Wei Song     wsong83@gmail.com
9
 
10
 License: LGPL 3.0 or later
11
 
12
 The wrapper for the synthesized router.
13
 
14
 History:
15
 28/05/2009  Initial version. <wsong83@gmail.com>
16
 05/06/2011  Clean up for opensource. <wsong83@gmail.com>
17
 
18
*/
19
 
20
// the router structure definitions
21
`include "define.v"
22
 
23
module router_hdl(/*AUTOARG*/
24
   // Outputs
25
   sia, wia, nia, eia, lia, sic, wic, nic, eic, lic, so0, so1, so2,
26
   so3, wo0, wo1, wo2, wo3, no0, no1, no2, no3, eo0, eo1, eo2, eo3,
27
   lo0, lo1, lo2, lo3, soft, woft, noft, eoft, loft, sovc, wovc, novc,
28
   eovc, lovc, soca, woca, noca, eoca, loca,
29
   // Inputs
30
   si0, si1, si2, si3, wi0, wi1, wi2, wi3, ni0, ni1, ni2, ni3, ei0,
31
   ei1, ei2, ei3, li0, li1, li2, li3, sift, wift, nift, eift, lift,
32
   sivc, wivc, nivc, eivc, livc, sica, wica, nica, eica, lica, soa,
33 45 wsong0210
   woa, noa, eoa, loa, soc, woc, noc, eoc, loc, addrx, addry, rst_n
34 44 wsong0210
   );
35
 
36
   parameter VCN = 1;           // number of virtual circuits in each direction. When VCN == 1, it is a wormhole router
37
   parameter DW = 32;           // the datawidth of a single virtual circuit, the total data width of the router is DW*VCN
38
   parameter FT = 3;// the number of types of flits
39
   parameter SCN = DW/2;        // the number of 1-of-4 sub-channel in each virtual circuit
40
 
41
   input [SCN-1:0]    si0, si1, si2, si3;
42
   input [SCN-1:0]    wi0, wi1, wi2, wi3;
43
   input [SCN-1:0]    ni0, ni1, ni2, ni3;
44
   input [SCN-1:0]    ei0, ei1, ei2, ei3;
45
   input [SCN-1:0]    li0, li1, li2, li3;
46
   input [FT-1:0]     sift, wift, nift, eift, lift;
47
   input [VCN-1:0]    sivc, wivc, nivc, eivc, livc;
48
   output             sia, wia, nia, eia, lia;
49
   output [VCN-1:0]   sic, wic, nic, eic, lic;
50
   input [VCN-1:0]    sica, wica, nica, eica, lica;
51
 
52
   output [SCN-1:0]   so0, so1, so2, so3;
53
   output [SCN-1:0]   wo0, wo1, wo2, wo3;
54
   output [SCN-1:0]   no0, no1, no2, no3;
55
   output [SCN-1:0]   eo0, eo1, eo2, eo3;
56
   output [SCN-1:0]   lo0, lo1, lo2, lo3;
57
   output [FT-1:0]    soft, woft, noft, eoft, loft;
58
   output [VCN-1:0]   sovc, wovc, novc, eovc, lovc;
59
   input              soa, woa, noa, eoa, loa;
60
   input [VCN-1:0]    soc, woc, noc, eoc, loc;
61
   output [VCN-1:0]   soca, woca, noca, eoca, loca;
62
 
63
   input [7:0]         addrx, addry;
64
   input              rst_n;
65
 
66
   wire [SCN-1:0]     psi0, psi1, psi2, psi3;
67
   wire [SCN-1:0]     pwi0, pwi1, pwi2, pwi3;
68
   wire [SCN-1:0]     pni0, pni1, pni2, pni3;
69
   wire [SCN-1:0]     pei0, pei1, pei2, pei3;
70
   wire [SCN-1:0]     pli0, pli1, pli2, pli3;
71
   wire [FT-1:0]      psift, pwift, pnift, peift, plift;
72
   wire [VCN-1:0]     psivc, pwivc, pnivc, peivc, plivc;
73
   wire               psia, pwia, pnia, peia, plia;
74
   wire [VCN-1:0]     psic, pwic, pnic, peic, plic;
75
   wire [VCN-1:0]     psica, pwica, pnica, peica, plica;
76
 
77
   wire [SCN-1:0]     pso0, pso1, pso2, pso3;
78
   wire [SCN-1:0]     pwo0, pwo1, pwo2, pwo3;
79
   wire [SCN-1:0]     pno0, pno1, pno2, pno3;
80
   wire [SCN-1:0]     peo0, peo1, peo2, peo3;
81
   wire [SCN-1:0]     plo0, plo1, plo2, plo3;
82
   wire [FT-1:0]      psoft, pwoft, pnoft, peoft, ploft;
83
   wire [VCN-1:0]     psovc, pwovc, pnovc, peovc, plovc;
84
   wire               psoa, pwoa, pnoa, peoa, ploa;
85
   wire [VCN-1:0]     psoc, pwoc, pnoc, peoc, ploc;
86
   wire [VCN-1:0]     psoca, pwoca, pnoca, peoca, ploca;
87
 
88
   wire [7:0]          paddrx, paddry;
89
   wire               prst_n;
90
 
91
   router RT (
92
                                 .sia      ( psia    ),
93
                                 .wia      ( pwia    ),
94
                                 .nia      ( pnia    ),
95
                                 .eia      ( peia    ),
96
                                 .lia      ( plia    ),
97
                                 .sic      ( psic    ),
98
                                 .wic      ( pwic    ),
99
                                 .nic      ( pnic    ),
100
                                 .eic      ( peic    ),
101
                                 .lic      ( plic    ),
102
                                 .so0      ( pso0    ),
103
                                 .so1      ( pso1    ),
104
                                 .so2      ( pso2    ),
105
                                 .so3      ( pso3    ),
106
                                 .wo0      ( pwo0    ),
107
                                 .wo1      ( pwo1    ),
108
                                 .wo2      ( pwo2    ),
109
                                 .wo3      ( pwo3    ),
110
                                 .no0      ( pno0    ),
111
                                 .no1      ( pno1    ),
112
                                 .no2      ( pno2    ),
113
                                 .no3      ( pno3    ),
114
                                 .eo0      ( peo0    ),
115
                                 .eo1      ( peo1    ),
116
                                 .eo2      ( peo2    ),
117
                                 .eo3      ( peo3    ),
118
                                 .lo0      ( plo0    ),
119
                                 .lo1      ( plo1    ),
120
                                 .lo2      ( plo2    ),
121
                                 .lo3      ( plo3    ),
122
                                 .soft     ( psoft   ),
123
                                 .woft     ( pwoft   ),
124
                                 .noft     ( pnoft   ),
125
                                 .eoft     ( peoft   ),
126
                                 .loft     ( ploft   ),
127
                                 .sovc     ( psovc   ),
128
                                 .wovc     ( pwovc   ),
129
                                 .novc     ( pnovc   ),
130
                                 .eovc     ( peovc   ),
131
                                 .lovc     ( plovc   ),
132
                                 .soca     ( psoca   ),
133
                                 .woca     ( pwoca   ),
134
                                 .noca     ( pnoca   ),
135
                                 .eoca     ( peoca   ),
136
                                 .loca     ( ploca   ),
137
                                 .si0      ( psi0    ),
138
                                 .si1      ( psi1    ),
139
                                 .si2      ( psi2    ),
140
                                 .si3      ( psi3    ),
141
                                 .wi0      ( pwi0    ),
142
                                 .wi1      ( pwi1    ),
143
                                 .wi2      ( pwi2    ),
144
                                 .wi3      ( pwi3    ),
145
                                 .ni0      ( pni0    ),
146
                                 .ni1      ( pni1    ),
147
                                 .ni2      ( pni2    ),
148
                                 .ni3      ( pni3    ),
149
                                 .ei0      ( pei0    ),
150
                                 .ei1      ( pei1    ),
151
                                 .ei2      ( pei2    ),
152
                                 .ei3      ( pei3    ),
153
                                 .li0      ( pli0    ),
154
                                 .li1      ( pli1    ),
155
                                 .li2      ( pli2    ),
156
                                 .li3      ( pli3    ),
157
                                 .sift     ( psift   ),
158
                                 .wift     ( pwift   ),
159
                                 .nift     ( pnift   ),
160
                                 .eift     ( peift   ),
161
                                 .lift     ( plift   ),
162
                                 .sivc     ( psivc   ),
163
                                 .wivc     ( pwivc   ),
164
                                 .nivc     ( pnivc   ),
165
                                 .eivc     ( peivc   ),
166
                                 .livc     ( plivc   ),
167
                                 .sica     ( psica   ),
168
                                 .wica     ( pwica   ),
169
                                 .nica     ( pnica   ),
170
                                 .eica     ( peica   ),
171
                                 .lica     ( plica   ),
172
                                 .soa      ( psoa    ),
173
                                 .woa      ( pwoa    ),
174
                                 .noa      ( pnoa    ),
175
                                 .eoa      ( peoa    ),
176
                                 .loa      ( ploa    ),
177
                                 .soc      ( psoc    ),
178
                                 .woc      ( pwoc    ),
179
                                 .noc      ( pnoc    ),
180
                                 .eoc      ( peoc    ),
181
                                 .loc      ( ploc    ),
182
                                 .addrx    ( paddrx  ),
183
                                 .addry    ( paddry  ),
184
                                 .rst_n    ( prst_n  )
185
                                 );
186
 
187
   assign sia      = psia   ;
188
   assign wia      = pwia   ;
189
   assign nia      = pnia   ;
190
   assign eia      = peia   ;
191
   assign lia      = plia   ;
192
   assign sic      = psic   ;
193
   assign wic      = pwic   ;
194
   assign nic      = pnic   ;
195
   assign eic      = peic   ;
196
   assign lic      = plic   ;
197
   assign so0      = pso0   ;
198
   assign so1      = pso1   ;
199
   assign so2      = pso2   ;
200
   assign so3      = pso3   ;
201
   assign wo0      = pwo0   ;
202
   assign wo1      = pwo1   ;
203
   assign wo2      = pwo2   ;
204
   assign wo3      = pwo3   ;
205
   assign no0      = pno0   ;
206
   assign no1      = pno1   ;
207
   assign no2      = pno2   ;
208
   assign no3      = pno3   ;
209
   assign eo0      = peo0   ;
210
   assign eo1      = peo1   ;
211
   assign eo2      = peo2   ;
212
   assign eo3      = peo3   ;
213
   assign lo0      = plo0   ;
214
   assign lo1      = plo1   ;
215
   assign lo2      = plo2   ;
216
   assign lo3      = plo3   ;
217
   assign soft     = psoft  ;
218
   assign woft     = pwoft  ;
219
   assign noft     = pnoft  ;
220
   assign eoft     = peoft  ;
221
   assign loft     = ploft  ;
222
   assign sovc     = psovc  ;
223
   assign wovc     = pwovc  ;
224
   assign novc     = pnovc  ;
225
   assign eovc     = peovc  ;
226
   assign lovc     = plovc  ;
227
   assign soca     = psoca  ;
228
   assign woca     = pwoca  ;
229
   assign noca     = pnoca  ;
230
   assign eoca     = peoca  ;
231
   assign loca     = ploca  ;
232
   assign psi0     = si0    ;
233
   assign psi1     = si1    ;
234
   assign psi2     = si2    ;
235
   assign psi3     = si3    ;
236
   assign pwi0     = wi0    ;
237
   assign pwi1     = wi1    ;
238
   assign pwi2     = wi2    ;
239
   assign pwi3     = wi3    ;
240
   assign pni0     = ni0    ;
241
   assign pni1     = ni1    ;
242
   assign pni2     = ni2    ;
243
   assign pni3     = ni3    ;
244
   assign pei0     = ei0    ;
245
   assign pei1     = ei1    ;
246
   assign pei2     = ei2    ;
247
   assign pei3     = ei3    ;
248
   assign pli0     = li0    ;
249
   assign pli1     = li1    ;
250
   assign pli2     = li2    ;
251
   assign pli3     = li3    ;
252
   assign psift    = sift   ;
253
   assign pwift    = wift   ;
254
   assign pnift    = nift   ;
255
   assign peift    = eift   ;
256
   assign plift    = lift   ;
257
   assign psivc    = sivc   ;
258
   assign pwivc    = wivc   ;
259
   assign pnivc    = nivc   ;
260
   assign peivc    = eivc   ;
261
   assign plivc    = livc   ;
262
   assign psica    = sica   ;
263
   assign pwica    = wica   ;
264
   assign pnica    = nica   ;
265
   assign peica    = eica   ;
266
   assign plica    = lica   ;
267
   assign psoa     = soa    ;
268
   assign pwoa     = woa    ;
269
   assign pnoa     = noa    ;
270
   assign peoa     = eoa    ;
271
   assign ploa     = loa    ;
272
   assign psoc     = soc    ;
273
   assign pwoc     = woc    ;
274
   assign pnoc     = noc    ;
275
   assign peoc     = eoc    ;
276
   assign ploc     = loc    ;
277
   assign paddrx   = addrx  ;
278
   assign paddry   = addry  ;
279
   assign prst_n   = rst_n  ;
280
 
281
   initial $sdf_annotate("../syn/file/router.sdf", RT);
282
 
283
endmodule

powered by: WebSVN 2.1.0

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