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

Subversion Repositories wdsp

[/] [wdsp/] [trunk/] [rtl/] [verilog/] [minsoc/] [wb_conmax/] [trunk/] [rtl/] [verilog/] [wb_conmax_master_if.v] - Blame information for rev 7

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 7 parrado
/////////////////////////////////////////////////////////////////////
2
////                                                             ////
3
////  WISHBONE Connection Matrix Master Interface                ////
4
////                                                             ////
5
////                                                             ////
6
////  Author: Rudolf Usselmann                                   ////
7
////          rudi@asics.ws                                      ////
8
////                                                             ////
9
////                                                             ////
10
////  Downloaded from: http://www.opencores.org/cores/wb_conmax/ ////
11
////                                                             ////
12
/////////////////////////////////////////////////////////////////////
13
////                                                             ////
14
//// Copyright (C) 2000-2002 Rudolf Usselmann                    ////
15
////                         www.asics.ws                        ////
16
////                         rudi@asics.ws                       ////
17
////                                                             ////
18
//// This source file may be used and distributed without        ////
19
//// restriction provided that this copyright statement is not   ////
20
//// removed from the file and that any derivative work contains ////
21
//// the original copyright notice and the associated disclaimer.////
22
////                                                             ////
23
////     THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY     ////
24
//// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED   ////
25
//// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS   ////
26
//// FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR      ////
27
//// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,         ////
28
//// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES    ////
29
//// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE   ////
30
//// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR        ////
31
//// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF  ////
32
//// LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT  ////
33
//// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT  ////
34
//// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE         ////
35
//// POSSIBILITY OF SUCH DAMAGE.                                 ////
36
////                                                             ////
37
/////////////////////////////////////////////////////////////////////
38
 
39
//  CVS Log
40
//
41
//  $Id: wb_conmax_master_if.v,v 1.2 2002-10-03 05:40:07 rudi Exp $
42
//
43
//  $Date: 2002-10-03 05:40:07 $
44
//  $Revision: 1.2 $
45
//  $Author: rudi $
46
//  $Locker:  $
47
//  $State: Exp $
48
//
49
// Change History:
50
//               $Log: not supported by cvs2svn $
51
//               Revision 1.1.1.1  2001/10/19 11:01:41  rudi
52
//               WISHBONE CONMAX IP Core
53
//
54
//
55
//
56
//
57
//
58
 
59
`include "wb_conmax_defines.v"
60
 
61
module wb_conmax_master_if(
62
 
63
        clk_i, rst_i,
64
 
65
        // Master interface
66
        wb_data_i, wb_data_o, wb_addr_i, wb_sel_i, wb_we_i, wb_cyc_i,
67
        wb_stb_i, wb_ack_o, wb_err_o, wb_rty_o,
68
 
69
        // Slave 0 Interface
70
        s0_data_i, s0_data_o, s0_addr_o, s0_sel_o, s0_we_o, s0_cyc_o,
71
        s0_stb_o, s0_ack_i, s0_err_i, s0_rty_i,
72
 
73
        // Slave 1 Interface
74
        s1_data_i, s1_data_o, s1_addr_o, s1_sel_o, s1_we_o, s1_cyc_o,
75
        s1_stb_o, s1_ack_i, s1_err_i, s1_rty_i,
76
 
77
        // Slave 2 Interface
78
        s2_data_i, s2_data_o, s2_addr_o, s2_sel_o, s2_we_o, s2_cyc_o,
79
        s2_stb_o, s2_ack_i, s2_err_i, s2_rty_i,
80
 
81
        // Slave 3 Interface
82
        s3_data_i, s3_data_o, s3_addr_o, s3_sel_o, s3_we_o, s3_cyc_o,
83
        s3_stb_o, s3_ack_i, s3_err_i, s3_rty_i,
84
 
85
        // Slave 4 Interface
86
        s4_data_i, s4_data_o, s4_addr_o, s4_sel_o, s4_we_o, s4_cyc_o,
87
        s4_stb_o, s4_ack_i, s4_err_i, s4_rty_i,
88
 
89
        // Slave 5 Interface
90
        s5_data_i, s5_data_o, s5_addr_o, s5_sel_o, s5_we_o, s5_cyc_o,
91
        s5_stb_o, s5_ack_i, s5_err_i, s5_rty_i,
92
 
93
        // Slave 6 Interface
94
        s6_data_i, s6_data_o, s6_addr_o, s6_sel_o, s6_we_o, s6_cyc_o,
95
        s6_stb_o, s6_ack_i, s6_err_i, s6_rty_i,
96
 
97
        // Slave 7 Interface
98
        s7_data_i, s7_data_o, s7_addr_o, s7_sel_o, s7_we_o, s7_cyc_o,
99
        s7_stb_o, s7_ack_i, s7_err_i, s7_rty_i,
100
 
101
        // Slave 8 Interface
102
        s8_data_i, s8_data_o, s8_addr_o, s8_sel_o, s8_we_o, s8_cyc_o,
103
        s8_stb_o, s8_ack_i, s8_err_i, s8_rty_i,
104
 
105
        // Slave 9 Interface
106
        s9_data_i, s9_data_o, s9_addr_o, s9_sel_o, s9_we_o, s9_cyc_o,
107
        s9_stb_o, s9_ack_i, s9_err_i, s9_rty_i,
108
 
109
        // Slave 10 Interface
110
        s10_data_i, s10_data_o, s10_addr_o, s10_sel_o, s10_we_o, s10_cyc_o,
111
        s10_stb_o, s10_ack_i, s10_err_i, s10_rty_i,
112
 
113
        // Slave 11 Interface
114
        s11_data_i, s11_data_o, s11_addr_o, s11_sel_o, s11_we_o, s11_cyc_o,
115
        s11_stb_o, s11_ack_i, s11_err_i, s11_rty_i,
116
 
117
        // Slave 12 Interface
118
        s12_data_i, s12_data_o, s12_addr_o, s12_sel_o, s12_we_o, s12_cyc_o,
119
        s12_stb_o, s12_ack_i, s12_err_i, s12_rty_i,
120
 
121
        // Slave 13 Interface
122
        s13_data_i, s13_data_o, s13_addr_o, s13_sel_o, s13_we_o, s13_cyc_o,
123
        s13_stb_o, s13_ack_i, s13_err_i, s13_rty_i,
124
 
125
        // Slave 14 Interface
126
        s14_data_i, s14_data_o, s14_addr_o, s14_sel_o, s14_we_o, s14_cyc_o,
127
        s14_stb_o, s14_ack_i, s14_err_i, s14_rty_i,
128
 
129
        // Slave 15 Interface
130
        s15_data_i, s15_data_o, s15_addr_o, s15_sel_o, s15_we_o, s15_cyc_o,
131
        s15_stb_o, s15_ack_i, s15_err_i, s15_rty_i
132
        );
133
 
134
////////////////////////////////////////////////////////////////////
135
//
136
// Module Parameters
137
//
138
 
139
parameter               dw      = 32;           // Data bus Width
140
parameter               aw      = 32;           // Address bus Width
141
parameter               sw      = dw / 8;       // Number of Select Lines
142
 
143
////////////////////////////////////////////////////////////////////
144
//
145
// Module IOs
146
//
147
 
148
input                   clk_i, rst_i;
149
 
150
// Master Interface
151
input   [dw-1:0] wb_data_i;
152
output  [dw-1:0] wb_data_o;
153
input   [aw-1:0] wb_addr_i;
154
input   [sw-1:0] wb_sel_i;
155
input                   wb_we_i;
156
input                   wb_cyc_i;
157
input                   wb_stb_i;
158
output                  wb_ack_o;
159
output                  wb_err_o;
160
output                  wb_rty_o;
161
 
162
// Slave 0 Interface
163
input   [dw-1:0] s0_data_i;
164
output  [dw-1:0] s0_data_o;
165
output  [aw-1:0] s0_addr_o;
166
output  [sw-1:0] s0_sel_o;
167
output                  s0_we_o;
168
output                  s0_cyc_o;
169
output                  s0_stb_o;
170
input                   s0_ack_i;
171
input                   s0_err_i;
172
input                   s0_rty_i;
173
 
174
// Slave 1 Interface
175
input   [dw-1:0] s1_data_i;
176
output  [dw-1:0] s1_data_o;
177
output  [aw-1:0] s1_addr_o;
178
output  [sw-1:0] s1_sel_o;
179
output                  s1_we_o;
180
output                  s1_cyc_o;
181
output                  s1_stb_o;
182
input                   s1_ack_i;
183
input                   s1_err_i;
184
input                   s1_rty_i;
185
 
186
// Slave 2 Interface
187
input   [dw-1:0] s2_data_i;
188
output  [dw-1:0] s2_data_o;
189
output  [aw-1:0] s2_addr_o;
190
output  [sw-1:0] s2_sel_o;
191
output                  s2_we_o;
192
output                  s2_cyc_o;
193
output                  s2_stb_o;
194
input                   s2_ack_i;
195
input                   s2_err_i;
196
input                   s2_rty_i;
197
 
198
// Slave 3 Interface
199
input   [dw-1:0] s3_data_i;
200
output  [dw-1:0] s3_data_o;
201
output  [aw-1:0] s3_addr_o;
202
output  [sw-1:0] s3_sel_o;
203
output                  s3_we_o;
204
output                  s3_cyc_o;
205
output                  s3_stb_o;
206
input                   s3_ack_i;
207
input                   s3_err_i;
208
input                   s3_rty_i;
209
 
210
// Slave 4 Interface
211
input   [dw-1:0] s4_data_i;
212
output  [dw-1:0] s4_data_o;
213
output  [aw-1:0] s4_addr_o;
214
output  [sw-1:0] s4_sel_o;
215
output                  s4_we_o;
216
output                  s4_cyc_o;
217
output                  s4_stb_o;
218
input                   s4_ack_i;
219
input                   s4_err_i;
220
input                   s4_rty_i;
221
 
222
// Slave 5 Interface
223
input   [dw-1:0] s5_data_i;
224
output  [dw-1:0] s5_data_o;
225
output  [aw-1:0] s5_addr_o;
226
output  [sw-1:0] s5_sel_o;
227
output                  s5_we_o;
228
output                  s5_cyc_o;
229
output                  s5_stb_o;
230
input                   s5_ack_i;
231
input                   s5_err_i;
232
input                   s5_rty_i;
233
 
234
// Slave 6 Interface
235
input   [dw-1:0] s6_data_i;
236
output  [dw-1:0] s6_data_o;
237
output  [aw-1:0] s6_addr_o;
238
output  [sw-1:0] s6_sel_o;
239
output                  s6_we_o;
240
output                  s6_cyc_o;
241
output                  s6_stb_o;
242
input                   s6_ack_i;
243
input                   s6_err_i;
244
input                   s6_rty_i;
245
 
246
// Slave 7 Interface
247
input   [dw-1:0] s7_data_i;
248
output  [dw-1:0] s7_data_o;
249
output  [aw-1:0] s7_addr_o;
250
output  [sw-1:0] s7_sel_o;
251
output                  s7_we_o;
252
output                  s7_cyc_o;
253
output                  s7_stb_o;
254
input                   s7_ack_i;
255
input                   s7_err_i;
256
input                   s7_rty_i;
257
 
258
// Slave 8 Interface
259
input   [dw-1:0] s8_data_i;
260
output  [dw-1:0] s8_data_o;
261
output  [aw-1:0] s8_addr_o;
262
output  [sw-1:0] s8_sel_o;
263
output                  s8_we_o;
264
output                  s8_cyc_o;
265
output                  s8_stb_o;
266
input                   s8_ack_i;
267
input                   s8_err_i;
268
input                   s8_rty_i;
269
 
270
// Slave 9 Interface
271
input   [dw-1:0] s9_data_i;
272
output  [dw-1:0] s9_data_o;
273
output  [aw-1:0] s9_addr_o;
274
output  [sw-1:0] s9_sel_o;
275
output                  s9_we_o;
276
output                  s9_cyc_o;
277
output                  s9_stb_o;
278
input                   s9_ack_i;
279
input                   s9_err_i;
280
input                   s9_rty_i;
281
 
282
// Slave 10 Interface
283
input   [dw-1:0] s10_data_i;
284
output  [dw-1:0] s10_data_o;
285
output  [aw-1:0] s10_addr_o;
286
output  [sw-1:0] s10_sel_o;
287
output                  s10_we_o;
288
output                  s10_cyc_o;
289
output                  s10_stb_o;
290
input                   s10_ack_i;
291
input                   s10_err_i;
292
input                   s10_rty_i;
293
 
294
// Slave 11 Interface
295
input   [dw-1:0] s11_data_i;
296
output  [dw-1:0] s11_data_o;
297
output  [aw-1:0] s11_addr_o;
298
output  [sw-1:0] s11_sel_o;
299
output                  s11_we_o;
300
output                  s11_cyc_o;
301
output                  s11_stb_o;
302
input                   s11_ack_i;
303
input                   s11_err_i;
304
input                   s11_rty_i;
305
 
306
// Slave 12 Interface
307
input   [dw-1:0] s12_data_i;
308
output  [dw-1:0] s12_data_o;
309
output  [aw-1:0] s12_addr_o;
310
output  [sw-1:0] s12_sel_o;
311
output                  s12_we_o;
312
output                  s12_cyc_o;
313
output                  s12_stb_o;
314
input                   s12_ack_i;
315
input                   s12_err_i;
316
input                   s12_rty_i;
317
 
318
// Slave 13 Interface
319
input   [dw-1:0] s13_data_i;
320
output  [dw-1:0] s13_data_o;
321
output  [aw-1:0] s13_addr_o;
322
output  [sw-1:0] s13_sel_o;
323
output                  s13_we_o;
324
output                  s13_cyc_o;
325
output                  s13_stb_o;
326
input                   s13_ack_i;
327
input                   s13_err_i;
328
input                   s13_rty_i;
329
 
330
// Slave 14 Interface
331
input   [dw-1:0] s14_data_i;
332
output  [dw-1:0] s14_data_o;
333
output  [aw-1:0] s14_addr_o;
334
output  [sw-1:0] s14_sel_o;
335
output                  s14_we_o;
336
output                  s14_cyc_o;
337
output                  s14_stb_o;
338
input                   s14_ack_i;
339
input                   s14_err_i;
340
input                   s14_rty_i;
341
 
342
// Slave 15 Interface
343
input   [dw-1:0] s15_data_i;
344
output  [dw-1:0] s15_data_o;
345
output  [aw-1:0] s15_addr_o;
346
output  [sw-1:0] s15_sel_o;
347
output                  s15_we_o;
348
output                  s15_cyc_o;
349
output                  s15_stb_o;
350
input                   s15_ack_i;
351
input                   s15_err_i;
352
input                   s15_rty_i;
353
 
354
////////////////////////////////////////////////////////////////////
355
//
356
// Local Wires
357
//
358
 
359
reg     [dw-1:0] wb_data_o;
360
reg                     wb_ack_o;
361
reg                     wb_err_o;
362
reg                     wb_rty_o;
363
wire    [3:0]            slv_sel;
364
 
365
wire            s0_cyc_o_next, s1_cyc_o_next, s2_cyc_o_next, s3_cyc_o_next;
366
wire            s4_cyc_o_next, s5_cyc_o_next, s6_cyc_o_next, s7_cyc_o_next;
367
wire            s8_cyc_o_next, s9_cyc_o_next, s10_cyc_o_next, s11_cyc_o_next;
368
wire            s12_cyc_o_next, s13_cyc_o_next, s14_cyc_o_next, s15_cyc_o_next;
369
 
370
reg             s0_cyc_o, s1_cyc_o, s2_cyc_o, s3_cyc_o;
371
reg             s4_cyc_o, s5_cyc_o, s6_cyc_o, s7_cyc_o;
372
reg             s8_cyc_o, s9_cyc_o, s10_cyc_o, s11_cyc_o;
373
reg             s12_cyc_o, s13_cyc_o, s14_cyc_o, s15_cyc_o;
374
 
375
////////////////////////////////////////////////////////////////////
376
//
377
// Select logic
378
//
379
 
380
assign slv_sel = wb_addr_i[aw-1:aw-4];
381
 
382
////////////////////////////////////////////////////////////////////
383
//
384
// Address & Data Pass
385
//
386
 
387
assign s0_addr_o = wb_addr_i;
388
assign s1_addr_o = wb_addr_i;
389
assign s2_addr_o = wb_addr_i;
390
assign s3_addr_o = wb_addr_i;
391
assign s4_addr_o = wb_addr_i;
392
assign s5_addr_o = wb_addr_i;
393
assign s6_addr_o = wb_addr_i;
394
assign s7_addr_o = wb_addr_i;
395
assign s8_addr_o = wb_addr_i;
396
assign s9_addr_o = wb_addr_i;
397
assign s10_addr_o = wb_addr_i;
398
assign s11_addr_o = wb_addr_i;
399
assign s12_addr_o = wb_addr_i;
400
assign s13_addr_o = wb_addr_i;
401
assign s14_addr_o = wb_addr_i;
402
assign s15_addr_o = wb_addr_i;
403
 
404
assign s0_sel_o = wb_sel_i;
405
assign s1_sel_o = wb_sel_i;
406
assign s2_sel_o = wb_sel_i;
407
assign s3_sel_o = wb_sel_i;
408
assign s4_sel_o = wb_sel_i;
409
assign s5_sel_o = wb_sel_i;
410
assign s6_sel_o = wb_sel_i;
411
assign s7_sel_o = wb_sel_i;
412
assign s8_sel_o = wb_sel_i;
413
assign s9_sel_o = wb_sel_i;
414
assign s10_sel_o = wb_sel_i;
415
assign s11_sel_o = wb_sel_i;
416
assign s12_sel_o = wb_sel_i;
417
assign s13_sel_o = wb_sel_i;
418
assign s14_sel_o = wb_sel_i;
419
assign s15_sel_o = wb_sel_i;
420
 
421
assign s0_data_o = wb_data_i;
422
assign s1_data_o = wb_data_i;
423
assign s2_data_o = wb_data_i;
424
assign s3_data_o = wb_data_i;
425
assign s4_data_o = wb_data_i;
426
assign s5_data_o = wb_data_i;
427
assign s6_data_o = wb_data_i;
428
assign s7_data_o = wb_data_i;
429
assign s8_data_o = wb_data_i;
430
assign s9_data_o = wb_data_i;
431
assign s10_data_o = wb_data_i;
432
assign s11_data_o = wb_data_i;
433
assign s12_data_o = wb_data_i;
434
assign s13_data_o = wb_data_i;
435
assign s14_data_o = wb_data_i;
436
assign s15_data_o = wb_data_i;
437
 
438
always @(slv_sel or s0_data_i or s1_data_i or s2_data_i or s3_data_i or
439
        s4_data_i or s5_data_i or s6_data_i or s7_data_i or s8_data_i or
440
        s9_data_i or s10_data_i or s11_data_i or s12_data_i or
441
        s13_data_i or s14_data_i or s15_data_i)
442
        case(slv_sel)   // synopsys parallel_case
443
           4'd0:        wb_data_o = s0_data_i;
444
           4'd1:        wb_data_o = s1_data_i;
445
           4'd2:        wb_data_o = s2_data_i;
446
           4'd3:        wb_data_o = s3_data_i;
447
           4'd4:        wb_data_o = s4_data_i;
448
           4'd5:        wb_data_o = s5_data_i;
449
           4'd6:        wb_data_o = s6_data_i;
450
           4'd7:        wb_data_o = s7_data_i;
451
           4'd8:        wb_data_o = s8_data_i;
452
           4'd9:        wb_data_o = s9_data_i;
453
           4'd10:       wb_data_o = s10_data_i;
454
           4'd11:       wb_data_o = s11_data_i;
455
           4'd12:       wb_data_o = s12_data_i;
456
           4'd13:       wb_data_o = s13_data_i;
457
           4'd14:       wb_data_o = s14_data_i;
458
           4'd15:       wb_data_o = s15_data_i;
459
           default:     wb_data_o = {dw{1'bx}};
460
        endcase
461
 
462
////////////////////////////////////////////////////////////////////
463
//
464
// Control Signal Pass
465
//
466
 
467
assign s0_we_o = wb_we_i;
468
assign s1_we_o = wb_we_i;
469
assign s2_we_o = wb_we_i;
470
assign s3_we_o = wb_we_i;
471
assign s4_we_o = wb_we_i;
472
assign s5_we_o = wb_we_i;
473
assign s6_we_o = wb_we_i;
474
assign s7_we_o = wb_we_i;
475
assign s8_we_o = wb_we_i;
476
assign s9_we_o = wb_we_i;
477
assign s10_we_o = wb_we_i;
478
assign s11_we_o = wb_we_i;
479
assign s12_we_o = wb_we_i;
480
assign s13_we_o = wb_we_i;
481
assign s14_we_o = wb_we_i;
482
assign s15_we_o = wb_we_i;
483
 
484
assign s0_cyc_o_next = (wb_cyc_i & !wb_stb_i) ? s0_cyc_o : ((slv_sel==4'd0) ? wb_cyc_i : 1'b0);
485
assign s1_cyc_o_next = (wb_cyc_i & !wb_stb_i) ? s1_cyc_o : ((slv_sel==4'd1) ? wb_cyc_i : 1'b0);
486
assign s2_cyc_o_next = (wb_cyc_i & !wb_stb_i) ? s2_cyc_o : ((slv_sel==4'd2) ? wb_cyc_i : 1'b0);
487
assign s3_cyc_o_next = (wb_cyc_i & !wb_stb_i) ? s3_cyc_o : ((slv_sel==4'd3) ? wb_cyc_i : 1'b0);
488
assign s4_cyc_o_next = (wb_cyc_i & !wb_stb_i) ? s4_cyc_o : ((slv_sel==4'd4) ? wb_cyc_i : 1'b0);
489
assign s5_cyc_o_next = (wb_cyc_i & !wb_stb_i) ? s5_cyc_o : ((slv_sel==4'd5) ? wb_cyc_i : 1'b0);
490
assign s6_cyc_o_next = (wb_cyc_i & !wb_stb_i) ? s6_cyc_o : ((slv_sel==4'd6) ? wb_cyc_i : 1'b0);
491
assign s7_cyc_o_next = (wb_cyc_i & !wb_stb_i) ? s7_cyc_o : ((slv_sel==4'd7) ? wb_cyc_i : 1'b0);
492
assign s8_cyc_o_next = (wb_cyc_i & !wb_stb_i) ? s8_cyc_o : ((slv_sel==4'd8) ? wb_cyc_i : 1'b0);
493
assign s9_cyc_o_next = (wb_cyc_i & !wb_stb_i) ? s9_cyc_o : ((slv_sel==4'd9) ? wb_cyc_i : 1'b0);
494
assign s10_cyc_o_next = (wb_cyc_i & !wb_stb_i) ? s10_cyc_o : ((slv_sel==4'd10) ? wb_cyc_i : 1'b0);
495
assign s11_cyc_o_next = (wb_cyc_i & !wb_stb_i) ? s11_cyc_o : ((slv_sel==4'd11) ? wb_cyc_i : 1'b0);
496
assign s12_cyc_o_next = (wb_cyc_i & !wb_stb_i) ? s12_cyc_o : ((slv_sel==4'd12) ? wb_cyc_i : 1'b0);
497
assign s13_cyc_o_next = (wb_cyc_i & !wb_stb_i) ? s13_cyc_o : ((slv_sel==4'd13) ? wb_cyc_i : 1'b0);
498
assign s14_cyc_o_next = (wb_cyc_i & !wb_stb_i) ? s14_cyc_o : ((slv_sel==4'd14) ? wb_cyc_i : 1'b0);
499
assign s15_cyc_o_next = (wb_cyc_i & !wb_stb_i) ? s15_cyc_o : ((slv_sel==4'd15) ? wb_cyc_i : 1'b0);
500
 
501
always @(posedge clk_i or posedge rst_i)
502
        if(rst_i)       s0_cyc_o <= #1 1'b0;
503
        else            s0_cyc_o <= #1 s0_cyc_o_next;
504
 
505
always @(posedge clk_i or posedge rst_i)
506
        if(rst_i)       s1_cyc_o <= #1 1'b0;
507
        else            s1_cyc_o <= #1 s1_cyc_o_next;
508
 
509
always @(posedge clk_i or posedge rst_i)
510
        if(rst_i)       s2_cyc_o <= #1 1'b0;
511
        else            s2_cyc_o <= #1 s2_cyc_o_next;
512
 
513
always @(posedge clk_i or posedge rst_i)
514
        if(rst_i)       s3_cyc_o <= #1 1'b0;
515
        else            s3_cyc_o <= #1 s3_cyc_o_next;
516
 
517
always @(posedge clk_i or posedge rst_i)
518
        if(rst_i)       s4_cyc_o <= #1 1'b0;
519
        else            s4_cyc_o <= #1 s4_cyc_o_next;
520
 
521
always @(posedge clk_i or posedge rst_i)
522
        if(rst_i)       s5_cyc_o <= #1 1'b0;
523
        else            s5_cyc_o <= #1 s5_cyc_o_next;
524
 
525
always @(posedge clk_i or posedge rst_i)
526
        if(rst_i)       s6_cyc_o <= #1 1'b0;
527
        else            s6_cyc_o <= #1 s6_cyc_o_next;
528
 
529
always @(posedge clk_i or posedge rst_i)
530
        if(rst_i)       s7_cyc_o <= #1 1'b0;
531
        else            s7_cyc_o <= #1 s7_cyc_o_next;
532
 
533
always @(posedge clk_i or posedge rst_i)
534
        if(rst_i)       s8_cyc_o <= #1 1'b0;
535
        else            s8_cyc_o <= #1 s8_cyc_o_next;
536
 
537
always @(posedge clk_i or posedge rst_i)
538
        if(rst_i)       s9_cyc_o <= #1 1'b0;
539
        else            s9_cyc_o <= #1 s9_cyc_o_next;
540
 
541
always @(posedge clk_i or posedge rst_i)
542
        if(rst_i)       s10_cyc_o <= #1 1'b0;
543
        else            s10_cyc_o <= #1 s10_cyc_o_next;
544
 
545
always @(posedge clk_i or posedge rst_i)
546
        if(rst_i)       s11_cyc_o <= #1 1'b0;
547
        else            s11_cyc_o <= #1 s11_cyc_o_next;
548
 
549
always @(posedge clk_i or posedge rst_i)
550
        if(rst_i)       s12_cyc_o <= #1 1'b0;
551
        else            s12_cyc_o <= #1 s12_cyc_o_next;
552
 
553
always @(posedge clk_i or posedge rst_i)
554
        if(rst_i)       s13_cyc_o <= #1 1'b0;
555
        else            s13_cyc_o <= #1 s13_cyc_o_next;
556
 
557
always @(posedge clk_i or posedge rst_i)
558
        if(rst_i)       s14_cyc_o <= #1 1'b0;
559
        else            s14_cyc_o <= #1 s14_cyc_o_next;
560
 
561
always @(posedge clk_i or posedge rst_i)
562
        if(rst_i)       s15_cyc_o <= #1 1'b0;
563
        else            s15_cyc_o <= #1 s15_cyc_o_next;
564
 
565
assign s0_stb_o = (slv_sel==4'd0) ? wb_stb_i : 1'b0;
566
assign s1_stb_o = (slv_sel==4'd1) ? wb_stb_i : 1'b0;
567
assign s2_stb_o = (slv_sel==4'd2) ? wb_stb_i : 1'b0;
568
assign s3_stb_o = (slv_sel==4'd3) ? wb_stb_i : 1'b0;
569
assign s4_stb_o = (slv_sel==4'd4) ? wb_stb_i : 1'b0;
570
assign s5_stb_o = (slv_sel==4'd5) ? wb_stb_i : 1'b0;
571
assign s6_stb_o = (slv_sel==4'd6) ? wb_stb_i : 1'b0;
572
assign s7_stb_o = (slv_sel==4'd7) ? wb_stb_i : 1'b0;
573
assign s8_stb_o = (slv_sel==4'd8) ? wb_stb_i : 1'b0;
574
assign s9_stb_o = (slv_sel==4'd9) ? wb_stb_i : 1'b0;
575
assign s10_stb_o = (slv_sel==4'd10) ? wb_stb_i : 1'b0;
576
assign s11_stb_o = (slv_sel==4'd11) ? wb_stb_i : 1'b0;
577
assign s12_stb_o = (slv_sel==4'd12) ? wb_stb_i : 1'b0;
578
assign s13_stb_o = (slv_sel==4'd13) ? wb_stb_i : 1'b0;
579
assign s14_stb_o = (slv_sel==4'd14) ? wb_stb_i : 1'b0;
580
assign s15_stb_o = (slv_sel==4'd15) ? wb_stb_i : 1'b0;
581
 
582
always @(slv_sel or s0_ack_i or s1_ack_i or s2_ack_i or s3_ack_i or
583
        s4_ack_i or s5_ack_i or s6_ack_i or s7_ack_i or s8_ack_i or
584
        s9_ack_i or s10_ack_i or s11_ack_i or s12_ack_i or
585
        s13_ack_i or s14_ack_i or s15_ack_i)
586
        case(slv_sel)   // synopsys parallel_case
587
           4'd0:        wb_ack_o = s0_ack_i;
588
           4'd1:        wb_ack_o = s1_ack_i;
589
           4'd2:        wb_ack_o = s2_ack_i;
590
           4'd3:        wb_ack_o = s3_ack_i;
591
           4'd4:        wb_ack_o = s4_ack_i;
592
           4'd5:        wb_ack_o = s5_ack_i;
593
           4'd6:        wb_ack_o = s6_ack_i;
594
           4'd7:        wb_ack_o = s7_ack_i;
595
           4'd8:        wb_ack_o = s8_ack_i;
596
           4'd9:        wb_ack_o = s9_ack_i;
597
           4'd10:       wb_ack_o = s10_ack_i;
598
           4'd11:       wb_ack_o = s11_ack_i;
599
           4'd12:       wb_ack_o = s12_ack_i;
600
           4'd13:       wb_ack_o = s13_ack_i;
601
           4'd14:       wb_ack_o = s14_ack_i;
602
           4'd15:       wb_ack_o = s15_ack_i;
603
           default:     wb_ack_o = 1'b0;
604
        endcase
605
 
606
always @(slv_sel or s0_err_i or s1_err_i or s2_err_i or s3_err_i or
607
        s4_err_i or s5_err_i or s6_err_i or s7_err_i or s8_err_i or
608
        s9_err_i or s10_err_i or s11_err_i or s12_err_i or
609
        s13_err_i or s14_err_i or s15_err_i)
610
        case(slv_sel)   // synopsys parallel_case
611
           4'd0:        wb_err_o = s0_err_i;
612
           4'd1:        wb_err_o = s1_err_i;
613
           4'd2:        wb_err_o = s2_err_i;
614
           4'd3:        wb_err_o = s3_err_i;
615
           4'd4:        wb_err_o = s4_err_i;
616
           4'd5:        wb_err_o = s5_err_i;
617
           4'd6:        wb_err_o = s6_err_i;
618
           4'd7:        wb_err_o = s7_err_i;
619
           4'd8:        wb_err_o = s8_err_i;
620
           4'd9:        wb_err_o = s9_err_i;
621
           4'd10:       wb_err_o = s10_err_i;
622
           4'd11:       wb_err_o = s11_err_i;
623
           4'd12:       wb_err_o = s12_err_i;
624
           4'd13:       wb_err_o = s13_err_i;
625
           4'd14:       wb_err_o = s14_err_i;
626
           4'd15:       wb_err_o = s15_err_i;
627
           default:     wb_err_o = 1'b0;
628
        endcase
629
 
630
always @(slv_sel or s0_rty_i or s1_rty_i or s2_rty_i or s3_rty_i or
631
        s4_rty_i or s5_rty_i or s6_rty_i or s7_rty_i or s8_rty_i or
632
        s9_rty_i or s10_rty_i or s11_rty_i or s12_rty_i or
633
        s13_rty_i or s14_rty_i or s15_rty_i)
634
        case(slv_sel)   // synopsys parallel_case
635
           4'd0:        wb_rty_o = s0_rty_i;
636
           4'd1:        wb_rty_o = s1_rty_i;
637
           4'd2:        wb_rty_o = s2_rty_i;
638
           4'd3:        wb_rty_o = s3_rty_i;
639
           4'd4:        wb_rty_o = s4_rty_i;
640
           4'd5:        wb_rty_o = s5_rty_i;
641
           4'd6:        wb_rty_o = s6_rty_i;
642
           4'd7:        wb_rty_o = s7_rty_i;
643
           4'd8:        wb_rty_o = s8_rty_i;
644
           4'd9:        wb_rty_o = s9_rty_i;
645
           4'd10:       wb_rty_o = s10_rty_i;
646
           4'd11:       wb_rty_o = s11_rty_i;
647
           4'd12:       wb_rty_o = s12_rty_i;
648
           4'd13:       wb_rty_o = s13_rty_i;
649
           4'd14:       wb_rty_o = s14_rty_i;
650
           4'd15:       wb_rty_o = s15_rty_i;
651
           default:     wb_rty_o = 1'b0;
652
        endcase
653
 
654
endmodule
655
 
656
 

powered by: WebSVN 2.1.0

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