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 797

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

powered by: WebSVN 2.1.0

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