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

Subversion Repositories or1k

[/] [or1k/] [tags/] [first/] [mp3/] [rtl/] [verilog/] [xfpga_top.v] - Blame information for rev 266

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

Line No. Rev Author Line
1 266 lampret
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  MP3 demo Top Level                                          ////
4
////                                                              ////
5
////  This file is part of the MP3 demo application               ////
6
////  http://www.opencores.org/cores/or1k/mp3/                    ////
7
////                                                              ////
8
////  Description                                                 ////
9
////  Top level instantiating all the blocks.                     ////
10
////                                                              ////
11
////  To Do:                                                      ////
12
////   - nothing really                                           ////
13
////                                                              ////
14
////  Author(s):                                                  ////
15
////      - Lior Shtram, lior.shtram@flextronicssemi.com          ////
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
 
48
`define EXCLUDE_DBG
49
// `define EXCLUDE_VGA
50
// `define EXCLUDE_RISC
51
// `define VGA_RAMDAC
52
 
53
`include "xfpga_defines.v"
54
 
55
module xfpga_top (
56
 
57
// Global connections
58
        clk,
59
//      clk2,
60
        rstn,
61
 
62
// Flash RAM
63
        flash_rstn,
64
        flash_cen,
65
        flash_oen,
66
        flash_wen,
67
        flash_rdy,
68
        flash_d,
69
        flash_a,
70
 
71
// SRAM Right
72
        sram_r_cen,
73
        sram_r_oen,
74
        sram_r0_wen,
75
        sram_r1_wen,
76
        sram_r_d,
77
        sram_r_a,
78
 
79
// SRAM Left
80
        sram_l_cen,
81
        sram_l_oen,
82
        sram_l0_wen,
83
        sram_l1_wen,
84
        sram_l_d,
85
        sram_l_a,
86
 
87
`ifdef VGA_RAMDAC
88
 
89
// VGA RAMDAC
90
        ramdac_pixclk,
91
        ramdac_hsyncn,
92
        ramdac_vsync,
93
        ramdac_blank,
94
        ramdac_p,
95
        ramdac_rdn,
96
        ramdac_wrn,
97
        ramdac_rs,
98
        ramdac_d,
99
 
100
`else
101
 
102
// VGA Direct
103
        vga_blank,
104
        vga_pclk,
105
        vga_hsyncn,
106
        vga_vsyncn,
107
        vga_r,
108
        vga_g,
109
        vga_b,
110
 
111
`endif
112
 
113
// Codec connections
114
        codec_mclk,
115
        codec_lrclk,
116
        codec_sclk,
117
        codec_sdin,
118
        codec_sdout,
119
 
120
// Ethernet
121
        eth_col,
122
        eth_crs,
123
        eth_trste,
124
        eth_tx_clk,
125
        eth_tx_en,
126
        eth_tx_er,
127
        eth_txd,
128
        eth_rx_clk,
129
        eth_rx_dv,
130
        eth_rx_er,
131
        eth_rxd,
132
        eth_fds_mdint,
133
        eth_mdc,
134
        eth_mdio,
135
 
136
// Switches
137
        sw,
138
 
139
// Used for tracing fifo activity (CODEC)
140
  USB_VPO,
141
  USB_VMO,
142
 
143
// PS2 port
144
        ps2_clk,
145
        ps2_data,
146
 
147
// GDB JTAG CPLD
148
/*
149
cpld_muxr,
150
        cpld_muxd,
151
*/
152
        cpld_tdo
153
 
154
);
155
 
156
 
157
// Global connections
158
 
159
input clk;
160
//input clk2;
161
input rstn;
162
 
163
// Flash RAM
164
 
165
output          flash_rstn;
166
output          flash_cen;
167
output          flash_oen;
168
output          flash_wen;
169
input           flash_rdy;
170
inout [7:0]      flash_d;
171
inout [20:0]     flash_a;
172
 
173
// SRAM Right
174
 
175
output          sram_r_cen;
176
output          sram_r1_wen;
177
output          sram_r0_wen;
178
output          sram_r_oen;
179
output [18:0]    sram_r_a;
180
inout [15:0]     sram_r_d;
181
 
182
// SRAM Left
183
 
184
output          sram_l_cen;
185
output          sram_l0_wen;
186
output          sram_l1_wen;
187
output          sram_l_oen;
188
output [18:0]    sram_l_a;
189
inout [15:0]     sram_l_d;
190
 
191
`ifdef VGA_RAMDAC
192
 
193
output          ramdac_pixclk;
194
output          ramdac_hsyncn;
195
output          ramdac_vsync;
196
output          ramdac_blank;
197
output [7:0]     ramdac_p;
198
output          ramdac_rdn;
199
output          ramdac_wrn;
200
output [2:0]     ramdac_rs;
201
inout  [7:0]     ramdac_d;
202
 
203
`else
204
 
205
// VGA Direct
206
 
207
output          vga_pclk;
208
output          vga_blank;
209
output          vga_hsyncn;
210
output          vga_vsyncn;
211
output [3:0]     vga_r;
212
output [3:0]     vga_g;
213
output [3:0]     vga_b;
214
 
215
`endif
216
 
217
// Stereo Codec
218
 
219
output          codec_mclk;
220
output          codec_lrclk;
221
output          codec_sclk;
222
output          codec_sdin;
223
input           codec_sdout;
224
 
225
// Ethernet
226
 
227
output          eth_tx_er;
228
input           eth_tx_clk;
229
output          eth_tx_en;
230
output [4:0]     eth_txd;
231
input           eth_rx_er;
232
input           eth_rx_clk;
233
input           eth_rx_dv;
234
input [4: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
// Switches
243
input [2:1]     sw;
244
 
245
// Used for tracing fifo activity (CODEC)
246
output USB_VPO;
247
output USB_VMO;
248
 
249
// PS2 port
250
inout           ps2_clk;
251
inout           ps2_data;
252
 
253
// GDB JTAG muxed from the CPLD
254
/*
255
input           cpld_muxr;
256
input           cpld_muxd;
257
*/
258
output          cpld_tdo;
259
 
260
/////////////////////////////////////////////////////////////////////////////////////
261
// And now for the insides
262
 
263
wire [31:0]      wb_vs_adr_i;
264
wire [31:0]      wb_vs_dat_i;
265
wire [31:0]      wb_vs_dat_o;
266
wire [3:0]       wb_vs_sel_i;
267
wire            wb_vs_we_i;
268
wire            wb_vs_stb_i;
269
wire            wb_vs_cyc_i;
270
wire            wb_vs_ack_o;
271
wire            wb_vs_err_o;
272
 
273
wire [31:0]      wb_vm_adr_o;
274
wire [31:0]      wb_vm_dat_i;
275
wire [3:0]       wb_vm_sel_o;
276
wire            wb_vm_we_o;
277
wire            wb_vm_stb_o;
278
wire            wb_vm_cyc_o;
279
wire            wb_vm_cab_o;
280
wire            wb_vm_ack_i;
281
wire            wb_vm_err_i;
282
 
283
wire [31:0]      wb_dm_adr_o;
284
wire [31:0]      wb_dm_dat_i;
285
wire [31:0]      wb_dm_dat_o;
286
wire [3:0]       wb_dm_sel_o;
287
wire            wb_dm_we_o;
288
wire            wb_dm_stb_o;
289
wire            wb_dm_cyc_o;
290
wire            wb_dm_cab_o;
291
wire            wb_dm_ack_i;
292
wire            wb_dm_err_i;
293
 
294
wire [31:0]      wb_ri_adr_o;
295
wire            wb_ri_cyc_o;
296
wire [31:0]      wb_ri_dat_i;
297
wire [31:0]      wb_ri_dat_o;
298
wire [3:0]       wb_ri_sel_o;
299
wire            wb_ri_ack_i;
300
wire            wb_ri_err_i;
301
wire            wb_ri_rty_i;
302
wire            wb_ri_we_o;
303
wire            wb_ri_stb_o;
304
 
305
wire [31:0]      wb_rd_adr_o;
306
wire            wb_rd_cyc_o;
307
wire [31:0]      wb_rd_dat_i;
308
wire [31:0]      wb_rd_dat_o;
309
wire [3:0]       wb_rd_sel_o;
310
wire            wb_rd_ack_i;
311
wire            wb_rd_err_i;
312
wire            wb_rd_rty_i;
313
wire            wb_rd_we_o;
314
wire            wb_rd_stb_o;
315
 
316
wire [31:0]      wb_sr_dat_i;
317
wire [31:0]      wb_sr_dat_o;
318
wire [31:0]      wb_sr_adr_i;
319
wire [3:0]       wb_sr_sel_i;
320
wire            wb_sr_we_i;
321
wire            wb_sr_cyc_i;
322
wire            wb_sr_stb_i;
323
wire            wb_sr_ack_o;
324
wire            wb_sr_err_o;
325
 
326
wire [31:0]      wb_fl_dat_i;
327
wire [31:0]      wb_fl_dat_o;
328
wire [31:0]      wb_fl_adr_i;
329
wire [3:0]       wb_fl_sel_i;
330
wire            wb_fl_we_i;
331
wire            wb_fl_cyc_i;
332
wire            wb_fl_stb_i;
333
wire            wb_fl_ack_o;
334
wire            wb_fl_err_o;
335
 
336
wire [31:0]      wb_au_dat_i;
337
wire [31:0]      wb_au_dat_o;
338
wire [31:0]      wb_au_adr_i;
339
wire [3:0]       wb_au_sel_i;
340
wire            wb_au_we_i;
341
wire            wb_au_cyc_i;
342
wire            wb_au_stb_i;
343
wire            wb_au_ack_o;
344
wire            wb_au_err_o;
345
 
346
wire            vga_int;
347
 
348
wire            audio_dreq;
349
 
350
reg my_int;
351
 
352
wire [3:0]       vga_r_int;
353
wire [3:0]       vga_g_int;
354
wire [3:0]       vga_b_int;
355
 
356
wire crt_hsync;
357
wire crt_vsync;
358
 
359
wire    [3:0]    dbg_lss;
360
wire    [1:0]    dbg_is;
361
wire    [10:0]   dbg_wp;
362
wire            dbg_bp;
363
wire    [31:0]   dbg_dat_dbg;
364
wire    [31:0]   dbg_dat_risc;
365
wire    [31:0]   dbg_adr;
366
wire            dbg_ewt;
367
wire            dbg_stall;
368
wire    [2:0]    dbg_op;
369
 
370
wire            jtag_tdi;
371
wire            jtag_tms;
372
wire            jtag_tck;
373
wire            jtag_trst;
374
wire            jtag_tdo;
375
 
376
wire    [20:0]   flash_a_int;
377
wire                    flash_a_oe;
378
 
379
wire simon = sw[1];
380
wire igor  = sw[2];
381
 
382
 
383
reg resetn_d;
384
reg resetn;
385
wire    wb_clk_i;
386
wire    clk_dll;
387
wire    clk_buf1;
388
 
389
`ifdef EXCLUDE_DBG
390
`else
391
reg sram_ra;
392
`endif
393
 
394
always @ (posedge wb_clk_i or negedge rstn)
395
begin
396
  if(~rstn)
397
    resetn_d <= 1'b0;
398
  else
399
    resetn_d <= #1 1'b1;
400
end
401
 
402
always @ (posedge wb_clk_i)
403
begin
404
  resetn <= #1 resetn_d;
405
end
406
 
407
`ifdef TARGET_VIRTEX
408
IBUFG IBUFG1(.O(wb_clk_i), .I(clk));
409
`else
410
assign wb_clk_i = clk;
411
`endif
412
 
413
/////////////////////////////////////////////////////////////////////////////////////
414
// GDB JTAG demultiplexer
415
`ifdef EXCLUDE_DBG
416
assign jtag_tms  = 1'b0;
417
assign jtag_tdi  = 1'b0;
418
assign jtag_trst = 1'b1;
419
assign jtag_tck  = 1'b0;
420
assign cpld_tdo  = 1'b0;
421
 
422
assign flash_a = flash_a_int;
423
`else
424
/* SIMON */
425
 
426
always @ (posedge clk or negedge rstn)
427
begin
428
  if(~rstn)
429
    sram_ra <= 1'b0;
430
  else if(wb_sr_cyc_i & wb_sr_stb_i & !wb_sr_we_i & !sram_ra)
431
    sram_ra <= #1 1'b1;
432
end
433
assign jtag_tms = ~sram_ra ? 1'b0 : flash_a[6];
434
assign jtag_tdi = ~sram_ra ? 1'b0 : flash_a[7];
435
assign jtag_trst = ~sram_ra ? 1'b1 : flash_a[8];
436
assign jtag_tck = ~sram_ra ? 1'b0 : flash_a[9];
437
assign cpld_tdo = ~sram_ra ? 1'b0 : jtag_tdo;
438
 
439
assign flash_a = ~sram_ra ? flash_a_int : 21'bz;
440
`endif
441
 
442
/////////////////////////////////////////////////////////////////////////////////////
443
// The VGA block
444
 
445
`ifdef EXCLUDE_VGA
446
   initial $display("Warning: exclude vga.");
447
   vga_dummy_top vga
448
   (
449
        .wb_clk_i( wb_clk_i ),
450
        .wb_rst_i( resetn ),
451
        .rst_nreset_i( resetn ),
452
        .wb_inta_o( vga_int ),
453
        .clk_pclk_i( vga_pclk ),
454
        .vga_hsync_pad_o( vga_hsyncn ),
455
        .vga_vsync_pad_o( vga_vsyncn ),
456
        .vga_csync_pad_o( ),
457
        .vga_blank_pad_o( vga_blank ),
458
        .vga_r_pad_o( vga_r[3:0] ),
459
        .vga_b_pad_o( vga_b[3:0] ),
460
        .vga_g_pad_o( vga_g[3:0] ),
461
 
462
        .wb_adr_i( wb_vs_adr_i ),
463
        .wb_sdat_i( wb_vs_dat_i ),
464
        .wb_sdat_o( wb_vs_dat_o ),
465
        .wb_sel_i( wb_vs_sel_i ),
466
        .wb_we_i( wb_vs_we_i ),
467
        .wb_vga_stb_i( wb_vs_stb_i ),
468
        .wb_clut_stb_i( wb_vs_stb_i ),
469
        .wb_cyc_i( wb_vs_cyc_i ),
470
        .wb_ack_o( wb_vs_ack_o ),
471
        .wb_err_o( wb_vs_err_o ),
472
 
473
        .wb_adr_o( wb_vm_adr_o ),
474
        .wb_mdat_i( wb_vm_dat_i ),
475
        .wb_sel_o( wb_vm_sel_o ),
476
        .wb_we_o( wb_vm_we_o ),
477
        .wb_stb_o( wb_vm_stb_o ),
478
        .wb_cyc_o( wb_vm_cyc_o ),
479
        .wb_cab_o( wb_vm_cab_o ),
480
        .wb_ack_i( wb_vm_ack_i ),
481
        .wb_err_i( wb_vm_err_i )
482
   );
483
`else
484
 
485
 
486
 
487
 
488
   // CRT controler instance
489
   ssvga_top CRT
490
   (
491
    // Clock and reset
492
    .wb_clk_i(wb_clk_i),
493
    .wb_rst_i(~resetn),
494
 
495
    // WISHBONE Master I/F
496
    .wbm_cyc_o  (wb_vm_cyc_o),
497
    .wbm_stb_o  (wb_vm_stb_o),
498
    .wbm_sel_o  (wb_vm_sel_o),
499
    .wbm_we_o   (wb_vm_we_o),
500
    .wbm_adr_o  (wb_vm_adr_o),
501
    .wbm_dat_o  (),
502
    .wbm_cab_o  (wb_vm_cab_o),
503
    .wbm_dat_i  (wb_vm_dat_i),
504
    .wbm_ack_i  (wb_vm_ack_i),
505
    .wbm_err_i  (wb_vm_err_i),
506
    .wbm_rty_i  (1'b0),
507
 
508
    // WISHBONE Slave I/F
509
    .wbs_cyc_i  (wb_vs_cyc_i),
510
    .wbs_stb_i  (wb_vs_stb_i),
511
    .wbs_sel_i  (wb_vs_sel_i),
512
    .wbs_we_i   (wb_vs_we_i),
513
    .wbs_adr_i  (wb_vs_adr_i),
514
    .wbs_dat_i  (wb_vs_dat_i),
515
    .wbs_cab_i  (1'b0),
516
    .wbs_dat_o  (wb_vs_dat_o),
517
    .wbs_ack_o  (wb_vs_ack_o),
518
    .wbs_err_o  (wb_vs_err_o),
519
    .wbs_rty_o  (),
520
 
521
    // Signals to VGA display
522
    .pad_hsync_o (crt_hsync),
523
    .pad_vsync_o (crt_vsync),
524
    .pad_rgb_o   ({vga_r_int, vga_g_int, vga_b_int}),
525
    .led_o       (),
526
        .pix_clk     (crt_out_reg_clk),
527
        .misc({11'b0, jtag_tdo, jtag_trst, jtag_tdi, jtag_tms, jtag_tck})
528
   );
529
 
530
   CRTC_IOB crt_out_reg
531
   (
532
    .reset_in     (~resetn),
533
    .clk_in       (crt_out_reg_clk),
534
    .hsync_in     (crt_hsync),
535
    .vsync_in     (crt_vsync),
536
    .rgb_in       ({vga_r_int, vga_g_int, vga_b_int}),
537
    .hsync_out    (vga_hsyncn),
538
    .vsync_out    (vga_vsyncn),
539
    .rgb_out      ({vga_r, vga_g, vga_b})
540
   ) ;
541
`endif
542
 
543
 
544
/////////////////////////////////////////////////////////////////////////////////////
545
// The Audio block
546
//
547
audio_top audio (
548
        .clk( wb_clk_i ),
549
        .rstn( resetn ),
550
        .wb_dat_i( wb_au_dat_i ),
551
        .wb_dat_o( wb_au_dat_o ),
552
        .wb_adr_i( wb_au_adr_i ),
553
        .wb_sel_i( wb_au_sel_i ),
554
        .wb_we_i(  wb_au_we_i  ),
555
        .wb_cyc_i( wb_au_cyc_i ),
556
        .wb_stb_i( wb_au_stb_i ),
557
        .wb_ack_o( wb_au_ack_o ),
558
        .wb_err_o( wb_au_err_o ),
559
        .mclk( codec_mclk ),
560
        .lrclk( codec_lrclk ),
561
        .sclk( codec_sclk ),
562
        .sdin( codec_sdin ),
563
        .sdout( codec_sdout ),
564
 
565
        .audio_dreq( audio_dreq ),
566
        .igor(simon),
567
        .simon(igor),
568
        .USB_VPO(USB_VPO),
569
  .USB_VMO(USB_VMO)
570
 
571
);
572
 
573
//////////////////////////////////////////////////////
574
// Development i/f
575
dbg_top dbg1  (
576
/*
577
        .tms_pad_i(1'b0),
578
        .tck_pad_i(1'b0),
579
        .trst_pad_i(1'b1),
580
  .tdi_pad_i(1'b0),
581
        .tdo_pad_o(),
582
*/
583
        .tms_pad_i(jtag_tms),
584
        .tck_pad_i(jtag_tck),
585
        .trst_pad_i(jtag_trst),
586
  .tdi_pad_i(jtag_tdi),
587
        .tdo_pad_o(jtag_tdo),
588
 
589
  .capture_dr_o(),
590
  .shift_dr_o(),
591
  .update_dr_o(),
592
  .extest_selected_o(),
593
  .bs_chain_i(1'b0),
594
 
595
        .wb_rst_i(~resetn),
596
        .risc_clk_i(wb_clk_i),
597
  .risc_data_i(dbg_dat_risc),
598
        .wp_i(dbg_wp),
599
        .bp_i(dbg_bp),
600
        .lsstatus_i(dbg_lss),
601
        .istatus_i(dbg_is),
602
 
603
        .risc_data_o(dbg_dat_dbg),
604
        .risc_addr_o(dbg_adr),
605
        .opselect_o(dbg_op),
606
        .risc_stall_o(dbg_stall),
607
        .reset_o(),
608
 
609
        .wb_clk_i(wb_clk_i),
610
        .wb_adr_o( wb_dm_adr_o ),
611
        .wb_dat_i( wb_dm_dat_i ),
612
        .wb_dat_o( wb_dm_dat_o ),
613
        .wb_sel_o( wb_dm_sel_o ),
614
        .wb_we_o(  wb_dm_we_o  ),
615
        .wb_stb_o( wb_dm_stb_o ),
616
        .wb_cyc_o( wb_dm_cyc_o ),
617
        .wb_cab_o( wb_dm_cab_o ),
618
        .wb_ack_i( wb_dm_ack_i ),
619
        .wb_err_i( wb_dm_err_i )
620
);
621
 
622
/////////////////////////////////////////////////////////////////////////////////////
623
// The CPU block
624
`ifdef EXCLUDE_RISC
625
or1200_dummy risc (
626
`else
627
or1200 risc (
628
`endif
629
        .iwb_clk_i( wb_clk_i ),
630
        .iwb_rst_i( ~resetn ),
631
        .iwb_cyc_o( wb_ri_cyc_o ),
632
        .iwb_adr_o( wb_ri_adr_o ),
633
        .iwb_dat_i( wb_ri_dat_i ),
634
        .iwb_dat_o( wb_ri_dat_o ),
635
        .iwb_sel_o( wb_ri_sel_o ),
636
        .iwb_ack_i( wb_ri_ack_i ),
637
        .iwb_err_i( wb_ri_err_i ),
638
        .iwb_rty_i( wb_ri_rty_i ),
639
        .iwb_we_o(  wb_ri_we_o  ),
640
        .iwb_stb_o( wb_ri_stb_o ),
641
 
642
        .dwb_clk_i( wb_clk_i ),
643
        .dwb_rst_i( ~resetn ),
644
        .dwb_cyc_o( wb_rd_cyc_o ),
645
        .dwb_adr_o( wb_rd_adr_o ),
646
        .dwb_dat_i( wb_rd_dat_i ),
647
        .dwb_dat_o( wb_rd_dat_o ),
648
        .dwb_sel_o( wb_rd_sel_o ),
649
        .dwb_ack_i( wb_rd_ack_i ),
650
        .dwb_err_i( wb_rd_err_i ),
651
        .dwb_rty_i( wb_rd_rty_i ),
652
        .dwb_we_o(  wb_rd_we_o  ),
653
        .dwb_stb_o( wb_rd_stb_o ),
654
 
655
        .rst( ~resetn ),
656
        .clk( wb_clk_i ),
657
        .clkdiv_by_2( 1'b1 ),
658
 
659
        .dbg_stall_i(dbg_stall),
660
        .dbg_dat_i(dbg_dat_dbg),
661
        .dbg_adr_i(dbg_adr),
662
        .dbg_op_i(dbg_op),
663
        .dbg_ewt_i(1'b0),
664
 
665
        .dbg_lss_o(dbg_lss),
666
        .dbg_is_o(dbg_is),
667
        .dbg_wp_o(dbg_wp),
668
        .dbg_bp_o(dbg_bp),
669
        .dbg_dat_o(dbg_dat_risc),
670
 
671
        .pm_clksd( ),
672
        .pm_cpustall( 1'b0 ),
673
        .pm_dc_gate( ),
674
        .pm_ic_gate( ),
675
        .pm_dmmu_gate( ),
676
        .pm_immu_gate( ),
677
        .pm_tt_gate( ),
678
        .pm_cpu_gate( ),
679
        .pm_wakeup( ),
680
        .pm_lvolt( ),
681
//      .pic_ints( { 19'b0, audio_dreq } )
682
        .pic_ints( { my_int, 19'b0} )
683
);
684
 
685
/////////////////////////////////////////////////////////////////////////////////////
686
// The Flash controller
687
flash_top flash (
688
        .clk( wb_clk_i ),
689
        .rstn( resetn ),
690
        .wb_dat_i( wb_fl_dat_i ),
691
        .wb_dat_o( wb_fl_dat_o ),
692
        .wb_adr_i( wb_fl_adr_i ),
693
        .wb_sel_i( wb_fl_sel_i ),
694
        .wb_we_i(  wb_fl_we_i  ),
695
        .wb_cyc_i( wb_fl_cyc_i ),
696
        .wb_stb_i( wb_fl_stb_i ),
697
        .wb_ack_o( wb_fl_ack_o ),
698
        .wb_err_o( wb_fl_err_o ),
699
        .flash_rstn( flash_rstn ),
700
        .cen( flash_cen ),
701
        .oen( flash_oen ),
702
        .wen( flash_wen ),
703
        .rdy( flash_rdy ),
704
        .d( flash_d ),
705
        .a( flash_a_int ),
706
        .a_oe( flash_a_oe )
707
);
708
 
709
/////////////////////////////////////////////////////////////////////////////////////
710
// The SRAM controller
711
sram_top sram (
712
        .clk( wb_clk_i ),
713
        .rstn( resetn ),
714
        .wb_dat_i( wb_sr_dat_i ),
715
        .wb_dat_o( wb_sr_dat_o ),
716
        .wb_adr_i( wb_sr_adr_i ),
717
        .wb_sel_i( wb_sr_sel_i ),
718
        .wb_we_i(  wb_sr_we_i  ),
719
        .wb_cyc_i( wb_sr_cyc_i ),
720
        .wb_stb_i( wb_sr_stb_i ),
721
        .wb_ack_o( wb_sr_ack_o ),
722
        .wb_err_o( wb_sr_err_o ),
723
        .r_cen( sram_r_cen ),
724
        .r0_wen( sram_r0_wen ),
725
        .r1_wen( sram_r1_wen ),
726
        .r_oen( sram_r_oen ),
727
        .r_a( sram_r_a ),
728
        .r_d( sram_r_d ),
729
        .l_cen( sram_l_cen ),
730
        .l0_wen( sram_l0_wen ),
731
        .l1_wen( sram_l1_wen ),
732
        .l_oen( sram_l_oen ),
733
        .l_a( sram_l_a ),
734
        .l_d( sram_l_d )
735
);
736
 
737
/////////////////////////////////////////////////////////////////////////////////////
738
// The Traffic COP
739
//
740
tcop_top tcop (
741
        .clk( wb_clk_i ),
742
        .rstn( resetn ),
743
 
744
// The VGA connections
745
        .wb_vs_adr_i( wb_vs_adr_i ),
746
        .wb_vs_dat_i( wb_vs_dat_i ),
747
        .wb_vs_dat_o( wb_vs_dat_o ),
748
        .wb_vs_sel_i( wb_vs_sel_i ),
749
        .wb_vs_we_i(  wb_vs_we_i  ),
750
        .wb_vs_stb_i( wb_vs_stb_i ),
751
        .wb_vs_cyc_i( wb_vs_cyc_i ),
752
        .wb_vs_ack_o( wb_vs_ack_o ),
753
        .wb_vs_err_o( wb_vs_err_o ),
754
 
755
        .wb_vm_adr_o( wb_vm_adr_o ),
756
        .wb_vm_dat_i( wb_vm_dat_i ),
757
        .wb_vm_sel_o( wb_vm_sel_o ),
758
        .wb_vm_we_o(  wb_vm_we_o  ),
759
        .wb_vm_stb_o( wb_vm_stb_o ),
760
        .wb_vm_cyc_o( wb_vm_cyc_o ),
761
        .wb_vm_cab_o( wb_vm_cab_o ),
762
        .wb_vm_ack_i( wb_vm_ack_i ),
763
        .wb_vm_err_i( wb_vm_err_i ),
764
 
765
// The Development I/F
766
 
767
        .wb_dm_adr_o( wb_dm_adr_o ),
768
        .wb_dm_dat_i( wb_dm_dat_i ),
769
        .wb_dm_dat_o( wb_dm_dat_o ),
770
        .wb_dm_sel_o( wb_dm_sel_o ),
771
        .wb_dm_we_o(  wb_dm_we_o  ),
772
        .wb_dm_stb_o( wb_dm_stb_o ),
773
        .wb_dm_cyc_o( wb_dm_cyc_o ),
774
        .wb_dm_cab_o( wb_dm_cab_o ),
775
        .wb_dm_ack_i( wb_dm_ack_i ),
776
        .wb_dm_err_i( wb_dm_err_i ),
777
 
778
// The RISC connections 
779
 
780
        .wb_ri_cyc_o( wb_ri_cyc_o ),
781
        .wb_ri_adr_o( wb_ri_adr_o ),
782
        .wb_ri_dat_i( wb_ri_dat_i ),
783
        .wb_ri_dat_o( wb_ri_dat_o ),
784
        .wb_ri_sel_o( wb_ri_sel_o ),
785
        .wb_ri_ack_i( wb_ri_ack_i ),
786
        .wb_ri_err_i( wb_ri_err_i ),
787
        .wb_ri_rty_i( wb_ri_rty_i ),
788
        .wb_ri_we_o(  wb_ri_we_o  ),
789
        .wb_ri_stb_o( wb_ri_stb_o ),
790
 
791
        .wb_rd_cyc_o( wb_rd_cyc_o ),
792
        .wb_rd_adr_o( wb_rd_adr_o ),
793
        .wb_rd_dat_i( wb_rd_dat_i ),
794
        .wb_rd_dat_o( wb_rd_dat_o ),
795
        .wb_rd_sel_o( wb_rd_sel_o ),
796
        .wb_rd_ack_i( wb_rd_ack_i ),
797
        .wb_rd_err_i( wb_rd_err_i ),
798
        .wb_rd_rty_i( wb_rd_rty_i ),
799
        .wb_rd_we_o(  wb_rd_we_o  ),
800
        .wb_rd_stb_o( wb_rd_stb_o ),
801
 
802
// The SRAM
803
 
804
        .wb_sr_dat_i( wb_sr_dat_i ),
805
        .wb_sr_dat_o( wb_sr_dat_o ),
806
        .wb_sr_adr_i( wb_sr_adr_i ),
807
        .wb_sr_sel_i( wb_sr_sel_i ),
808
        .wb_sr_we_i(  wb_sr_we_i  ),
809
        .wb_sr_cyc_i( wb_sr_cyc_i ),
810
        .wb_sr_stb_i( wb_sr_stb_i ),
811
        .wb_sr_ack_o( wb_sr_ack_o ),
812
        .wb_sr_err_o( wb_sr_err_o ),
813
 
814
// The Flash RAM connections
815
 
816
        .wb_fl_dat_i( wb_fl_dat_i ),
817
        .wb_fl_dat_o( wb_fl_dat_o ),
818
        .wb_fl_adr_i( wb_fl_adr_i ),
819
        .wb_fl_sel_i( wb_fl_sel_i ),
820
        .wb_fl_we_i(  wb_fl_we_i  ),
821
        .wb_fl_cyc_i( wb_fl_cyc_i ),
822
        .wb_fl_stb_i( wb_fl_stb_i ),
823
        .wb_fl_ack_o( wb_fl_ack_o ),
824
        .wb_fl_err_o( wb_fl_err_o ),
825
 
826
// The Audio connections
827
 
828
        .wb_au_dat_i( wb_au_dat_i ),
829
        .wb_au_dat_o( wb_au_dat_o ),
830
        .wb_au_adr_i( wb_au_adr_i ),
831
        .wb_au_sel_i( wb_au_sel_i ),
832
        .wb_au_we_i(  wb_au_we_i  ),
833
        .wb_au_cyc_i( wb_au_cyc_i ),
834
        .wb_au_stb_i( wb_au_stb_i ),
835
        .wb_au_ack_o( wb_au_ack_o ),
836
        .wb_au_err_o( wb_au_err_o )
837
);
838
 
839
 
840
// Connecting all the leftovers
841
// synplicity 
842
 
843
always @(posedge wb_clk_i)
844
//      my_int <= $random;
845
        my_int <= 1'b0;
846
endmodule
847
 

powered by: WebSVN 2.1.0

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