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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [orp/] [orp_soc/] [rtl/] [verilog/] [xsv_fpga_top.v] - Blame information for rev 1268

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

Line No. Rev Author Line
1 746 lampret
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  OR1K test application for XESS XSV board, Top Level         ////
4
////                                                              ////
5
////  This file is part of the OR1K test application              ////
6
////  http://www.opencores.org/cores/or1k/                        ////
7
////                                                              ////
8
////  Description                                                 ////
9
////  Top level instantiating all the blocks.                     ////
10
////                                                              ////
11
////  To Do:                                                      ////
12
////   - nothing really                                           ////
13
////                                                              ////
14
////  Author(s):                                                  ////
15
////      - Damjan Lampret, lampret@opencores.org                 ////
16
////                                                              ////
17
//////////////////////////////////////////////////////////////////////
18
////                                                              ////
19
//// Copyright (C) 2001 Authors                                   ////
20
////                                                              ////
21
//// This source file may be used and distributed without         ////
22
//// restriction provided that this copyright statement is not    ////
23
//// removed from the file and that any derivative work contains  ////
24
//// the original copyright notice and the associated disclaimer. ////
25
////                                                              ////
26
//// This source file is free software; you can redistribute it   ////
27
//// and/or modify it under the terms of the GNU Lesser General   ////
28
//// Public License as published by the Free Software Foundation; ////
29
//// either version 2.1 of the License, or (at your option) any   ////
30
//// later version.                                               ////
31
////                                                              ////
32
//// This source is distributed in the hope that it will be       ////
33
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
34
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
35
//// PURPOSE.  See the GNU Lesser General Public License for more ////
36
//// details.                                                     ////
37
////                                                              ////
38
//// You should have received a copy of the GNU Lesser General    ////
39
//// Public License along with this source; if not, download it   ////
40
//// from http://www.opencores.org/lgpl.shtml                     ////
41
////                                                              ////
42
//////////////////////////////////////////////////////////////////////
43
//
44
// CVS Revision History
45
//
46
// $Log: not supported by cvs2svn $
47 1192 dries
// Revision 1.8  2003/04/07 21:05:58  lampret
48
// WB = 1/2 RISC clock test code enabled.
49
//
50 1141 lampret
// Revision 1.7  2003/04/07 01:28:17  lampret
51
// Adding OR1200_CLMODE_1TO2 test code.
52
//
53 1133 lampret
// Revision 1.6  2002/08/12 05:35:12  lampret
54
// rty_i are unused - tied to zero.
55
//
56 947 lampret
// Revision 1.5  2002/03/29 20:58:51  lampret
57
// Changed hardcoded address for fake MC to use a define.
58
//
59 797 lampret
// Revision 1.4  2002/03/29 16:30:47  lampret
60
// Fixed port names that changed.
61
//
62 792 lampret
// Revision 1.3  2002/03/29 15:50:03  lampret
63
// Added response from memory controller (addr 0x60000000)
64
//
65 789 lampret
// Revision 1.2  2002/03/21 17:39:16  lampret
66
// Fixed some typos
67 746 lampret
//
68 789 lampret
//
69 746 lampret
 
70 752 lampret
`include "xsv_fpga_defines.v"
71 1133 lampret
`include "bench_defines.v"
72 746 lampret
 
73
module xsv_fpga_top (
74
 
75
        //
76
        // Global signals
77
        //
78
        clk, rstn,
79
 
80
        //
81
        // Flash chip
82
        //
83
        flash_rstn, flash_cen, flash_oen, flash_wen,
84
        flash_rdy, flash_d, flash_a,
85
 
86
        //
87
        // SRAM right bank
88
        //
89
        sram_r_cen, sram_r_oen, sram_r0_wen,
90
        sram_r1_wen, sram_r_d, sram_r_a,
91
 
92
        //
93
        // SRAM left bank
94
        //
95
        sram_l_cen, sram_l_oen, sram_l0_wen,
96
        sram_l1_wen, sram_l_d, sram_l_a,
97
 
98
`ifdef APP_VGA_RAMDAC
99
 
100
        //
101
        // VGA RAMDAC
102
        //
103
        ramdac_pixclk, ramdac_hsyncn, ramdac_vsync, ramdac_blank,
104
        ramdac_p, ramdac_rdn, ramdac_wrn, ramdac_rs, ramdac_d,
105
`else
106
        //
107
        // VGA Direct
108
        //
109
        vga_blank, vga_pclk, vga_hsyncn, vga_vsyncn,
110
        vga_r, vga_g, vga_b,
111
 
112
`endif
113
 
114
        //
115
        // Stereo Codec
116
        //
117
        codec_mclk, codec_lrclk, codec_sclk,
118
        codec_sdin, codec_sdout,
119
 
120
        //
121
        // Ethernet
122
        //
123
        eth_col, eth_crs, eth_trste, eth_tx_clk,
124
        eth_tx_en, eth_tx_er, eth_txd, eth_rx_clk,
125
        eth_rx_dv, eth_rx_er, eth_rxd, eth_fds_mdint,
126
        eth_mdc, eth_mdio,
127
 
128
        //
129
        // Switches
130
        //
131
        sw,
132
 
133
        //
134
        // PS/2 keyboard
135
        //
136
        ps2_clk, ps2_data,
137
 
138
        //
139
        // CPLD
140
        //
141
        tdmfrm, tdmrx, tdmtx
142
);
143
 
144
//
145
// I/O Ports
146
//
147
 
148
//
149
// Global
150
//
151
input                   clk;
152
input                   rstn;
153
 
154
//
155
// Flash
156
//
157
output                  flash_rstn;
158
output                  flash_cen;
159
output                  flash_oen;
160
output                  flash_wen;
161
input                   flash_rdy;
162
inout   [7:0]            flash_d;
163
inout   [20:0]           flash_a;
164
 
165
//
166
// SRAM Right
167
//
168
output                  sram_r_cen;
169
output                  sram_r1_wen;
170
output                  sram_r0_wen;
171
output                  sram_r_oen;
172
output  [18:0]           sram_r_a;
173
inout   [15:0]           sram_r_d;
174
 
175
//
176
// SRAM Left
177
//
178
output                  sram_l_cen;
179
output                  sram_l0_wen;
180
output                  sram_l1_wen;
181
output                  sram_l_oen;
182
output  [18:0]           sram_l_a;
183
inout   [15:0]           sram_l_d;
184
 
185
`ifdef APP_VGA_RAMDAC
186
 
187
//
188
// VGA RAMDAC
189
//
190
output                  ramdac_pixclk;
191
output                  ramdac_hsyncn;
192
output                  ramdac_vsync;
193
output                  ramdac_blank;
194
output  [7:0]            ramdac_p;
195
output                  ramdac_rdn;
196
output                  ramdac_wrn;
197
output  [2:0]            ramdac_rs;
198
inout   [7:0]            ramdac_d;
199
 
200
`else
201
 
202
//
203
// VGA Direct
204
//
205
output                  vga_pclk;
206
output                  vga_blank;
207
output                  vga_hsyncn;
208
output                  vga_vsyncn;
209
output  [3:0]            vga_r;
210
output  [3:0]            vga_g;
211
output  [3:0]            vga_b;
212
 
213
`endif
214
 
215
//
216
// Stereo Codec
217
//
218
output                  codec_mclk;
219
output                  codec_lrclk;
220
output                  codec_sclk;
221
output                  codec_sdin;
222
input                   codec_sdout;
223
 
224
//
225
// Ethernet
226
//
227
output                  eth_tx_er;
228
input                   eth_tx_clk;
229
output                  eth_tx_en;
230
output  [3:0]            eth_txd;
231
input                   eth_rx_er;
232
input                   eth_rx_clk;
233
input                   eth_rx_dv;
234
input   [3:0]            eth_rxd;
235
input                   eth_col;
236
input                   eth_crs;
237
output                  eth_trste;
238
input                   eth_fds_mdint;
239
inout                   eth_mdio;
240
output                  eth_mdc;
241
 
242
//
243
// Switches
244
//
245
input   [2:1]           sw;
246
 
247
//
248
// PS/2 keyboard
249
//
250
inout                   ps2_clk;
251
inout                   ps2_data;
252
 
253
//
254
// CPLD TDM
255
//
256
input                   tdmfrm;
257
input                   tdmrx;
258
output                  tdmtx;
259
 
260
 
261
//
262
// Internal wires
263
//
264
 
265
//
266
// VGA core slave i/f wires
267
//
268
wire    [31:0]           wb_vs_adr_i;
269
wire    [31:0]           wb_vs_dat_i;
270
wire    [31:0]           wb_vs_dat_o;
271
wire    [3:0]            wb_vs_sel_i;
272
wire                    wb_vs_we_i;
273
wire                    wb_vs_stb_i;
274
wire                    wb_vs_cyc_i;
275
wire                    wb_vs_ack_o;
276
wire                    wb_vs_err_o;
277
 
278
//
279
// VGA core master i/f wires
280
//
281
wire    [31:0]           wb_vm_adr_o;
282
wire    [31:0]           wb_vm_dat_i;
283
wire    [3:0]            wb_vm_sel_o;
284
wire                    wb_vm_we_o;
285
wire                    wb_vm_stb_o;
286
wire                    wb_vm_cyc_o;
287
wire                    wb_vm_cab_o;
288
wire                    wb_vm_ack_i;
289
wire                    wb_vm_err_i;
290
 
291
//
292
// VGA CRT wires
293
//
294
wire    [4:0]            vga_r_int;
295
wire    [5:0]            vga_g_int;
296
wire    [4:0]            vga_b_int;
297
wire                    crt_hsync;
298
wire                    crt_vsync;
299
 
300
//
301
// Debug core master i/f wires
302
//
303
wire    [31:0]           wb_dm_adr_o;
304
wire    [31:0]           wb_dm_dat_i;
305
wire    [31:0]           wb_dm_dat_o;
306
wire    [3:0]            wb_dm_sel_o;
307
wire                    wb_dm_we_o;
308
wire                    wb_dm_stb_o;
309
wire                    wb_dm_cyc_o;
310
wire                    wb_dm_cab_o;
311
wire                    wb_dm_ack_i;
312
wire                    wb_dm_err_i;
313
 
314
//
315
// Debug <-> RISC wires
316
//
317
wire    [3:0]            dbg_lss;
318
wire    [1:0]            dbg_is;
319
wire    [10:0]           dbg_wp;
320
wire                    dbg_bp;
321
wire    [31:0]           dbg_dat_dbg;
322
wire    [31:0]           dbg_dat_risc;
323
wire    [31:0]           dbg_adr;
324
wire                    dbg_ewt;
325
wire                    dbg_stall;
326
wire    [2:0]            dbg_op;
327
 
328
//
329
// RISC instruction master i/f wires
330
//
331
wire    [31:0]           wb_rim_adr_o;
332
wire                    wb_rim_cyc_o;
333
wire    [31:0]           wb_rim_dat_i;
334
wire    [31:0]           wb_rim_dat_o;
335
wire    [3:0]            wb_rim_sel_o;
336
wire                    wb_rim_ack_i;
337
wire                    wb_rim_err_i;
338 947 lampret
wire                    wb_rim_rty_i = 1'b0;
339 746 lampret
wire                    wb_rim_we_o;
340
wire                    wb_rim_stb_o;
341
wire                    wb_rim_cab_o;
342
wire    [31:0]           wb_rif_adr;
343
reg                     prefix_flash;
344
 
345
//
346
// RISC data master i/f wires
347
//
348
wire    [31:0]           wb_rdm_adr_o;
349
wire                    wb_rdm_cyc_o;
350
wire    [31:0]           wb_rdm_dat_i;
351
wire    [31:0]           wb_rdm_dat_o;
352
wire    [3:0]            wb_rdm_sel_o;
353
wire                    wb_rdm_ack_i;
354
wire                    wb_rdm_err_i;
355 947 lampret
wire                    wb_rdm_rty_i = 1'b0;
356 746 lampret
wire                    wb_rdm_we_o;
357
wire                    wb_rdm_stb_o;
358
wire                    wb_rdm_cab_o;
359 789 lampret
wire                    wb_rdm_ack;
360 746 lampret
 
361
//
362
// RISC misc
363
//
364
wire    [19:0]           pic_ints;
365
 
366
//
367
// SRAM controller slave i/f wires
368
//
369
wire    [31:0]           wb_ss_dat_i;
370
wire    [31:0]           wb_ss_dat_o;
371
wire    [31:0]           wb_ss_adr_i;
372
wire    [3:0]            wb_ss_sel_i;
373
wire                    wb_ss_we_i;
374
wire                    wb_ss_cyc_i;
375
wire                    wb_ss_stb_i;
376
wire                    wb_ss_ack_o;
377
wire                    wb_ss_err_o;
378
 
379
//
380
// SRAM external wires
381
//
382
wire    [15:0]           sram_r_d_o;
383
wire    [15:0]           sram_l_d_o;
384
wire                    sram_d_oe;
385
 
386
//
387
// Flash controller slave i/f wires
388
//
389
wire    [31:0]           wb_fs_dat_i;
390
wire    [31:0]           wb_fs_dat_o;
391
wire    [31:0]           wb_fs_adr_i;
392
wire    [3:0]            wb_fs_sel_i;
393
wire                    wb_fs_we_i;
394
wire                    wb_fs_cyc_i;
395
wire                    wb_fs_stb_i;
396
wire                    wb_fs_ack_o;
397
wire                    wb_fs_err_o;
398
 
399
//
400
// Audio core slave i/f wires
401
//
402
wire    [31:0]           wb_as_dat_i;
403
wire    [31:0]           wb_as_dat_o;
404
wire    [31:0]           wb_as_adr_i;
405
wire    [3:0]            wb_as_sel_i;
406
wire                    wb_as_we_i;
407
wire                    wb_as_cyc_i;
408
wire                    wb_as_stb_i;
409
wire                    wb_as_ack_o;
410
wire                    wb_as_err_o;
411
 
412
//
413
// Audio core master i/f wires
414
//
415
wire    [31:0]           wb_am_dat_o;
416
wire    [31:0]           wb_am_dat_i;
417
wire    [31:0]           wb_am_adr_o;
418
wire    [3:0]            wb_am_sel_o;
419
wire                    wb_am_we_o;
420
wire                    wb_am_cyc_o;
421
wire                    wb_am_stb_o;
422
wire                    wb_am_cab_o;
423
wire                    wb_am_ack_i;
424
wire                    wb_am_err_i;
425
 
426
//
427
// PS/2 core slave i/f wires
428
//
429
wire    [31:0]           wb_ps_dat_i;
430
wire    [31:0]           wb_ps_dat_o;
431
wire    [31:0]           wb_ps_adr_i;
432
wire    [3:0]            wb_ps_sel_i;
433
wire                    wb_ps_we_i;
434
wire                    wb_ps_cyc_i;
435
wire                    wb_ps_stb_i;
436
wire                    wb_ps_ack_o;
437
wire                    wb_ps_err_o;
438
 
439
//
440
// PS/2 external i/f wires
441
//
442
wire                    ps2_clk_o;
443
wire                    ps2_data_o;
444
wire                    ps2_clk_oe;
445
wire                    ps2_data_oe;
446
 
447
//
448
// Ethernet core master i/f wires
449
//
450
wire    [31:0]           wb_em_adr_o;
451
wire    [31:0]           wb_em_dat_i;
452
wire    [31:0]           wb_em_dat_o;
453
wire    [3:0]            wb_em_sel_o;
454
wire                    wb_em_we_o;
455
wire                    wb_em_stb_o;
456
wire                    wb_em_cyc_o;
457
wire                    wb_em_cab_o;
458
wire                    wb_em_ack_i;
459
wire                    wb_em_err_i;
460
 
461
//
462
// Ethernet core slave i/f wires
463
//
464
wire    [31:0]           wb_es_dat_i;
465
wire    [31:0]           wb_es_dat_o;
466
wire    [31:0]           wb_es_adr_i;
467
wire    [3:0]            wb_es_sel_i;
468
wire                    wb_es_we_i;
469
wire                    wb_es_cyc_i;
470
wire                    wb_es_stb_i;
471
wire                    wb_es_ack_o;
472
wire                    wb_es_err_o;
473
 
474
//
475
// Ethernet external i/f wires
476
//
477
wire                    eth_mdo;
478 792 lampret
wire                    eth_mdoe;
479 746 lampret
 
480
//
481
// UART16550 core slave i/f wires
482
//
483
wire    [31:0]           wb_us_dat_i;
484
wire    [31:0]           wb_us_dat_o;
485
wire    [31:0]           wb_us_adr_i;
486
wire    [3:0]            wb_us_sel_i;
487
wire                    wb_us_we_i;
488
wire                    wb_us_cyc_i;
489
wire                    wb_us_stb_i;
490
wire                    wb_us_ack_o;
491
wire                    wb_us_err_o;
492
 
493
//
494
// UART external i/f wires
495
//
496
wire                    uart_stx;
497
wire                    uart_srx;
498
 
499
//
500
// JTAG wires
501
//
502
wire                    jtag_tdi;
503
wire                    jtag_tms;
504
wire                    jtag_tck;
505
wire                    jtag_trst;
506
wire                    jtag_tdo;
507
 
508
//
509
// CPLD TDM wires
510
//
511
wire    [2:0]            tdm_out_unused;
512
 
513
//
514
// Reset debounce
515
//
516
reg                     rst_r;
517
reg                     wb_rst;
518
 
519
//
520
// Global clock
521
//
522 1133 lampret
`ifdef OR1200_CLMODE_1TO2
523
reg                     wb_clk;
524
`else
525 746 lampret
wire                    wb_clk;
526 1133 lampret
`endif
527 746 lampret
 
528
//
529
// Reset debounce
530
//
531
always @(posedge wb_clk or negedge rstn)
532
        if (~rstn)
533
                rst_r <= 1'b1;
534
        else
535
                rst_r <= #1 1'b0;
536
 
537
//
538
// Reset debounce
539
//
540
always @(posedge wb_clk)
541
        wb_rst <= #1 rst_r;
542
 
543
//
544 1133 lampret
// This is purely for testing 1/2 WB clock
545
// This should never be used when implementing in
546 1141 lampret
// an FPGA. It is used only for simulation regressions.
547 1133 lampret
//
548
`ifdef OR1200_CLMODE_1TO2
549
initial wb_clk = 0;
550 1141 lampret
always @(posedge clk)
551
        wb_clk = ~wb_clk;
552 1133 lampret
`else
553
//
554 746 lampret
// Some Xilinx P&R tools need this
555
//
556
`ifdef TARGET_VIRTEX
557
IBUFG IBUFG1 (
558
        .O      ( wb_clk ),
559
        .I      ( clk )
560
);
561
`else
562
assign wb_clk = clk;
563
`endif
564 1133 lampret
`endif // OR1200_CLMODE_1TO2
565 746 lampret
 
566
//
567
// SRAM tri-state data
568
//
569
assign sram_r_d = sram_d_oe ? sram_r_d_o : 16'hzzzz;
570
assign sram_l_d = sram_d_oe ? sram_l_d_o : 16'hzzzz;
571
 
572
//
573
// Ethernet tri-state
574
//
575 792 lampret
assign eth_mdio = eth_mdoe ? eth_mdo : 1'bz;
576 746 lampret
assign eth_trste = 1'b0;
577
 
578
//
579
// PS/2 Keyboard tri-state
580
//
581
assign ps2_clk = ps2_clk_oe ? ps2_clk_o : 1'bz;
582
assign ps2_data = ps2_data_oe ? ps2_data_o : 1'bz;
583
 
584
//
585
// Unused interrupts
586
//
587
assign pic_ints[`APP_INT_RES1] = 'b0;
588
assign pic_ints[`APP_INT_RES2] = 'b0;
589
assign pic_ints[`APP_INT_RES3] = 'b0;
590
 
591
//
592
// Unused WISHBONE signals
593
//
594
assign wb_us_err_o = 1'b0;
595
assign wb_ps_err_o = 1'b0;
596
assign wb_em_cab_o = 1'b0;
597
assign wb_am_cab_o = 1'b0;
598
 
599
//
600
// RISC Instruction address for Flash
601
//
602
// Until first access to real Flash area,
603
// it is always prefixed with Flash area prefix.
604
// This way we have flash at base address 0x0
605
// during reset vector execution (boot). First
606
// access to real Flash area will automatically
607
// move SRAM to 0x0.
608
//
609
always @(posedge wb_clk or negedge rstn)
610
        if (!rstn)
611
                prefix_flash <= #1 1'b1;
612
        else if (wb_rim_cyc_o &&
613
                (wb_rim_adr_o[31:32-`APP_ADDR_DEC_W] == `APP_ADDR_FLASH))
614 1268 lampret
                prefix_flash <= #1 1'b0;
615 746 lampret
assign wb_rif_adr = prefix_flash ? {`APP_ADDR_FLASH, wb_rim_adr_o[31-`APP_ADDR_DEC_W:0]}
616
                        : wb_rim_adr_o;
617 797 lampret
assign wb_rdm_ack_i = (wb_rdm_adr_o[31:28] == `APP_ADDR_FAKEMC) &&
618 789 lampret
                        wb_rdm_cyc_o && wb_rdm_stb_o ? 1'b1 : wb_rdm_ack;
619 746 lampret
 
620
//
621
// Instantiation of the VGA CRT controller
622
//
623
ssvga_top ssvga_top (
624
 
625
    // Clock and reset
626 1268 lampret
    .wb_clk_i   ( wb_clk ),
627 746 lampret
    .wb_rst_i   ( wb_rst ),
628 1268 lampret
 
629 746 lampret
    // WISHBONE Master I/F
630 1268 lampret
    .wbm_cyc_o  ( wb_vm_cyc_o ),
631
    .wbm_stb_o  ( wb_vm_stb_o ),
632
    .wbm_sel_o  ( wb_vm_sel_o ),
633 746 lampret
    .wbm_we_o   ( wb_vm_we_o ),
634 1268 lampret
    .wbm_adr_o  ( wb_vm_adr_o ),
635
    .wbm_dat_o  ( ),
636 746 lampret
    .wbm_cab_o  ( wb_vm_cab_o ),
637 1268 lampret
    .wbm_dat_i  ( wb_vm_dat_i ),
638
    .wbm_ack_i  ( wb_vm_ack_i ),
639
    .wbm_err_i  ( wb_vm_err_i ),
640 746 lampret
    .wbm_rty_i  ( 1'b0 ),
641
 
642
    // WISHBONE Slave I/F
643 1268 lampret
    .wbs_cyc_i  ( wb_vs_cyc_i ),
644
    .wbs_stb_i  ( wb_vs_stb_i ),
645
    .wbs_sel_i  ( wb_vs_sel_i ),
646 746 lampret
    .wbs_we_i   ( wb_vs_we_i ),
647 1268 lampret
    .wbs_adr_i  ( wb_vs_adr_i ),
648
    .wbs_dat_i  ( wb_vs_dat_i ),
649 746 lampret
    .wbs_cab_i  ( 1'b0 ),
650 1268 lampret
    .wbs_dat_o  ( wb_vs_dat_o ),
651
    .wbs_ack_o  ( wb_vs_ack_o ),
652
    .wbs_err_o  ( wb_vs_err_o ),
653 746 lampret
    .wbs_rty_o  ( ),
654
 
655
    // Signals to VGA display
656 1268 lampret
    .pad_hsync_o ( crt_hsync ),
657
    .pad_vsync_o ( crt_vsync ),
658 746 lampret
    .pad_rgb_o   ( {vga_r_int, vga_g_int, vga_b_int} ),
659
    .led_o       ( )
660
);
661
 
662
CRTC_IOB crt_out_reg (
663
    .reset_in   ( wb_rst ),
664
    .clk_in     ( wb_clk ),
665
    .hsync_in   ( crt_hsync ),
666
    .vsync_in   ( crt_vsync ),
667
    .rgb_in     ( {vga_r_int[4:1], vga_g_int[5:2], vga_b_int[4:1]} ),
668
    .hsync_out  ( vga_hsyncn ),
669
    .vsync_out  ( vga_vsyncn ),
670
    .rgb_out    ( {vga_r, vga_g, vga_b} )
671
);
672
 
673
 
674
//
675
// Instantiation of the Audio controller.
676
//
677
// This controller connects to AK4520A Codec chip.
678
//
679
audio_top audio_top (
680 1268 lampret
 
681 746 lampret
        // WISHBONE common
682
        .wb_clk_i ( wb_clk ),
683
        .wb_rst_i ( wb_rst ),
684
 
685
        // WISHBONE slave
686
        .wb_dat_i ( wb_as_dat_i ),
687
        .wb_dat_o ( wb_as_dat_o ),
688
        .wb_adr_i ( wb_as_adr_i ),
689
        .wb_sel_i ( wb_as_sel_i ),
690
        .wb_we_i  ( wb_as_we_i  ),
691
        .wb_cyc_i ( wb_as_cyc_i ),
692
        .wb_stb_i ( wb_as_stb_i ),
693
        .wb_ack_o ( wb_as_ack_o ),
694
        .wb_err_o ( wb_as_err_o ),
695
 
696
        // WISHBONE master
697
        .m_wb_dat_o ( wb_am_dat_o ),
698
        .m_wb_dat_i ( wb_am_dat_i ),
699
        .m_wb_adr_o ( wb_am_adr_o ),
700
        .m_wb_sel_o ( wb_am_sel_o ),
701
        .m_wb_we_o  ( wb_am_we_o  ),
702
        .m_wb_cyc_o ( wb_am_cyc_o ),
703
        .m_wb_stb_o ( wb_am_stb_o ),
704
        .m_wb_ack_i ( wb_am_ack_i ),
705
        .m_wb_err_i ( wb_am_err_i ),
706
 
707
        // AK4520A CODEC interface
708
        .mclk     ( codec_mclk ),
709
        .lrclk    ( codec_lrclk ),
710
        .sclk     ( codec_sclk ),
711
        .sdin     ( codec_sdin ),
712
        .sdout    ( codec_sdout )
713
);
714
 
715
//
716
// Instantiation of the development i/f model
717
//
718
// Used only for simulations.
719
//
720
`ifdef DBG_IF_MODEL
721
dbg_if_model dbg_if_model  (
722
 
723
        // JTAG pins
724
        .tms_pad_i      ( jtag_tms ),
725
        .tck_pad_i      ( jtag_tck ),
726
        .trst_pad_i     ( jtag_trst ),
727
        .tdi_pad_i      ( jtag_tdi ),
728 1268 lampret
        .tdo_pad_o      ( jtag_tdo ),
729 746 lampret
 
730
        // Boundary Scan signals
731 1268 lampret
        .capture_dr_o   ( ),
732
        .shift_dr_o     ( ),
733
        .update_dr_o    ( ),
734
        .extest_selected_o ( ),
735 746 lampret
        .bs_chain_i     ( 1'b0 ),
736 1268 lampret
 
737 746 lampret
        // RISC signals
738
        .risc_clk_i     ( wb_clk ),
739
        .risc_data_i    ( dbg_dat_risc ),
740
        .risc_data_o    ( dbg_dat_dbg ),
741
        .risc_addr_o    ( dbg_adr ),
742
        .wp_i           ( dbg_wp ),
743
        .bp_i           ( dbg_bp ),
744
        .opselect_o     ( dbg_op ),
745
        .lsstatus_i     ( dbg_lss ),
746
        .istatus_i      ( dbg_is ),
747
        .risc_stall_o   ( dbg_stall ),
748
        .reset_o        ( ),
749
 
750
        // WISHBONE common
751
        .wb_clk_i       ( wb_clk ),
752
        .wb_rst_i       ( wb_rst ),
753
 
754
        // WISHBONE master interface
755
        .wb_adr_o       ( wb_dm_adr_o ),
756
        .wb_dat_i       ( wb_dm_dat_i ),
757
        .wb_dat_o       ( wb_dm_dat_o ),
758
        .wb_sel_o       ( wb_dm_sel_o ),
759
        .wb_we_o        ( wb_dm_we_o  ),
760
        .wb_stb_o       ( wb_dm_stb_o ),
761
        .wb_cyc_o       ( wb_dm_cyc_o ),
762
        .wb_cab_o       ( wb_dm_cab_o ),
763
        .wb_ack_i       ( wb_dm_ack_i ),
764
        .wb_err_i       ( wb_dm_err_i )
765
);
766
`else
767
//
768
// Instantiation of the development i/f
769
//
770
dbg_top dbg_top  (
771
 
772
        // JTAG pins
773
        .tms_pad_i      ( jtag_tms ),
774
        .tck_pad_i      ( jtag_tck ),
775
        .trst_pad_i     ( jtag_trst ),
776
        .tdi_pad_i      ( jtag_tdi ),
777
        .tdo_pad_o      ( jtag_tdo ),
778
        .tdo_padoen_o   ( ),
779
 
780
        // Boundary Scan signals
781 1268 lampret
        .capture_dr_o   ( ),
782
        .shift_dr_o     ( ),
783
        .update_dr_o    ( ),
784
        .extest_selected_o ( ),
785 746 lampret
        .bs_chain_i     ( 1'b0 ),
786
        .bs_chain_o     ( ),
787
 
788
        // RISC signals
789
        .risc_clk_i     ( wb_clk ),
790
        .risc_addr_o    ( dbg_adr ),
791
        .risc_data_i    ( dbg_dat_risc ),
792
        .risc_data_o    ( dbg_dat_dbg ),
793
        .wp_i           ( dbg_wp ),
794
        .bp_i           ( dbg_bp ),
795
        .opselect_o     ( dbg_op ),
796
        .lsstatus_i     ( dbg_lss ),
797
        .istatus_i      ( dbg_is ),
798
        .risc_stall_o   ( dbg_stall ),
799
        .reset_o        ( ),
800
 
801
        // WISHBONE common
802
        .wb_clk_i       ( wb_clk ),
803
        .wb_rst_i       ( wb_rst ),
804
 
805
        // WISHBONE master interface
806
        .wb_adr_o       ( wb_dm_adr_o ),
807
        .wb_dat_i       ( wb_dm_dat_i ),
808
        .wb_dat_o       ( wb_dm_dat_o ),
809
        .wb_sel_o       ( wb_dm_sel_o ),
810
        .wb_we_o        ( wb_dm_we_o  ),
811
        .wb_stb_o       ( wb_dm_stb_o ),
812
        .wb_cyc_o       ( wb_dm_cyc_o ),
813
        .wb_cab_o       ( wb_dm_cab_o ),
814
        .wb_ack_i       ( wb_dm_ack_i ),
815
        .wb_err_i       ( wb_dm_err_i )
816
);
817
`endif
818
 
819
//
820
// Instantiation of the OR1200 RISC
821
//
822
or1200_top or1200_top (
823
 
824
        // Common
825
        .rst_i          ( wb_rst ),
826
        .clk_i          ( clk ),
827
`ifdef OR1200_CLMODE_1TO2
828
        .clmode_i       ( 2'b01 ),
829
`else
830
`ifdef OR1200_CLMODE_1TO4
831
        .clmode_i       ( 2'b11 ),
832
`else
833
        .clmode_i       ( 2'b00 ),
834
`endif
835
`endif
836
 
837
        // WISHBONE Instruction Master
838
        .iwb_clk_i      ( wb_clk ),
839
        .iwb_rst_i      ( wb_rst ),
840
        .iwb_cyc_o      ( wb_rim_cyc_o ),
841
        .iwb_adr_o      ( wb_rim_adr_o ),
842
        .iwb_dat_i      ( wb_rim_dat_i ),
843
        .iwb_dat_o      ( wb_rim_dat_o ),
844
        .iwb_sel_o      ( wb_rim_sel_o ),
845
        .iwb_ack_i      ( wb_rim_ack_i ),
846
        .iwb_err_i      ( wb_rim_err_i ),
847
        .iwb_rty_i      ( wb_rim_rty_i ),
848
        .iwb_we_o       ( wb_rim_we_o  ),
849
        .iwb_stb_o      ( wb_rim_stb_o ),
850
        .iwb_cab_o      ( wb_rim_cab_o ),
851
 
852
        // WISHBONE Data Master
853
        .dwb_clk_i      ( wb_clk ),
854
        .dwb_rst_i      ( wb_rst ),
855
        .dwb_cyc_o      ( wb_rdm_cyc_o ),
856
        .dwb_adr_o      ( wb_rdm_adr_o ),
857
        .dwb_dat_i      ( wb_rdm_dat_i ),
858
        .dwb_dat_o      ( wb_rdm_dat_o ),
859
        .dwb_sel_o      ( wb_rdm_sel_o ),
860
        .dwb_ack_i      ( wb_rdm_ack_i ),
861
        .dwb_err_i      ( wb_rdm_err_i ),
862
        .dwb_rty_i      ( wb_rdm_rty_i ),
863
        .dwb_we_o       ( wb_rdm_we_o  ),
864
        .dwb_stb_o      ( wb_rdm_stb_o ),
865
        .dwb_cab_o      ( wb_rdm_cab_o ),
866
 
867
        // Debug
868
        .dbg_stall_i    ( dbg_stall ),
869
        .dbg_dat_i      ( dbg_dat_dbg ),
870
        .dbg_adr_i      ( dbg_adr ),
871
        .dbg_ewt_i      ( 1'b0 ),
872
        .dbg_lss_o      ( dbg_lss ),
873
        .dbg_is_o       ( dbg_is ),
874
        .dbg_wp_o       ( dbg_wp ),
875
        .dbg_bp_o       ( dbg_bp ),
876
        .dbg_dat_o      ( dbg_dat_risc ),
877 1268 lampret
        .dbg_ack_o      ( ),
878
        .dbg_stb_i      ( dbg_op[2] ),
879
        .dbg_we_i       ( dbg_op[0] ),
880 746 lampret
 
881
        // Power Management
882
        .pm_clksd_o     ( ),
883
        .pm_cpustall_i  ( 1'b0 ),
884
        .pm_dc_gate_o   ( ),
885
        .pm_ic_gate_o   ( ),
886
        .pm_dmmu_gate_o ( ),
887
        .pm_immu_gate_o ( ),
888
        .pm_tt_gate_o   ( ),
889
        .pm_cpu_gate_o  ( ),
890
        .pm_wakeup_o    ( ),
891
        .pm_lvolt_o     ( ),
892
 
893
        // Interrupts
894
        .pic_ints_i     ( pic_ints )
895
);
896
 
897
//
898
// Instantiation of the Flash controller
899
//
900
flash_top flash_top (
901
 
902
        // WISHBONE common
903
        .wb_clk_i       ( wb_clk ),
904
        .wb_rst_i       ( wb_rst ),
905
 
906
        // WISHBONE slave
907
        .wb_dat_i       ( wb_fs_dat_i ),
908
        .wb_dat_o       ( wb_fs_dat_o ),
909
        .wb_adr_i       ( wb_fs_adr_i ),
910
        .wb_sel_i       ( wb_fs_sel_i ),
911
        .wb_we_i        ( wb_fs_we_i  ),
912
        .wb_cyc_i       ( wb_fs_cyc_i ),
913
        .wb_stb_i       ( wb_fs_stb_i ),
914
        .wb_ack_o       ( wb_fs_ack_o ),
915
        .wb_err_o       ( wb_fs_err_o ),
916
 
917
        // Flash external
918
        .flash_rstn     ( flash_rstn ),
919
        .cen            ( flash_cen ),
920
        .oen            ( flash_oen ),
921
        .wen            ( flash_wen ),
922
        .rdy            ( flash_rdy ),
923
        .d              ( flash_d ),
924
        .a              ( flash_a ),
925
        .a_oe           ( )
926
);
927
 
928
//
929
// Instantiation of the SRAM controller
930
//
931
sram_top sram_top (
932
 
933
        // WISHBONE common
934
        .wb_clk_i       ( wb_clk ),
935
        .wb_rst_i       ( wb_rst ),
936
 
937
        // WISHBONE slave
938
        .wb_dat_i       ( wb_ss_dat_i ),
939
        .wb_dat_o       ( wb_ss_dat_o ),
940
        .wb_adr_i       ( wb_ss_adr_i ),
941
        .wb_sel_i       ( wb_ss_sel_i ),
942
        .wb_we_i        ( wb_ss_we_i  ),
943
        .wb_cyc_i       ( wb_ss_cyc_i ),
944
        .wb_stb_i       ( wb_ss_stb_i ),
945
        .wb_ack_o       ( wb_ss_ack_o ),
946
        .wb_err_o       ( wb_ss_err_o ),
947
 
948
        // SRAM external
949
        .r_cen          ( sram_r_cen ),
950
        .r0_wen         ( sram_r0_wen ),
951
        .r1_wen         ( sram_r1_wen ),
952
        .r_oen          ( sram_r_oen ),
953
        .r_a            ( sram_r_a ),
954
        .r_d_i          ( sram_r_d ),
955
        .r_d_o          ( sram_r_d_o ),
956
        .d_oe           ( sram_d_oe ),
957
        .l_cen          ( sram_l_cen ),
958
        .l0_wen         ( sram_l0_wen ),
959
        .l1_wen         ( sram_l1_wen ),
960
        .l_oen          ( sram_l_oen ),
961
        .l_a            ( sram_l_a ),
962
        .l_d_i          ( sram_l_d ),
963
        .l_d_o          ( sram_l_d_o )
964
);
965
 
966
//
967
// Instantiation of the UART16550
968
//
969
uart_top uart_top (
970
 
971
        // WISHBONE common
972 1268 lampret
        .wb_clk_i       ( wb_clk ),
973 746 lampret
        .wb_rst_i       ( wb_rst ),
974
 
975
        // WISHBONE slave
976
        .wb_adr_i       ( wb_us_adr_i[4:0] ),
977
        .wb_dat_i       ( wb_us_dat_i ),
978
        .wb_dat_o       ( wb_us_dat_o ),
979
        .wb_we_i        ( wb_us_we_i  ),
980
        .wb_stb_i       ( wb_us_stb_i ),
981
        .wb_cyc_i       ( wb_us_cyc_i ),
982
        .wb_ack_o       ( wb_us_ack_o ),
983
        .wb_sel_i       ( wb_us_sel_i ),
984
 
985
        // Interrupt request
986
        .int_o          ( pic_ints[`APP_INT_UART] ),
987
 
988
        // UART signals
989
        // serial input/output
990
        .stx_pad_o      ( uart_stx ),
991
        .srx_pad_i      ( uart_srx ),
992
 
993
        // modem signals
994
        .rts_pad_o      ( ),
995
        .cts_pad_i      ( 1'b0 ),
996
        .dtr_pad_o      ( ),
997
        .dsr_pad_i      ( 1'b0 ),
998
        .ri_pad_i       ( 1'b0 ),
999
        .dcd_pad_i      ( 1'b0 )
1000
);
1001
 
1002
//
1003
// Instantiation of the Ethernet 10/100 MAC
1004
//
1005
eth_top eth_top (
1006
 
1007
        // WISHBONE common
1008
        .wb_clk_i       ( wb_clk ),
1009
        .wb_rst_i       ( wb_rst ),
1010
 
1011
        // WISHBONE slave
1012
        .wb_dat_i       ( wb_es_dat_i ),
1013
        .wb_dat_o       ( wb_es_dat_o ),
1014
        .wb_adr_i       ( wb_es_adr_i[11:2] ),
1015
        .wb_sel_i       ( wb_es_sel_i ),
1016
        .wb_we_i        ( wb_es_we_i  ),
1017
        .wb_cyc_i       ( wb_es_cyc_i ),
1018
        .wb_stb_i       ( wb_es_stb_i ),
1019
        .wb_ack_o       ( wb_es_ack_o ),
1020 1268 lampret
        .wb_err_o       ( wb_es_err_o ),
1021 746 lampret
 
1022
        // WISHBONE master
1023
        .m_wb_adr_o     ( wb_em_adr_o ),
1024
        .m_wb_sel_o     ( wb_em_sel_o ),
1025 1268 lampret
        .m_wb_we_o      ( wb_em_we_o  ),
1026 746 lampret
        .m_wb_dat_o     ( wb_em_dat_o ),
1027
        .m_wb_dat_i     ( wb_em_dat_i ),
1028 1268 lampret
        .m_wb_cyc_o     ( wb_em_cyc_o ),
1029 746 lampret
        .m_wb_stb_o     ( wb_em_stb_o ),
1030
        .m_wb_ack_i     ( wb_em_ack_i ),
1031 1268 lampret
        .m_wb_err_i     ( wb_em_err_i ),
1032 746 lampret
 
1033
        // TX
1034
        .mtx_clk_pad_i  ( eth_tx_clk ),
1035
        .mtxd_pad_o     ( eth_txd ),
1036
        .mtxen_pad_o    ( eth_tx_en ),
1037
        .mtxerr_pad_o   ( eth_tx_er ),
1038
 
1039
        // RX
1040
        .mrx_clk_pad_i  ( eth_rx_clk ),
1041
        .mrxd_pad_i     ( eth_rxd ),
1042
        .mrxdv_pad_i    ( eth_rx_dv ),
1043
        .mrxerr_pad_i   ( eth_rx_er ),
1044
        .mcoll_pad_i    ( eth_col ),
1045
        .mcrs_pad_i     ( eth_crs ),
1046 1268 lampret
 
1047 746 lampret
        // MIIM
1048
        .mdc_pad_o      ( eth_mdc ),
1049
        .md_pad_i       ( eth_mdio ),
1050
        .md_pad_o       ( eth_mdo ),
1051 792 lampret
        .md_padoe_o     ( eth_mdoe ),
1052 746 lampret
 
1053
        // Interrupt
1054
        .int_o          ( pic_ints[`APP_INT_ETH] )
1055
);
1056
 
1057
//
1058
// Instantiation of the PS/2 Keyboard Controller
1059
//
1060
ps2_top ps2_top (
1061
 
1062
        // WISHBONE common
1063
        .wb_clk_i       ( wb_clk ),
1064
        .wb_rst_i       ( wb_rst ),
1065
 
1066
        // WISHBONE slave
1067
        .wb_cyc_i       ( wb_ps_cyc_i ),
1068
        .wb_stb_i       ( wb_ps_stb_i ),
1069
        .wb_we_i        ( wb_ps_we_i  ),
1070
        .wb_sel_i       ( wb_ps_sel_i ),
1071
        .wb_adr_i       ( wb_ps_adr_i ),
1072
        .wb_dat_i       ( wb_ps_dat_i ),
1073
        .wb_dat_o       ( wb_ps_dat_o ),
1074
        .wb_ack_o       ( wb_ps_ack_o ),
1075
 
1076
        // Interrupt
1077
        .wb_int_o       ( pic_ints[`APP_INT_PS2] ),
1078
 
1079
        // PS/2 external wires
1080
        .ps2_kbd_clk_pad_i      ( ps2_clk ),
1081
        .ps2_kbd_data_pad_i     ( ps2_data ),
1082
        .ps2_kbd_clk_pad_o      ( ps2_clk_o ),
1083
        .ps2_kbd_data_pad_o     ( ps2_data_o ),
1084
        .ps2_kbd_clk_pad_oe_o   ( ps2_clk_oe ),
1085
        .ps2_kbd_data_pad_oe_o  ( ps2_data_oe )
1086
);
1087
 
1088
//
1089
// Instantiation of the CPLD TDM
1090
//
1091 752 lampret
// This small block connects XSV FPGA (xsv_fpga_top)
1092
// to the CPLD. CPLD has connections to the
1093 746 lampret
// RS232 PHY chip and to host PC (if you run OR1K
1094 752 lampret
// GDB debugger). In order for TDM to work, CPLD
1095
// must also be programmed with TDM master i/f.
1096 746 lampret
//
1097
tdm_slave_if tdm_slave_if (
1098
        .clk    ( wb_clk ),
1099
        .rst    ( wb_rst ),
1100
        .tdmfrm ( tdmfrm ),
1101
        .tdmrx  ( tdmrx ),
1102
        .tdmtx  ( tdmtx ),
1103
        .din    ( { jtag_tdo, uart_stx, 6'b000_000 } ),
1104
        .dout   ( { jtag_tms, jtag_tck, jtag_trst, jtag_tdi, uart_srx, tdm_out_unused } )
1105
);
1106
 
1107
//
1108
// Instantiation of the Traffic COP
1109
//
1110
tc_top #(`APP_ADDR_DEC_W,
1111
         `APP_ADDR_SRAM,
1112
         `APP_ADDR_DEC_W,
1113
         `APP_ADDR_FLASH,
1114
         `APP_ADDR_DECP_W,
1115
         `APP_ADDR_PERIP,
1116
         `APP_ADDR_DEC_W,
1117
         `APP_ADDR_VGA,
1118
         `APP_ADDR_ETH,
1119
         `APP_ADDR_AUDIO,
1120
         `APP_ADDR_UART,
1121
         `APP_ADDR_PS2,
1122
         `APP_ADDR_RES1,
1123
         `APP_ADDR_RES2
1124
        ) tc_top (
1125
 
1126
        // WISHBONE common
1127
        .wb_clk_i       ( wb_clk ),
1128
        .wb_rst_i       ( wb_rst ),
1129
 
1130
        // WISHBONE Initiator 0
1131
        .i0_wb_cyc_i    ( wb_vm_cyc_o ),
1132
        .i0_wb_stb_i    ( wb_vm_stb_o ),
1133
        .i0_wb_cab_i    ( wb_vm_cab_o ),
1134
        .i0_wb_adr_i    ( wb_vm_adr_o ),
1135
        .i0_wb_sel_i    ( wb_vm_sel_o ),
1136
        .i0_wb_we_i     ( wb_vm_we_o  ),
1137
        .i0_wb_dat_i    ( 32'h0000_0000 ),
1138
        .i0_wb_dat_o    ( wb_vm_dat_i ),
1139
        .i0_wb_ack_o    ( wb_vm_ack_i ),
1140
        .i0_wb_err_o    ( wb_vm_err_i ),
1141
 
1142
        // WISHBONE Initiator 1
1143
        .i1_wb_cyc_i    ( wb_em_cyc_o ),
1144
        .i1_wb_stb_i    ( wb_em_stb_o ),
1145
        .i1_wb_cab_i    ( wb_em_cab_o ),
1146
        .i1_wb_adr_i    ( wb_em_adr_o ),
1147
        .i1_wb_sel_i    ( wb_em_sel_o ),
1148
        .i1_wb_we_i     ( wb_em_we_o  ),
1149
        .i1_wb_dat_i    ( wb_em_dat_o ),
1150
        .i1_wb_dat_o    ( wb_em_dat_i ),
1151
        .i1_wb_ack_o    ( wb_em_ack_i ),
1152
        .i1_wb_err_o    ( wb_em_err_i ),
1153
 
1154
        // WISHBONE Initiator 2
1155
        .i2_wb_cyc_i    ( wb_am_cyc_o ),
1156
        .i2_wb_stb_i    ( wb_am_stb_o ),
1157
        .i2_wb_cab_i    ( wb_am_cab_o ),
1158
        .i2_wb_adr_i    ( wb_am_adr_o ),
1159
        .i2_wb_sel_i    ( wb_am_sel_o ),
1160
        .i2_wb_we_i     ( wb_am_we_o  ),
1161
        .i2_wb_dat_i    ( wb_am_dat_o ),
1162
        .i2_wb_dat_o    ( wb_am_dat_i ),
1163
        .i2_wb_ack_o    ( wb_am_ack_i ),
1164
        .i2_wb_err_o    ( wb_am_err_i ),
1165
 
1166
        // WISHBONE Initiator 3
1167
        .i3_wb_cyc_i    ( wb_dm_cyc_o ),
1168
        .i3_wb_stb_i    ( wb_dm_stb_o ),
1169
        .i3_wb_cab_i    ( wb_dm_cab_o ),
1170
        .i3_wb_adr_i    ( wb_dm_adr_o ),
1171
        .i3_wb_sel_i    ( wb_dm_sel_o ),
1172
        .i3_wb_we_i     ( wb_dm_we_o  ),
1173
        .i3_wb_dat_i    ( wb_dm_dat_o ),
1174
        .i3_wb_dat_o    ( wb_dm_dat_i ),
1175
        .i3_wb_ack_o    ( wb_dm_ack_i ),
1176
        .i3_wb_err_o    ( wb_dm_err_i ),
1177
 
1178
        // WISHBONE Initiator 4
1179
        .i4_wb_cyc_i    ( wb_rdm_cyc_o ),
1180
        .i4_wb_stb_i    ( wb_rdm_stb_o ),
1181
        .i4_wb_cab_i    ( wb_rdm_cab_o ),
1182
        .i4_wb_adr_i    ( wb_rdm_adr_o ),
1183
        .i4_wb_sel_i    ( wb_rdm_sel_o ),
1184
        .i4_wb_we_i     ( wb_rdm_we_o  ),
1185
        .i4_wb_dat_i    ( wb_rdm_dat_o ),
1186
        .i4_wb_dat_o    ( wb_rdm_dat_i ),
1187 789 lampret
        .i4_wb_ack_o    ( wb_rdm_ack ),
1188 746 lampret
        .i4_wb_err_o    ( wb_rdm_err_i ),
1189
 
1190
        // WISHBONE Initiator 5
1191
        .i5_wb_cyc_i    ( wb_rim_cyc_o ),
1192
        .i5_wb_stb_i    ( wb_rim_stb_o ),
1193
        .i5_wb_cab_i    ( wb_rim_cab_o ),
1194
        .i5_wb_adr_i    ( wb_rif_adr ),
1195
        .i5_wb_sel_i    ( wb_rim_sel_o ),
1196
        .i5_wb_we_i     ( wb_rim_we_o  ),
1197
        .i5_wb_dat_i    ( wb_rim_dat_o ),
1198
        .i5_wb_dat_o    ( wb_rim_dat_i ),
1199
        .i5_wb_ack_o    ( wb_rim_ack_i ),
1200
        .i5_wb_err_o    ( wb_rim_err_i ),
1201
 
1202
        // WISHBONE Initiator 6
1203
        .i6_wb_cyc_i    ( 1'b0 ),
1204
        .i6_wb_stb_i    ( 1'b0 ),
1205
        .i6_wb_cab_i    ( 1'b0 ),
1206
        .i6_wb_adr_i    ( 32'h0000_0000 ),
1207
        .i6_wb_sel_i    ( 4'b0000 ),
1208
        .i6_wb_we_i     ( 1'b0 ),
1209
        .i6_wb_dat_i    ( 32'h0000_0000 ),
1210
        .i6_wb_dat_o    ( ),
1211
        .i6_wb_ack_o    ( ),
1212
        .i6_wb_err_o    ( ),
1213
 
1214
        // WISHBONE Initiator 7
1215
        .i7_wb_cyc_i    ( 1'b0 ),
1216
        .i7_wb_stb_i    ( 1'b0 ),
1217
        .i7_wb_cab_i    ( 1'b0 ),
1218
        .i7_wb_adr_i    ( 32'h0000_0000 ),
1219
        .i7_wb_sel_i    ( 4'b0000 ),
1220
        .i7_wb_we_i     ( 1'b0 ),
1221
        .i7_wb_dat_i    ( 32'h0000_0000 ),
1222
        .i7_wb_dat_o    ( ),
1223
        .i7_wb_ack_o    ( ),
1224
        .i7_wb_err_o    ( ),
1225
 
1226
        // WISHBONE Target 0
1227
        .t0_wb_cyc_o    ( wb_ss_cyc_i ),
1228
        .t0_wb_stb_o    ( wb_ss_stb_i ),
1229
        .t0_wb_cab_o    ( wb_ss_cab_i ),
1230
        .t0_wb_adr_o    ( wb_ss_adr_i ),
1231
        .t0_wb_sel_o    ( wb_ss_sel_i ),
1232
        .t0_wb_we_o     ( wb_ss_we_i  ),
1233
        .t0_wb_dat_o    ( wb_ss_dat_i ),
1234
        .t0_wb_dat_i    ( wb_ss_dat_o ),
1235
        .t0_wb_ack_i    ( wb_ss_ack_o ),
1236
        .t0_wb_err_i    ( wb_ss_err_o ),
1237
 
1238
        // WISHBONE Target 1
1239
        .t1_wb_cyc_o    ( wb_fs_cyc_i ),
1240
        .t1_wb_stb_o    ( wb_fs_stb_i ),
1241
        .t1_wb_cab_o    ( wb_fs_cab_i ),
1242
        .t1_wb_adr_o    ( wb_fs_adr_i ),
1243
        .t1_wb_sel_o    ( wb_fs_sel_i ),
1244
        .t1_wb_we_o     ( wb_fs_we_i  ),
1245
        .t1_wb_dat_o    ( wb_fs_dat_i ),
1246
        .t1_wb_dat_i    ( wb_fs_dat_o ),
1247
        .t1_wb_ack_i    ( wb_fs_ack_o ),
1248
        .t1_wb_err_i    ( wb_fs_err_o ),
1249
 
1250
        // WISHBONE Target 2
1251
        .t2_wb_cyc_o    ( wb_vs_cyc_i ),
1252
        .t2_wb_stb_o    ( wb_vs_stb_i ),
1253
        .t2_wb_cab_o    ( wb_vs_cab_i ),
1254
        .t2_wb_adr_o    ( wb_vs_adr_i ),
1255
        .t2_wb_sel_o    ( wb_vs_sel_i ),
1256
        .t2_wb_we_o     ( wb_vs_we_i  ),
1257
        .t2_wb_dat_o    ( wb_vs_dat_i ),
1258
        .t2_wb_dat_i    ( wb_vs_dat_o ),
1259
        .t2_wb_ack_i    ( wb_vs_ack_o ),
1260
        .t2_wb_err_i    ( wb_vs_err_o ),
1261
 
1262
        // WISHBONE Target 3
1263
        .t3_wb_cyc_o    ( wb_es_cyc_i ),
1264
        .t3_wb_stb_o    ( wb_es_stb_i ),
1265
        .t3_wb_cab_o    ( wb_es_cab_i ),
1266
        .t3_wb_adr_o    ( wb_es_adr_i ),
1267
        .t3_wb_sel_o    ( wb_es_sel_i ),
1268
        .t3_wb_we_o     ( wb_es_we_i  ),
1269
        .t3_wb_dat_o    ( wb_es_dat_i ),
1270
        .t3_wb_dat_i    ( wb_es_dat_o ),
1271
        .t3_wb_ack_i    ( wb_es_ack_o ),
1272
        .t3_wb_err_i    ( wb_es_err_o ),
1273
 
1274
        // WISHBONE Target 4
1275
        .t4_wb_cyc_o    ( wb_as_cyc_i ),
1276
        .t4_wb_stb_o    ( wb_as_stb_i ),
1277
        .t4_wb_cab_o    ( wb_as_cab_i ),
1278
        .t4_wb_adr_o    ( wb_as_adr_i ),
1279
        .t4_wb_sel_o    ( wb_as_sel_i ),
1280
        .t4_wb_we_o     ( wb_as_we_i  ),
1281
        .t4_wb_dat_o    ( wb_as_dat_i ),
1282
        .t4_wb_dat_i    ( wb_as_dat_o ),
1283
        .t4_wb_ack_i    ( wb_as_ack_o ),
1284
        .t4_wb_err_i    ( wb_as_err_o ),
1285
 
1286
        // WISHBONE Target 5
1287
        .t5_wb_cyc_o    ( wb_us_cyc_i ),
1288
        .t5_wb_stb_o    ( wb_us_stb_i ),
1289
        .t5_wb_cab_o    ( wb_us_cab_i ),
1290
        .t5_wb_adr_o    ( wb_us_adr_i ),
1291
        .t5_wb_sel_o    ( wb_us_sel_i ),
1292
        .t5_wb_we_o     ( wb_us_we_i  ),
1293
        .t5_wb_dat_o    ( wb_us_dat_i ),
1294
        .t5_wb_dat_i    ( wb_us_dat_o ),
1295
        .t5_wb_ack_i    ( wb_us_ack_o ),
1296
        .t5_wb_err_i    ( wb_us_err_o ),
1297
 
1298
        // WISHBONE Target 6
1299
        .t6_wb_cyc_o    ( wb_ps_cyc_i ),
1300
        .t6_wb_stb_o    ( wb_ps_stb_i ),
1301
        .t6_wb_cab_o    ( wb_ps_cab_i ),
1302
        .t6_wb_adr_o    ( wb_ps_adr_i ),
1303
        .t6_wb_sel_o    ( wb_ps_sel_i ),
1304
        .t6_wb_we_o     ( wb_ps_we_i  ),
1305
        .t6_wb_dat_o    ( wb_ps_dat_i ),
1306
        .t6_wb_dat_i    ( wb_ps_dat_o ),
1307
        .t6_wb_ack_i    ( wb_ps_ack_o ),
1308
        .t6_wb_err_i    ( wb_ps_err_o ),
1309
 
1310
        // WISHBONE Target 7
1311
        .t7_wb_cyc_o    ( ),
1312
        .t7_wb_stb_o    ( ),
1313
        .t7_wb_cab_o    ( ),
1314
        .t7_wb_adr_o    ( ),
1315
        .t7_wb_sel_o    ( ),
1316
        .t7_wb_we_o     ( ),
1317
        .t7_wb_dat_o    ( ),
1318
        .t7_wb_dat_i    ( 32'h0000_0000 ),
1319
        .t7_wb_ack_i    ( 1'b0 ),
1320
        .t7_wb_err_i    ( 1'b1 ),
1321
 
1322
        // WISHBONE Target 8
1323
        .t8_wb_cyc_o    ( ),
1324
        .t8_wb_stb_o    ( ),
1325
        .t8_wb_cab_o    ( ),
1326
        .t8_wb_adr_o    ( ),
1327
        .t8_wb_sel_o    ( ),
1328
        .t8_wb_we_o     ( ),
1329
        .t8_wb_dat_o    ( ),
1330
        .t8_wb_dat_i    ( 32'h0000_0000 ),
1331
        .t8_wb_ack_i    ( 1'b0 ),
1332
        .t8_wb_err_i    ( 1'b1 )
1333
);
1334
 
1335 1133 lampret
//initial begin
1336
//  $dumpvars(0);
1337
//  $dumpfile("dump.vcd");
1338
//end
1339
 
1340 746 lampret
endmodule

powered by: WebSVN 2.1.0

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