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

Subversion Repositories async_sdm_noc

[/] [async_sdm_noc/] [trunk/] [sdm/] [tb/] [rtwrapper.v] - Blame information for rev 56

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

Line No. Rev Author Line
1 32 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
 30/05/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
   so0, so1, so2, so3, wo0, wo1, wo2, wo3, no0, no1, no2, no3, eo0,
26
   eo1, eo2, eo3, lo0, lo1, lo2, lo3, so4, wo4, no4, eo4, lo4, sia,
27
   wia, nia, eia, lia,
28
   // Inputs
29
   si0, si1, si2, si3, wi0, wi1, wi2, wi3, ni0, ni1, ni2, ni3, ei0,
30
   ei1, ei2, ei3, li0, li1, li2, li3, si4, wi4, ni4, ei4, li4, soa,
31
   woa, noa, eoa, loa, addrx, addry, rst_n
32
   );
33
 
34
   parameter VCN = 1;           // number of virtual circuits in each direction. When VCN == 1, it is a wormhole router
35
   parameter DW = 32;           // the datawidth of a single virtual circuit, the total data width of the router is DW*VCN
36
   parameter SCN = DW/2;        // the number of 1-of-4 sub-channel in each virtual circuit
37
 
38
   input [VCN*SCN-1:0]      si0, si1, si2, si3;
39
   input [VCN*SCN-1:0]       wi0, wi1, wi2, wi3;
40
   input [VCN*SCN-1:0]       ni0, ni1, ni2, ni3;
41
   input [VCN*SCN-1:0]       ei0, ei1, ei2, ei3;
42
   input [VCN*SCN-1:0]       li0, li1, li2, li3;
43
   output [VCN*SCN-1:0]     so0, so1, so2, so3;
44
   output [VCN*SCN-1:0]     wo0, wo1, wo2, wo3;
45
   output [VCN*SCN-1:0]     no0, no1, no2, no3;
46
   output [VCN*SCN-1:0]     eo0, eo1, eo2, eo3;
47
   output [VCN*SCN-1:0]     lo0, lo1, lo2, lo3;
48
   // eof bits and ack lines
49
`ifdef ENABLE_CHANNEL_SLICING
50
   input [VCN*SCN-1:0]       si4, wi4, ni4, ei4, li4;
51
   output [VCN*SCN-1:0]     so4, wo4, no4, eo4, lo4;
52
   output [VCN*SCN-1:0]     sia, wia, nia, eia, lia;
53
   input [VCN*SCN-1:0]       soa, woa, noa, eoa, loa;
54
`else
55
   input [VCN-1:0]            si4, wi4, ni4, ei4, li4;
56
   output [VCN-1:0]           so4, wo4, no4, eo4, lo4;
57
   output [VCN-1:0]           sia, wia, nia, eia, lia;
58
   input [VCN-1:0]            soa, woa, noa, eoa, loa;
59
`endif // !`ifdef ENABLE_CHANNEL_SLICING
60
 
61
   input [7:0]               addrx, addry;
62
   input                    rst_n;
63
 
64
   wire [VCN*SCN-1:0]        psi0, psi1, psi2, psi3;
65
   wire [VCN*SCN-1:0]        pwi0, pwi1, pwi2, pwi3;
66
   wire [VCN*SCN-1:0]        pni0, pni1, pni2, pni3;
67
   wire [VCN*SCN-1:0]        pei0, pei1, pei2, pei3;
68
   wire [VCN*SCN-1:0]        pli0, pli1, pli2, pli3;
69
   wire [VCN*SCN-1:0]        pso0, pso1, pso2, pso3;
70
   wire [VCN*SCN-1:0]        pwo0, pwo1, pwo2, pwo3;
71
   wire [VCN*SCN-1:0]        pno0, pno1, pno2, pno3;
72
   wire [VCN*SCN-1:0]        peo0, peo1, peo2, peo3;
73
   wire [VCN*SCN-1:0]        plo0, plo1, plo2, plo3;
74
   // eof bits and ack lines
75
`ifdef ENABLE_CHANNEL_SLICING
76
   wire [VCN*SCN-1:0]        psi4, pwi4, pni4, pei4, pli4;
77
   wire [VCN*SCN-1:0]        pso4, pwo4, pno4, peo4, plo4;
78
   wire [VCN*SCN-1:0]        psia, pwia, pnia, peia, plia;
79
   wire [VCN*SCN-1:0]        psoa, pwoa, pnoa, peoa, ploa;
80
`else
81
   wire [VCN-1:0]            psi4, pwi4, pni4, pei4, pli4;
82
   wire [VCN-1:0]            pso4, pwo4, pno4, peo4, plo4;
83
   wire [VCN-1:0]            psia, pwia, pnia, peia, plia;
84
   wire [VCN-1:0]            psoa, pwoa, pnoa, peoa, ploa;
85
`endif // !`ifdef ENABLE_CHANNEL_SLICING
86
 
87
   wire [7:0]                paddrx, paddry;
88
   wire                     prst_n;
89
 
90 33 wsong0210
   router RT (
91
               .sia      ( psia    ),
92
               .wia      ( pwia    ),
93
               .nia      ( pnia    ),
94
               .eia      ( peia    ),
95
               .lia      ( plia    ),
96
               .so0      ( pso0    ),
97
               .so1      ( pso1    ),
98
               .so2      ( pso2    ),
99
               .so3      ( pso3    ),
100
               .wo0      ( pwo0    ),
101
               .wo1      ( pwo1    ),
102
               .wo2      ( pwo2    ),
103
               .wo3      ( pwo3    ),
104
               .no0      ( pno0    ),
105
               .no1      ( pno1    ),
106
               .no2      ( pno2    ),
107
               .no3      ( pno3    ),
108
               .eo0      ( peo0    ),
109
               .eo1      ( peo1    ),
110
               .eo2      ( peo2    ),
111
               .eo3      ( peo3    ),
112
               .lo0      ( plo0    ),
113
               .lo1      ( plo1    ),
114
               .lo2      ( plo2    ),
115
               .lo3      ( plo3    ),
116
               .so4      ( pso4    ),
117
               .wo4      ( pwo4    ),
118
               .no4      ( pno4    ),
119
               .eo4      ( peo4    ),
120
               .lo4      ( plo4    ),
121
               .si0      ( psi0    ),
122
               .si1      ( psi1    ),
123
               .si2      ( psi2    ),
124
               .si3      ( psi3    ),
125
               .wi0      ( pwi0    ),
126
               .wi1      ( pwi1    ),
127
               .wi2      ( pwi2    ),
128
               .wi3      ( pwi3    ),
129
               .ni0      ( pni0    ),
130
               .ni1      ( pni1    ),
131
               .ni2      ( pni2    ),
132
               .ni3      ( pni3    ),
133
               .ei0      ( pei0    ),
134
               .ei1      ( pei1    ),
135
               .ei2      ( pei2    ),
136
               .ei3      ( pei3    ),
137
               .li0      ( pli0    ),
138
               .li1      ( pli1    ),
139
               .li2      ( pli2    ),
140
               .li3      ( pli3    ),
141
               .si4      ( psi4    ),
142
               .wi4      ( pwi4    ),
143
               .ni4      ( pni4    ),
144
               .ei4      ( pei4    ),
145
               .li4      ( pli4    ),
146
               .soa      ( psoa    ),
147
               .woa      ( pwoa    ),
148
               .noa      ( pnoa    ),
149
               .eoa      ( peoa    ),
150
               .loa      ( ploa    ),
151
               .addrx    ( paddrx  ),
152
               .addry    ( paddry  ),
153
               .rst_n    ( prst_n  )
154
               );
155 32 wsong0210
 
156
   assign sia      = psia   ;
157
   assign wia      = pwia   ;
158
   assign nia      = pnia   ;
159
   assign eia      = peia   ;
160
   assign lia      = plia   ;
161
   assign so0      = pso0   ;
162
   assign so1      = pso1   ;
163
   assign so2      = pso2   ;
164
   assign so3      = pso3   ;
165
   assign wo0      = pwo0   ;
166
   assign wo1      = pwo1   ;
167
   assign wo2      = pwo2   ;
168
   assign wo3      = pwo3   ;
169
   assign no0      = pno0   ;
170
   assign no1      = pno1   ;
171
   assign no2      = pno2   ;
172
   assign no3      = pno3   ;
173
   assign eo0      = peo0   ;
174
   assign eo1      = peo1   ;
175
   assign eo2      = peo2   ;
176
   assign eo3      = peo3   ;
177
   assign lo0      = plo0   ;
178
   assign lo1      = plo1   ;
179
   assign lo2      = plo2   ;
180
   assign lo3      = plo3   ;
181
   assign so4      = pso4   ;
182
   assign wo4      = pwo4   ;
183
   assign no4      = pno4   ;
184
   assign eo4      = peo4   ;
185
   assign lo4      = plo4   ;
186
   assign psi0     = si0    ;
187
   assign psi1     = si1    ;
188
   assign psi2     = si2    ;
189
   assign psi3     = si3    ;
190
   assign pwi0     = wi0    ;
191
   assign pwi1     = wi1    ;
192
   assign pwi2     = wi2    ;
193
   assign pwi3     = wi3    ;
194
   assign pni0     = ni0    ;
195
   assign pni1     = ni1    ;
196
   assign pni2     = ni2    ;
197
   assign pni3     = ni3    ;
198
   assign pei0     = ei0    ;
199
   assign pei1     = ei1    ;
200
   assign pei2     = ei2    ;
201
   assign pei3     = ei3    ;
202
   assign pli0     = li0    ;
203
   assign pli1     = li1    ;
204
   assign pli2     = li2    ;
205
   assign pli3     = li3    ;
206
   assign psi4     = si4    ;
207
   assign pwi4     = wi4    ;
208
   assign pni4     = ni4    ;
209
   assign pei4     = ei4    ;
210
   assign pli4     = li4    ;
211
   assign psoa     = soa    ;
212
   assign pwoa     = woa    ;
213
   assign pnoa     = noa    ;
214
   assign peoa     = eoa    ;
215
   assign ploa     = loa    ;
216
   assign paddrx   = addrx  ;
217
   assign paddry   = addry  ;
218
   assign prst_n   = rst_n  ;
219
 
220
   initial $sdf_annotate("../syn/file/router.sdf", RT);
221
 
222
endmodule

powered by: WebSVN 2.1.0

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