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

Subversion Repositories mem_ctrl

[/] [mem_ctrl/] [trunk/] [rtl/] [verilog/] [mc_rf.v] - Blame information for rev 8

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

Line No. Rev Author Line
1 4 rudi
/////////////////////////////////////////////////////////////////////
2
////                                                             ////
3
////  WISHBONE Memory Controller Register File                   ////
4
////                                                             ////
5
////                                                             ////
6
////  Author: Rudolf Usselmann                                   ////
7
////          rudi@asics.ws                                      ////
8
////                                                             ////
9
////                                                             ////
10
////  Downloaded from: http://www.opencores.org/cores/mem_ctrl/  ////
11
////                                                             ////
12
/////////////////////////////////////////////////////////////////////
13
////                                                             ////
14
//// Copyright (C) 2000 Rudolf Usselmann                         ////
15
////                    rudi@asics.ws                            ////
16
////                                                             ////
17
//// This source file may be used and distributed without        ////
18
//// restriction provided that this copyright statement is not   ////
19
//// removed from the file and that any derivative work contains ////
20
//// the original copyright notice and the associated disclaimer.////
21
////                                                             ////
22
////     THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY     ////
23
//// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED   ////
24
//// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS   ////
25
//// FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR      ////
26
//// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,         ////
27
//// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES    ////
28
//// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE   ////
29
//// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR        ////
30
//// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF  ////
31
//// LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT  ////
32
//// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT  ////
33
//// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE         ////
34
//// POSSIBILITY OF SUCH DAMAGE.                                 ////
35
////                                                             ////
36
/////////////////////////////////////////////////////////////////////
37
 
38
//  CVS Log
39
//
40 8 rudi
//  $Id: mc_rf.v,v 1.2 2001-08-10 08:16:21 rudi Exp $
41 4 rudi
//
42 8 rudi
//  $Date: 2001-08-10 08:16:21 $
43
//  $Revision: 1.2 $
44 4 rudi
//  $Author: rudi $
45
//  $Locker:  $
46
//  $State: Exp $
47
//
48
// Change History:
49
//               $Log: not supported by cvs2svn $
50 8 rudi
//               Revision 1.1  2001/07/29 07:34:41  rudi
51
//
52
//
53
//               1) Changed Directory Structure
54
//               2) Fixed several minor bugs
55
//
56 4 rudi
//               Revision 1.3  2001/06/12 15:19:49  rudi
57
//
58
//
59
//               Minor changes after running lint, and a small bug fix reading csr and ba_mask registers.
60
//
61
//               Revision 1.2  2001/06/03 11:37:17  rudi
62
//
63
//
64
//               1) Fixed Chip Select Mask Register
65
//                      - Power On Value is now all ones
66
//                      - Comparison Logic is now correct
67
//
68
//               2) All resets are now asynchronous
69
//
70
//               3) Converted Power On Delay to an configurable item
71
//
72
//               4) Added reset to Chip Select Output Registers
73
//
74
//               5) Forcing all outputs to Hi-Z state during reset
75
//
76
//               Revision 1.1.1.1  2001/05/13 09:39:42  rudi
77
//               Created Directory Structure
78
//
79
//
80
//
81
//
82
 
83
`include "mc_defines.v"
84
 
85
module mc_rf(clk, rst,
86
 
87
        wb_data_i, rf_dout, wb_addr_i, wb_we_i, wb_cyc_i,
88
        wb_stb_i, wb_ack_o, wb_err_o, wp_err,
89
 
90
        csc, tms, poc,
91
        sp_csc, sp_tms, cs,
92
        mc_data_i, mc_sts, mc_vpen, fs,
93
 
94
        cs_le, cs_need_rfr, ref_int, rfr_ps_val, init_req,
95
        init_ack, lmr_req, lmr_ack,
96
        spec_req_cs
97
        );
98
 
99
input           clk, rst;
100
 
101
// --------------------------------------
102
// WISHBONE INTERFACE 
103
 
104
// Slave Interface
105
input   [31:0]   wb_data_i;
106
output  [31:0]   rf_dout;
107
input   [31:0]   wb_addr_i;
108
input           wb_we_i;
109
input           wb_cyc_i;
110
input           wb_stb_i;
111
output          wb_ack_o;
112
output          wb_err_o;
113
output          wp_err;
114
 
115
// --------------------------------------
116
// Misc Signals
117
output  [31:0]   csc;
118
output  [31:0]   tms;
119
output  [31:0]   poc;
120
output  [31:0]   sp_csc;
121
output  [31:0]   sp_tms;
122
output  [7:0]    cs;
123
 
124
input   [31:0]   mc_data_i;
125
input           mc_sts;
126
output          mc_vpen;
127
output          fs;
128
 
129
input           cs_le;
130
 
131
output  [7:0]    cs_need_rfr;    // Indicates which chip selects have SDRAM
132
                                // attached and need to be refreshed
133
output  [2:0]    ref_int;        // Refresh Interval
134
output  [7:0]    rfr_ps_val;
135
 
136
output          init_req;
137
input           init_ack;
138
output          lmr_req;
139
input           lmr_ack;
140
 
141
output  [7:0]    spec_req_cs;
142
 
143
////////////////////////////////////////////////////////////////////
144
//
145
// Local Wires
146
//
147
 
148
reg             wb_ack_o;
149
reg             ack_r;
150
 
151
reg     [31:0]   csc;
152
reg     [31:0]   tms;
153
reg     [31:0]   sp_csc;
154
reg     [31:0]   sp_tms;
155
reg     [31:0]   rf_dout;
156
reg     [7:0]    cs;
157
 
158
wire            rf_we;
159
wire    [31:0]   csr;
160
reg     [10:0]   csr_r;
161
reg     [7:0]    csr_r2;
162
reg     [31:0]   poc;
163
 
164
wire    [31:0]   csc_mask;
165
reg     [10:0]   csc_mask_r;
166
 
167
wire    [31:0]   csc0, tms0;
168
wire    [31:0]   csc1, tms1;
169
wire    [31:0]   csc2, tms2;
170
wire    [31:0]   csc3, tms3;
171
wire    [31:0]   csc4, tms4;
172
wire    [31:0]   csc5, tms5;
173
wire    [31:0]   csc6, tms6;
174
wire    [31:0]   csc7, tms7;
175
 
176
wire            cs0, cs1, cs2, cs3;
177
wire            cs4, cs5, cs6, cs7;
178
wire            wp_err0, wp_err1, wp_err2, wp_err3;
179
wire            wp_err4, wp_err5, wp_err6, wp_err7;
180
reg             wp_err;
181
 
182
 
183
wire            lmr_req7, lmr_req6, lmr_req5, lmr_req4;
184
wire            lmr_req3, lmr_req2, lmr_req1, lmr_req0;
185
wire            lmr_ack7, lmr_ack6, lmr_ack5, lmr_ack4;
186
wire            lmr_ack3, lmr_ack2, lmr_ack1, lmr_ack0;
187
 
188
wire            init_req7, init_req6, init_req5, init_req4;
189
wire            init_req3, init_req2, init_req1, init_req0;
190
wire            init_ack7, init_ack6, init_ack5, init_ack4;
191
wire            init_ack3, init_ack2, init_ack1, init_ack0;
192
 
193
reg             init_ack_r;
194
wire            init_ack_fe;
195
reg             lmr_ack_r;
196
wire            lmr_ack_fe;
197
wire    [7:0]    spec_req_cs_t;
198
wire    [7:0]    spec_req_cs_d;
199
reg     [7:0]    spec_req_cs;
200
reg             init_req, lmr_req;
201
wire    [2:0]    cs_sel;
202
wire    [2:0]    sp_cs_sel;
203
reg             sreq_cs_le;
204
 
205
// Aliases
206
assign csr = {csr_r2, 8'h0, 5'h0, csr_r};
207
assign csc_mask = {21'h0, csc_mask_r};
208
 
209
////////////////////////////////////////////////////////////////////
210
//
211
// WISHBONE Register Read logic
212
//
213
 
214
assign wb_err_o = 1'b0;
215
 
216
always @(posedge clk)
217 8 rudi
        if(wb_cyc_i & wb_stb_i & `MC_REG_SEL & !wb_we_i)
218 4 rudi
        case(wb_addr_i[6:2])            // synopsys full_case parallel_case
219
           5'h0:        rf_dout <= #1 csr;
220
           5'h1:        rf_dout <= #1 poc;
221
           5'h2:        rf_dout <= #1 csc_mask;
222
 
223
           5'h4:        rf_dout <= #1 csc0;
224
           5'h5:        rf_dout <= #1 tms0;
225
           5'h6:        rf_dout <= #1 csc1;
226
           5'h7:        rf_dout <= #1 tms1;
227
           5'h8:        rf_dout <= #1 csc2;
228
           5'h9:        rf_dout <= #1 tms2;
229
           5'h10:       rf_dout <= #1 csc3;
230
           5'h11:       rf_dout <= #1 tms3;
231
           5'h12:       rf_dout <= #1 csc4;
232
           5'h13:       rf_dout <= #1 tms4;
233
           5'h14:       rf_dout <= #1 csc5;
234
           5'h15:       rf_dout <= #1 tms5;
235
           5'h16:       rf_dout <= #1 csc6;
236
           5'h17:       rf_dout <= #1 tms6;
237
           5'h18:       rf_dout <= #1 csc7;
238
           5'h19:       rf_dout <= #1 tms7;
239
        endcase
240
 
241
////////////////////////////////////////////////////////////////////
242
//
243
// WISHBONE Register Write logic
244
//
245
 
246 8 rudi
assign rf_we = `MC_REG_SEL & wb_we_i & wb_cyc_i & wb_stb_i;
247 4 rudi
 
248
always @(posedge clk or negedge rst)
249
        if(!rst)        csr_r2 <= #1 8'h0;
250
        else
251
        if(rf_we & (wb_addr_i[6:2] == 5'h0) )
252
                        csr_r2 <= #1 wb_data_i[31:24];
253
 
254
always @(posedge clk or negedge rst)
255
        if(!rst)        csr_r[10:1] <= #1 10'h0;
256
        else
257
        if(rf_we & (wb_addr_i[6:2] == 5'h0) )
258
                        csr_r[10:1] <= #1 wb_data_i[10:1];
259
 
260
always @(posedge clk)
261
        csr_r[0] <= #1 mc_sts;
262
 
263
assign mc_vpen = csr_r[1];
264
assign fs = csr_r[2];
265
assign rfr_ps_val = csr_r2[7:0];
266
 
267
always @(posedge clk or negedge rst)
268
        if(!rst)        csc_mask_r <= #1 11'h7ff;
269
        else
270
        if(rf_we & (wb_addr_i[6:2] == 5'h2) )
271
                        csc_mask_r <= #1 wb_data_i[10:0];
272
 
273
always @(posedge clk)
274
        if(!rst)        poc <= #1 mc_data_i;
275
 
276
////////////////////////////////////////////////////////////////////
277
//
278
// WISHBONE Register Ack logic
279
//
280
 
281
always @(posedge clk)
282 8 rudi
        ack_r <= #1 `MC_REG_SEL & wb_cyc_i & wb_stb_i & !ack_r & !wb_ack_o;
283 4 rudi
 
284
always @(posedge clk)
285
        wb_ack_o <= #1 ack_r;
286
 
287
////////////////////////////////////////////////////////////////////
288
//
289
// Select CSC and TMS Registers
290
//
291
 
292
always @(posedge clk)
293
        if(cs_le)       cs <= #1 {cs7, cs6, cs5, cs4, cs3, cs2, cs1, cs0};
294
 
295
always @(posedge clk)
296
        if(cs_le & wb_cyc_i & wb_stb_i)
297
                        wp_err <= #1    wp_err7 | wp_err6 | wp_err5 | wp_err4 |
298
                                        wp_err3 | wp_err2 | wp_err1 | wp_err0;
299
        else
300
        if(!wb_cyc_i)   wp_err <= #1 1'b0;
301
 
302
assign cs_sel[0] = cs1 | cs3 | cs5 | cs7;
303
assign cs_sel[1] = cs2 | cs3 | cs6 | cs7;
304
assign cs_sel[2] = cs4 | cs5 | cs6 | cs7;
305
 
306
always @(posedge clk)
307
        if(cs_le)
308
        case(cs_sel)            // synopsys full_case parallel_case
309
           3'h0: csc <= #1 csc0;
310
           3'h1: csc <= #1 csc1;
311
           3'h2: csc <= #1 csc2;
312
           3'h3: csc <= #1 csc3;
313
           3'h4: csc <= #1 csc4;
314
           3'h5: csc <= #1 csc5;
315
           3'h6: csc <= #1 csc6;
316
           3'h7: csc <= #1 csc7;
317
        endcase
318
 
319
always @(posedge clk)
320
        if(cs_le | rf_we)
321
        case(cs_sel)            // synopsys full_case parallel_case
322
           3'h0: tms <= #1 tms0;
323
           3'h1: tms <= #1 tms1;
324
           3'h2: tms <= #1 tms2;
325
           3'h3: tms <= #1 tms3;
326
           3'h4: tms <= #1 tms4;
327
           3'h5: tms <= #1 tms5;
328
           3'h6: tms <= #1 tms6;
329
           3'h7: tms <= #1 tms7;
330
        endcase
331
 
332
assign sp_cs_sel[0] = spec_req_cs[1] | spec_req_cs[3] | spec_req_cs[5] | spec_req_cs[7];
333
assign sp_cs_sel[1] = spec_req_cs[2] | spec_req_cs[3] | spec_req_cs[6] | spec_req_cs[7];
334
assign sp_cs_sel[2] = spec_req_cs[4] | spec_req_cs[5] | spec_req_cs[6] | spec_req_cs[7];
335
 
336
always @(posedge clk)
337
        if(cs_le)
338
        case(sp_cs_sel)         // synopsys full_case parallel_case
339
           3'h0: sp_csc <= #1 csc0;
340
           3'h1: sp_csc <= #1 csc1;
341
           3'h2: sp_csc <= #1 csc2;
342
           3'h3: sp_csc <= #1 csc3;
343
           3'h4: sp_csc <= #1 csc4;
344
           3'h5: sp_csc <= #1 csc5;
345
           3'h6: sp_csc <= #1 csc6;
346
           3'h7: sp_csc <= #1 csc7;
347
        endcase
348
 
349
always @(posedge clk)
350
        if(cs_le | rf_we)
351
        case(sp_cs_sel)         // synopsys full_case parallel_case
352
           3'h0: sp_tms <= #1 tms0;
353
           3'h1: sp_tms <= #1 tms1;
354
           3'h2: sp_tms <= #1 tms2;
355
           3'h3: sp_tms <= #1 tms3;
356
           3'h4: sp_tms <= #1 tms4;
357
           3'h5: sp_tms <= #1 tms5;
358
           3'h6: sp_tms <= #1 tms6;
359
           3'h7: sp_tms <= #1 tms7;
360
        endcase
361
 
362 8 rudi
assign  cs_need_rfr[0] = csc0[0] & (csc0[3:1] == `MC_MEM_TYPE_SDRAM);
363
assign  cs_need_rfr[1] = csc1[0] & (csc1[3:1] == `MC_MEM_TYPE_SDRAM);
364
assign  cs_need_rfr[2] = csc2[0] & (csc2[3:1] == `MC_MEM_TYPE_SDRAM);
365
assign  cs_need_rfr[3] = csc3[0] & (csc3[3:1] == `MC_MEM_TYPE_SDRAM);
366
assign  cs_need_rfr[4] = csc4[0] & (csc4[3:1] == `MC_MEM_TYPE_SDRAM);
367
assign  cs_need_rfr[5] = csc5[0] & (csc5[3:1] == `MC_MEM_TYPE_SDRAM);
368
assign  cs_need_rfr[6] = csc6[0] & (csc6[3:1] == `MC_MEM_TYPE_SDRAM);
369
assign  cs_need_rfr[7] = csc7[0] & (csc7[3:1] == `MC_MEM_TYPE_SDRAM);
370 4 rudi
 
371
assign ref_int = csr_r[10:8];
372
 
373
////////////////////////////////////////////////////////////////////
374
//
375
// Init & Lmr Logic
376
//
377
 
378
// Init Ack falling edge detector
379
always @(posedge clk)
380
        init_ack_r <= #1 init_ack;
381
 
382
assign  init_ack_fe = init_ack_r & !init_ack;
383
 
384
// LMR Ack falling edge detector
385
always @(posedge clk)
386
        lmr_ack_r <= #1 lmr_ack;
387
 
388
assign lmr_ack_fe = lmr_ack_r & !lmr_ack;
389
 
390
// Chip Select Output
391
always @(posedge clk)
392
        if(sreq_cs_le)  spec_req_cs <= #1 spec_req_cs_d;
393
 
394
always @(posedge clk)
395
        sreq_cs_le <= #1 (!init_req & !lmr_req) | lmr_ack_fe | init_ack_fe;
396
 
397
// Make sure only one is serviced at a time
398
assign  spec_req_cs_d[0] =       spec_req_cs_t[0];
399
assign  spec_req_cs_d[1] =      spec_req_cs_t[1] & !spec_req_cs_t[0];
400
assign  spec_req_cs_d[2] =      spec_req_cs_t[2] & !( |spec_req_cs_t[1:0] );
401
assign  spec_req_cs_d[3] =      spec_req_cs_t[3] & !( |spec_req_cs_t[2:0] );
402
assign  spec_req_cs_d[4] =      spec_req_cs_t[4] & !( |spec_req_cs_t[3:0] );
403
assign  spec_req_cs_d[5] =      spec_req_cs_t[5] & !( |spec_req_cs_t[4:0] );
404
assign  spec_req_cs_d[6] =      spec_req_cs_t[6] & !( |spec_req_cs_t[5:0] );
405
assign  spec_req_cs_d[7] =      spec_req_cs_t[7] & !( |spec_req_cs_t[6:0] );
406
 
407
// Request Tracking
408
always @(posedge clk)
409
        init_req <= #1  init_req0 | init_req1 | init_req2 | init_req3 |
410
                        init_req4 | init_req5 | init_req6 | init_req7;
411
 
412
always @(posedge clk)
413
        lmr_req <= #1   lmr_req0 | lmr_req1 | lmr_req2 | lmr_req3 |
414
                        lmr_req4 | lmr_req5 | lmr_req6 | lmr_req7;
415
 
416
assign spec_req_cs_t = !init_req ?      // Load Mode Register Requests
417
                                        {lmr_req7, lmr_req6, lmr_req5, lmr_req4,
418
                                        lmr_req3, lmr_req2, lmr_req1, lmr_req0 } :
419
                                        // Initialize SDRAM Requests
420
                                        {init_req7, init_req6, init_req5, init_req4,
421
                                        init_req3, init_req2, init_req1, init_req0 };
422
 
423
// Ack distribution
424
assign lmr_ack0 = spec_req_cs[0] & lmr_ack_fe;
425
assign lmr_ack1 = spec_req_cs[1] & lmr_ack_fe;
426
assign lmr_ack2 = spec_req_cs[2] & lmr_ack_fe;
427
assign lmr_ack3 = spec_req_cs[3] & lmr_ack_fe;
428
assign lmr_ack4 = spec_req_cs[4] & lmr_ack_fe;
429
assign lmr_ack5 = spec_req_cs[5] & lmr_ack_fe;
430
assign lmr_ack6 = spec_req_cs[6] & lmr_ack_fe;
431
assign lmr_ack7 = spec_req_cs[7] & lmr_ack_fe;
432
 
433
assign init_ack0 = spec_req_cs[0] & init_ack_fe;
434
assign init_ack1 = spec_req_cs[1] & init_ack_fe;
435
assign init_ack2 = spec_req_cs[2] & init_ack_fe;
436
assign init_ack3 = spec_req_cs[3] & init_ack_fe;
437
assign init_ack4 = spec_req_cs[4] & init_ack_fe;
438
assign init_ack5 = spec_req_cs[5] & init_ack_fe;
439
assign init_ack6 = spec_req_cs[6] & init_ack_fe;
440
assign init_ack7 = spec_req_cs[7] & init_ack_fe;
441
 
442
////////////////////////////////////////////////////////////////////
443
//
444
// Modules
445
//
446
 
447
mc_cs_rf #(3'h0) u0(
448
                .clk(           clk             ),
449
                .rst(           rst             ),
450
                .wb_we_i(       wb_we_i         ),
451
                .din(           wb_data_i       ),
452
                .rf_we(         rf_we           ),
453
                .addr(          wb_addr_i       ),
454
                .csc(           csc0            ),
455
                .tms(           tms0            ),
456
                .poc(           poc             ),
457
                .csc_mask(      csc_mask        ),
458
                .cs(            cs0             ),
459
                .wp_err(        wp_err0         ),
460
                .lmr_req(       lmr_req0        ),
461
                .lmr_ack(       lmr_ack0        ),
462
                .init_req(      init_req0       ),
463
                .init_ack(      init_ack0       )
464
                );
465
 
466 8 rudi
`ifdef MC_HAVE_CS1
467 4 rudi
mc_cs_rf #(3'h1) u1(
468
                .clk(           clk             ),
469
                .rst(           rst             ),
470
                .wb_we_i(       wb_we_i         ),
471
                .din(           wb_data_i       ),
472
                .rf_we(         rf_we           ),
473
                .addr(          wb_addr_i       ),
474
                .csc(           csc1            ),
475
                .tms(           tms1            ),
476
                .poc(           poc             ),
477
                .csc_mask(      csc_mask        ),
478
                .cs(            cs1             ),
479
                .wp_err(        wp_err1         ),
480
                .lmr_req(       lmr_req1        ),
481
                .lmr_ack(       lmr_ack1        ),
482
                .init_req(      init_req1       ),
483
                .init_ack(      init_ack1       )
484
                );
485
`else
486
mc_cs_rf_dummy #(3'h1) u1(
487
                .clk(           clk             ),
488
                .rst(           rst             ),
489
                .wb_we_i(       wb_we_i         ),
490
                .din(           wb_data_i       ),
491
                .rf_we(         rf_we           ),
492
                .addr(          wb_addr_i       ),
493
                .csc(           csc1            ),
494
                .tms(           tms1            ),
495
                .poc(           poc             ),
496
                .csc_mask(      csc_mask        ),
497
                .cs(            cs1             ),
498
                .wp_err(        wp_err1         ),
499
                .lmr_req(       lmr_req1        ),
500
                .lmr_ack(       lmr_ack1        ),
501
                .init_req(      init_req1       ),
502
                .init_ack(      init_ack1       )
503
                );
504
`endif
505
 
506 8 rudi
`ifdef MC_HAVE_CS2
507 4 rudi
mc_cs_rf #(3'h2) u2(
508
                .clk(           clk             ),
509
                .rst(           rst             ),
510
                .wb_we_i(       wb_we_i         ),
511
                .din(           wb_data_i       ),
512
                .rf_we(         rf_we           ),
513
                .addr(          wb_addr_i       ),
514
                .csc(           csc2            ),
515
                .tms(           tms2            ),
516
                .poc(           poc             ),
517
                .csc_mask(      csc_mask        ),
518
                .cs(            cs2             ),
519
                .wp_err(        wp_err2         ),
520
                .lmr_req(       lmr_req2        ),
521
                .lmr_ack(       lmr_ack2        ),
522
                .init_req(      init_req2       ),
523
                .init_ack(      init_ack2       )
524
                );
525
`else
526
mc_cs_rf_dummy #(3'h2) u2(
527
                .clk(           clk             ),
528
                .rst(           rst             ),
529
                .wb_we_i(       wb_we_i         ),
530
                .din(           wb_data_i       ),
531
                .rf_we(         rf_we           ),
532
                .addr(          wb_addr_i       ),
533
                .csc(           csc2            ),
534
                .tms(           tms2            ),
535
                .poc(           poc             ),
536
                .csc_mask(      csc_mask        ),
537
                .cs(            cs2             ),
538
                .wp_err(        wp_err2         ),
539
                .lmr_req(       lmr_req2        ),
540
                .lmr_ack(       lmr_ack2        ),
541
                .init_req(      init_req2       ),
542
                .init_ack(      init_ack2       )
543
                );
544
`endif
545
 
546 8 rudi
`ifdef MC_HAVE_CS3
547 4 rudi
mc_cs_rf #(3'h3) u3(
548
                .clk(           clk             ),
549
                .rst(           rst             ),
550
                .wb_we_i(       wb_we_i         ),
551
                .din(           wb_data_i       ),
552
                .rf_we(         rf_we           ),
553
                .addr(          wb_addr_i       ),
554
                .csc(           csc3            ),
555
                .tms(           tms3            ),
556
                .poc(           poc             ),
557
                .csc_mask(      csc_mask        ),
558
                .cs(            cs3             ),
559
                .wp_err(        wp_err3         ),
560
                .lmr_req(       lmr_req3        ),
561
                .lmr_ack(       lmr_ack3        ),
562
                .init_req(      init_req3       ),
563
                .init_ack(      init_ack3       )
564
                );
565
`else
566
mc_cs_rf_dummy #(3'h3) u3(
567
                .clk(           clk             ),
568
                .rst(           rst             ),
569
                .wb_we_i(       wb_we_i         ),
570
                .din(           wb_data_i       ),
571
                .rf_we(         rf_we           ),
572
                .addr(          wb_addr_i       ),
573
                .csc(           csc3            ),
574
                .tms(           tms3            ),
575
                .poc(           poc             ),
576
                .csc_mask(      csc_mask        ),
577
                .cs(            cs3             ),
578
                .wp_err(        wp_err3         ),
579
                .lmr_req(       lmr_req3        ),
580
                .lmr_ack(       lmr_ack3        ),
581
                .init_req(      init_req3       ),
582
                .init_ack(      init_ack3       )
583
                );
584
`endif
585
 
586 8 rudi
`ifdef MC_HAVE_CS4
587 4 rudi
mc_cs_rf #(3'h4) u4(
588
                .clk(           clk             ),
589
                .rst(           rst             ),
590
                .wb_we_i(       wb_we_i         ),
591
                .din(           wb_data_i       ),
592
                .rf_we(         rf_we           ),
593
                .addr(          wb_addr_i       ),
594
                .csc(           csc4            ),
595
                .tms(           tms4            ),
596
                .poc(           poc             ),
597
                .csc_mask(      csc_mask        ),
598
                .cs(            cs4             ),
599
                .wp_err(        wp_err4         ),
600
                .lmr_req(       lmr_req4        ),
601
                .lmr_ack(       lmr_ack4        ),
602
                .init_req(      init_req4       ),
603
                .init_ack(      init_ack4       )
604
                );
605
`else
606
mc_cs_rf_dummy #(3'h4) u4(
607
                .clk(           clk             ),
608
                .rst(           rst             ),
609
                .wb_we_i(       wb_we_i         ),
610
                .din(           wb_data_i       ),
611
                .rf_we(         rf_we           ),
612
                .addr(          wb_addr_i       ),
613
                .csc(           csc4            ),
614
                .tms(           tms4            ),
615
                .poc(           poc             ),
616
                .csc_mask(      csc_mask        ),
617
                .cs(            cs4             ),
618
                .wp_err(        wp_err4         ),
619
                .lmr_req(       lmr_req4        ),
620
                .lmr_ack(       lmr_ack4        ),
621
                .init_req(      init_req4       ),
622
                .init_ack(      init_ack4       )
623
                );
624
`endif
625
 
626 8 rudi
`ifdef MC_HAVE_CS5
627 4 rudi
mc_cs_rf #(3'h5) u5(
628
                .clk(           clk             ),
629
                .rst(           rst             ),
630
                .wb_we_i(       wb_we_i         ),
631
                .din(           wb_data_i       ),
632
                .rf_we(         rf_we           ),
633
                .addr(          wb_addr_i       ),
634
                .csc(           csc5            ),
635
                .tms(           tms5            ),
636
                .poc(           poc             ),
637
                .csc_mask(      csc_mask        ),
638
                .cs(            cs5             ),
639
                .wp_err(        wp_err5         ),
640
                .lmr_req(       lmr_req5        ),
641
                .lmr_ack(       lmr_ack5        ),
642
                .init_req(      init_req5       ),
643
                .init_ack(      init_ack5       )
644
                );
645
`else
646
mc_cs_rf_dummy #(3'h5) u5(
647
                .clk(           clk             ),
648
                .rst(           rst             ),
649
                .wb_we_i(       wb_we_i         ),
650
                .din(           wb_data_i       ),
651
                .rf_we(         rf_we           ),
652
                .addr(          wb_addr_i       ),
653
                .csc(           csc5            ),
654
                .tms(           tms5            ),
655
                .poc(           poc             ),
656
                .csc_mask(      csc_mask        ),
657
                .cs(            cs5             ),
658
                .wp_err(        wp_err5         ),
659
                .lmr_req(       lmr_req5        ),
660
                .lmr_ack(       lmr_ack5        ),
661
                .init_req(      init_req5       ),
662
                .init_ack(      init_ack5       )
663
                );
664
`endif
665
 
666 8 rudi
`ifdef MC_HAVE_CS6
667 4 rudi
mc_cs_rf #(3'h6) u6(
668
                .clk(           clk             ),
669
                .rst(           rst             ),
670
                .wb_we_i(       wb_we_i         ),
671
                .din(           wb_data_i       ),
672
                .rf_we(         rf_we           ),
673
                .addr(          wb_addr_i       ),
674
                .csc(           csc6            ),
675
                .tms(           tms6            ),
676
                .poc(           poc             ),
677
                .csc_mask(      csc_mask        ),
678
                .cs(            cs6             ),
679
                .wp_err(        wp_err6         ),
680
                .lmr_req(       lmr_req6        ),
681
                .lmr_ack(       lmr_ack6        ),
682
                .init_req(      init_req6       ),
683
                .init_ack(      init_ack6       )
684
                );
685
`else
686
mc_cs_rf_dummy #(3'h6) u6(
687
                .clk(           clk             ),
688
                .rst(           rst             ),
689
                .wb_we_i(       wb_we_i         ),
690
                .din(           wb_data_i       ),
691
                .rf_we(         rf_we           ),
692
                .addr(          wb_addr_i       ),
693
                .csc(           csc6            ),
694
                .tms(           tms6            ),
695
                .poc(           poc             ),
696
                .csc_mask(      csc_mask        ),
697
                .cs(            cs6             ),
698
                .wp_err(        wp_err6         ),
699
                .lmr_req(       lmr_req6        ),
700
                .lmr_ack(       lmr_ack6        ),
701
                .init_req(      init_req6       ),
702
                .init_ack(      init_ack6       )
703
                );
704
`endif
705
 
706 8 rudi
`ifdef MC_HAVE_CS7
707 4 rudi
mc_cs_rf #(3'h7) u7(
708
                .clk(           clk             ),
709
                .rst(           rst             ),
710
                .wb_we_i(       wb_we_i         ),
711
                .din(           wb_data_i       ),
712
                .rf_we(         rf_we           ),
713
                .addr(          wb_addr_i       ),
714
                .csc(           csc7            ),
715
                .tms(           tms7            ),
716
                .poc(           poc             ),
717
                .csc_mask(      csc_mask        ),
718
                .cs(            cs7             ),
719
                .wp_err(        wp_err7         ),
720
                .lmr_req(       lmr_req7        ),
721
                .lmr_ack(       lmr_ack7        ),
722
                .init_req(      init_req7       ),
723
                .init_ack(      init_ack7       )
724
                );
725
`else
726
mc_cs_rf_dummy #(3'h7) u7(
727
                .clk(           clk             ),
728
                .rst(           rst             ),
729
                .wb_we_i(       wb_we_i         ),
730
                .din(           wb_data_i       ),
731
                .rf_we(         rf_we           ),
732
                .addr(          wb_addr_i       ),
733
                .csc(           csc7            ),
734
                .tms(           tms7            ),
735
                .poc(           poc             ),
736
                .csc_mask(      csc_mask        ),
737
                .cs(            cs7             ),
738
                .wp_err(        wp_err7         ),
739
                .lmr_req(       lmr_req7        ),
740
                .lmr_ack(       lmr_ack7        ),
741
                .init_req(      init_req7       ),
742
                .init_ack(      init_ack7       )
743
                );
744
`endif
745
 
746
endmodule
747
 

powered by: WebSVN 2.1.0

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