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 1141

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

powered by: WebSVN 2.1.0

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