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

Subversion Repositories or1200_soc

[/] [or1200_soc/] [trunk/] [src/] [soc_top.v] - Blame information for rev 24

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 22 qaztronic
// --------------------------------------------------------------------
2
//
3
// --------------------------------------------------------------------
4
 
5
 
6
`include "timescale.v"
7
`include "or1200_defines.v"
8
`include "soc_defines.v"
9
 
10
 
11
module soc_top
12
(
13
  ////////////////////////////  UART  ////////////////////////////
14
  output          uart_txd_0,       //  UART Transmitter
15
  input           uart_rxd_0,       //  UART Receiver
16
  ///////////////////////   SDRAM Interface ////////////////////////
17
//   inout [15:0]    dram_dq,        //  sdram data bus 16 bits
18
//   output  [11:0]  dram_addr,      //  sdram address bus 12 bits
19
//   output          dram_ldqm,      //  sdram low-byte data mask
20
//   output          dram_udqm,      //  sdram high-byte data mask
21
//   output          dram_we_n,      //  sdram write enable
22
//   output          dram_cas_n,     //  sdram column address strobe
23
//   output          dram_ras_n,     //  sdram row address strobe
24
//   output          dram_cs_n,      //  sdram chip select
25
//   output          dram_ba_0,      //  sdram bank address 0
26
//   output          dram_ba_1,      //  sdram bank address 0
27
//   output          dram_clk,       //  sdram clock
28
//   output          dram_cke,       //  sdram clock enable
29
  ////////////////////////  Flash Interface ////////////////////////
30
  inout [7:0]     fl_dq,          //  flash data bus 8 bits
31
  output  [21:0]  fl_addr,        //  flash address bus 22 bits
32
  output          fl_we_n,        //  flash write enable
33
  output          fl_rst_n,       //  flash reset
34
  output          fl_oe_n,        //  flash output enable
35
  output          fl_ce_n,        //  flash chip enable
36
  ////////////////////////  sram interface  ////////////////////////
37
  inout   [15:0]  sram_dq,        //  sram data bus 16 bits
38
  output  [17:0]  sram_addr,      //  sram address bus 18 bits
39
  output          sram_ub_n,      //  sram high-byte data mask
40
  output          sram_lb_n,      //  sram low-byte data mask
41
  output          sram_we_n,      //  sram write enable
42
  output          sram_ce_n,      //  sram chip enable
43
  output          sram_oe_n,      //  sram output enable
44
 
45 24 qaztronic
  input   [31:0]  gpio_a_aux_i,
46
  input   [31:0]  gpio_a_ext_pad_i,
47
  output  [31:0]  gpio_a_ext_pad_o,
48
  output  [31:0]  gpio_a_ext_padoe_o,
49 22 qaztronic
 
50 24 qaztronic
  input   [31:0]  gpio_b_aux_i,
51
  input   [31:0]  gpio_b_ext_pad_i,
52
  output  [31:0]  gpio_b_ext_pad_o,
53
  output  [31:0]  gpio_b_ext_padoe_o,
54 22 qaztronic
 
55 24 qaztronic
  input   [31:0]  gpio_c_aux_i,
56
  input   [31:0]  gpio_c_ext_pad_i,
57
  output  [31:0]  gpio_c_ext_pad_o,
58
  output  [31:0]  gpio_c_ext_padoe_o,
59 22 qaztronic
 
60 24 qaztronic
  input   [31:0]  gpio_d_aux_i,
61
  input   [31:0]  gpio_d_ext_pad_i,
62
  output  [31:0]  gpio_d_ext_pad_o,
63
  output  [31:0]  gpio_d_ext_padoe_o,
64 22 qaztronic
 
65 24 qaztronic
  input   [31:0]  gpio_e_aux_i,
66
  input   [31:0]  gpio_e_ext_pad_i,
67
  output  [31:0]  gpio_e_ext_pad_o,
68
  output  [31:0]  gpio_e_ext_padoe_o,
69 22 qaztronic
 
70 24 qaztronic
  input   [31:0]  gpio_f_aux_i,
71
  input   [31:0]  gpio_f_ext_pad_i,
72
  output  [31:0]  gpio_f_ext_pad_o,
73
  output  [31:0]  gpio_f_ext_padoe_o,
74 22 qaztronic
 
75 24 qaztronic
  input   [31:0]  gpio_g_aux_i,
76
  input   [31:0]  gpio_g_ext_pad_i,
77
  output  [31:0]  gpio_g_ext_pad_o,
78
  output  [31:0]  gpio_g_ext_padoe_o,
79 22 qaztronic
 
80
  input [3:0]     boot_strap,
81
 
82
`ifdef USE_DEBUG_0
83
  output [255:0]  debug_0,
84
`endif
85 24 qaztronic
 
86
`ifdef USE_EXT_JTAG
87
  input         jtag_tck_i,
88
  input         jtag_tms_i,
89
  input         jtag_tdo_i,
90
  output        jtag_tdi_o,
91
`endif
92 22 qaztronic
 
93
  input           sys_clk,
94
  input           sys_rst
95
);
96
 
97
 
98
  //---------------------------------------------------
99
  // or1200_top
100
  //---------------------------------------------------
101
  parameter dw = `OR1200_OPERAND_WIDTH;
102
  parameter aw = `OR1200_OPERAND_WIDTH;
103
 
104
 
105
  // System
106 24 qaztronic
  wire      cpu0_rst_o;
107 22 qaztronic
  wire      clk_i = sys_clk;
108 24 qaztronic
//   wire      rst_i = sys_rst | cpu0_rst_o;
109 22 qaztronic
  wire      rst_i = sys_rst;
110
 
111
  //---------------------------------------------------
112
  // Instruction WISHBONE interface
113
  wire            iwb_clk_i = sys_clk;
114
  wire            iwb_rst_i = sys_rst;
115
  wire            iwb_ack_i;
116
  wire            iwb_err_i;
117
  wire            iwb_rty_i;
118
  wire  [dw-1:0]  iwb_dat_i;
119
  wire            iwb_cyc_o;
120
  wire  [aw-1:0]  iwb_adr_o;
121
  wire            iwb_stb_o;
122
  wire            iwb_we_o;
123
  wire  [3:0]     iwb_sel_o;
124
  wire  [dw-1:0]  iwb_dat_o;
125
  wire            iwb_cab_o;
126
 
127
  //---------------------------------------------------
128
  // Data WISHBONE interface
129
  wire            dwb_clk_i = sys_clk;
130
  wire            dwb_rst_i = sys_rst;
131
  wire            dwb_ack_i;
132
  wire            dwb_err_i;
133
  wire            dwb_rty_i;
134
  wire  [dw-1:0]  dwb_dat_i;
135
  wire            dwb_cyc_o;
136
  wire  [aw-1:0]  dwb_adr_o;
137
  wire            dwb_stb_o;
138
  wire            dwb_we_o;
139
  wire  [3:0]     dwb_sel_o;
140
  wire  [dw-1:0]  dwb_dat_o;
141
  wire            dwb_cab_o;
142 24 qaztronic
  //---------------------------------------------------
143
  // External Debug Interface 
144
  wire            dbg_stall_i;
145
  wire  [3:0]     dbg_lss_o;  // External Load/Store Unit Status
146
  wire  [1:0]     dbg_is_o; // External Insn Fetch Status
147
  wire  [10:0]    dbg_wp_o; // Watchpoints Outputs
148
  wire            dbg_bp_o; // Breakpoint Output
149
  wire            dbg_stb_i;      // External Address/Data Strobe
150
  wire            dbg_we_i;       // External Write Enable
151
  wire  [aw-1:0]  dbg_adr_i;  // External Address Input
152
  wire  [dw-1:0]  dbg_dat_i;  // External Data Input
153
  wire  [dw-1:0]  dbg_dat_o;  // External Data Output
154
  wire            dbg_ack_o;  // External Data Acknowledge (not WB compatible)
155 22 qaztronic
 
156
  or1200_top i_or1200_top(
157
                          //---------------------------------------------------
158
                          // Instruction WISHBONE interface
159
                          .iwb_clk_i(iwb_clk_i),  // clock input
160
                          .iwb_rst_i(iwb_rst_i),  // reset input
161
                          .iwb_ack_i(iwb_ack_i),  // normal termination
162
                          .iwb_err_i(iwb_err_i),  // termination w/ error
163
                          .iwb_rty_i(iwb_rty_i),  // termination w/ retry
164
                          .iwb_dat_i(iwb_dat_i),  // input data bus
165
                          .iwb_cyc_o(iwb_cyc_o),  // cycle valid output
166
                          .iwb_adr_o(iwb_adr_o),  // address bus outputs
167
                          .iwb_stb_o(iwb_stb_o),  // strobe output
168
                          .iwb_we_o(iwb_we_o),  // indicates write transfer
169
                          .iwb_sel_o(iwb_sel_o),  // byte select outputs
170
                          .iwb_dat_o(iwb_dat_o),  // output data bus
171
  `ifdef OR1200_WB_CAB
172
                          .iwb_cab_o(iwb_cab_o),  // indicates consecutive address burst
173
  `endif
174
  `ifdef OR1200_WB_B3
175
                          .iwb_cti_o(iwb_cti_o),  // cycle type identifier
176
                          .iwb_bte_o(iwb_bte_o),  // burst type extension
177
  `endif
178
 
179
                          //---------------------------------------------------
180
                          // Data WISHBONE interface
181
                          .dwb_clk_i(dwb_clk_i),  // clock input
182
                          .dwb_rst_i(dwb_rst_i),  // reset input
183
                          .dwb_ack_i(dwb_ack_i),  // normal termination
184
                          .dwb_err_i(dwb_err_i),  // termination w/ error
185
                          .dwb_rty_i(dwb_rty_i),  // termination w/ retry
186
                          .dwb_dat_i(dwb_dat_i),  // input data bus
187
                          .dwb_cyc_o(dwb_cyc_o),  // cycle valid output
188
                          .dwb_adr_o(dwb_adr_o),  // address bus outputs
189
                          .dwb_stb_o(dwb_stb_o),  // strobe output
190
                          .dwb_we_o(dwb_we_o),  // indicates write transfer
191
                          .dwb_sel_o(dwb_sel_o),  // byte select outputs
192
                          .dwb_dat_o(dwb_dat_o),  // output data bus
193
  `ifdef OR1200_WB_CAB
194
                          .dwb_cab_o(dwb_cab_o),  // indicates consecutive address burst
195
  `endif
196
  `ifdef OR1200_WB_B3
197
                          .dwb_cti_o(dwb_cti_o),  // cycle type identifier
198
                          .dwb_bte_o(dwb_bte_o),  // burst type extension
199
  `endif
200
 
201
                          //---------------------------------------------------
202
                          // External Debug Interface
203 24 qaztronic
                          .dbg_stall_i(dbg_stall_i), // External Stall Input
204
                          .dbg_ewt_i(1'b0), // External Watchpoint Trigger Input
205 22 qaztronic
//                           .dbg_lss_o(dbg_lss_o), // External Load/Store Unit Status
206
//                           .dbg_is_o(dbg_is_o), // External Insn Fetch Status
207
//                           .dbg_wp_o(dbg_wp_o), // Watchpoints Outputs
208 24 qaztronic
                          .dbg_bp_o(dbg_bp_o), // Breakpoint Output
209
                          .dbg_stb_i(dbg_stb_i),      // External Address/Data Strobe
210
                          .dbg_we_i(dbg_we_i),       // External Write Enable
211
                          .dbg_adr_i(dbg_adr_i), // External Address Input
212
                          .dbg_dat_i(dbg_dat_i), // External Data Input
213
                          .dbg_dat_o(dbg_dat_o), // External Data Output
214
                          .dbg_ack_o(dbg_ack_o), // External Data Acknowledge (not WB compatible)
215 22 qaztronic
 
216
 
217
                          //---------------------------------------------------
218
                          // RAM BIST
219
  `ifdef OR1200_BIST
220
                          .mbist_si_i(mbist_si_i),
221
                          .mbist_ctrl_i(mbist_ctrl_i),
222
                          .mbist_so_o(mbist_so_o),
223
  `endif
224
 
225
                        //---------------------------------------------------
226
                        // Power Management
227
//                         .pm_cpustall_i(pm_cpustall_i),
228
//                         .pm_clksd_o(pm_clksd_o),
229
//                         .pm_dc_gate_o(pm_dc_gate_o),
230
//                         .pm_ic_gate_o(pm_ic_gate_o),
231
//                         .pm_dmmu_gate_o(pm_dmmu_gate_o),
232
//                         .pm_immu_gate_o(pm_immu_gate_o),
233
//                         .pm_tt_gate_o(pm_tt_gate_o),
234
//                         .pm_cpu_gate_o(pm_cpu_gate_o),
235
//                         .pm_wakeup_o(pm_wakeup_o),
236
//                         .pm_lvolt_o(pm_lvolt_o),
237
//
238
                        //---------------------------------------------------
239
                        // System
240
//                         .clmode_i(clmode_i), // 00 WB=RISC, 01 WB=RISC/2, 10 N/A, 11 WB=RISC/4
241
//                         .pic_ints_i(pic_ints_i),
242
                          .clk_i(clk_i),
243
                          .rst_i(rst_i)
244
                        );
245
 
246 24 qaztronic
 
247 22 qaztronic
  //---------------------------------------------------
248 24 qaztronic
  // adbg_top
249
   wire [31:0] adbg_wb_adr_o;
250
   wire [31:0] adbg_wb_dat_o;
251
   wire [31:0] adbg_wb_dat_i;
252
   wire        adbg_wb_cyc_o;
253
   wire        adbg_wb_stb_o;
254
   wire [3:0]  adbg_wb_sel_o;
255
   wire        adbg_wb_we_o;
256
   wire        adbg_wb_ack_i;
257
   wire        adbg_wb_cab_o;
258
   wire        adbg_wb_err_i;
259
   wire [2:0]  adbg_wb_cti_o;
260
   wire [1:0]  adbg_wb_bte_o;
261
 
262
`ifdef USE_ADV_DEBUG_SYS
263
  soc_adv_dbg
264
    i_soc_adv_dbg(
265
`ifdef USE_EXT_JTAG
266
      .jtag_tck_i(jtag_tck_i),
267
      .jtag_tms_i(jtag_tms_i),
268
      .jtag_tdo_i(jtag_tdo_i),
269
      .jtag_tdi_o(jtag_tdi_o),
270
`endif
271
      .wb_clk_i(dwb_clk_i),       // WISHBONE common signals
272
      .wb_adr_o(adbg_wb_adr_o),   // WISHBONE master interface
273
      .wb_dat_o(adbg_wb_dat_o),
274
      .wb_dat_i(adbg_wb_dat_i),
275
      .wb_cyc_o(adbg_wb_cyc_o),
276
      .wb_stb_o(adbg_wb_stb_o),
277
      .wb_sel_o(adbg_wb_sel_o),
278
      .wb_we_o(adbg_wb_we_o),
279
      .wb_ack_i(adbg_wb_ack_i),
280
      .wb_cab_o(adbg_wb_cab_o),
281
      .wb_err_i(adbg_wb_err_i),
282
      .wb_cti_o(adbg_wb_cti_o),
283
      .wb_bte_o(adbg_wb_bte_o),
284
      .cpu0_clk_i(dwb_clk_i),    // CPU signals
285
      .cpu0_addr_o(dbg_adr_i),
286
      .cpu0_data_i(dbg_dat_o),
287
      .cpu0_data_o(dbg_dat_i),
288
      .cpu0_bp_i(dbg_bp_o),
289
      .cpu0_stall_o(dbg_stall_i),
290
      .cpu0_stb_o(dbg_stb_i),
291
      .cpu0_we_o(dbg_we_i),
292
      .cpu0_ack_i(dbg_ack_o),
293
      .cpu0_rst_o(cpu0_rst_o)
294
    );
295
`else
296
  assign dbg_stall_i    = 1'b0;
297
  assign adbg_wb_dat_o  = 32'h0000_0000;
298
  assign adbg_wb_adr_o  = 32'h0000_0000;
299
  assign adbg_wb_sel_o  = 4'h0;
300
  assign adbg_wb_we_o   = 1'b0;
301
  assign adbg_wb_cyc_o  = 1'b0;
302
  assign adbg_wb_stb_o  = 1'b0;
303
`endif
304
 
305
 
306
  //---------------------------------------------------
307 22 qaztronic
  // remap mux
308
  wire [1:0] boot_remap;
309
 
310
  // instruction wb remap mux
311
  reg  [1:0] iwb_remap_select;
312
  reg  [3:0] iwb_remap_nibble;
313
 
314
  wire [31:0] iwb_remap_adr_o = { iwb_remap_nibble, iwb_adr_o[27:0] };
315
 
316
  always @(*)
317
    casez( { boot_remap, iwb_adr_o[31:28] } )
318
      6'b00_????: iwb_remap_select = 2'b00;
319
      6'b01_0000: iwb_remap_select = 2'b01;
320
      6'b10_0000: iwb_remap_select = 2'b10;
321
      6'b11_0000: iwb_remap_select = 2'b11;
322
      default:    iwb_remap_select = 2'b00;
323
    endcase
324
 
325
  always @(*)
326
    case( iwb_remap_select )
327
      2'b00: iwb_remap_nibble = iwb_adr_o[31:28];
328
      2'b01: iwb_remap_nibble = 4'b0001;
329
      2'b10: iwb_remap_nibble = 4'b0010;
330
      2'b11: iwb_remap_nibble = 4'b0011;
331
    endcase
332
 
333
  // data wb remap mux
334
  reg  [1:0] dwb_remap_select;
335
  reg  [3:0] dwb_remap_nibble;
336
 
337
  wire [31:0] dwb_remap_adr_o = { dwb_remap_nibble, dwb_adr_o[27:0] };
338
 
339
  always @(*)
340
    casez( { boot_remap, dwb_adr_o[31:28] } )
341
      6'b00_????: dwb_remap_select = 2'b00;
342
      6'b01_0000: dwb_remap_select = 2'b01;
343
      6'b10_0000: dwb_remap_select = 2'b10;
344
      6'b11_0000: dwb_remap_select = 2'b11;
345
      default:    dwb_remap_select = 2'b00;
346
    endcase
347
 
348
  always @(*)
349
    case( dwb_remap_select )
350
      2'b00: dwb_remap_nibble = dwb_adr_o[31:28];
351
      2'b01: dwb_remap_nibble = 4'b0001;
352
      2'b10: dwb_remap_nibble = 4'b0010;
353
      2'b11: dwb_remap_nibble = 4'b0011;
354
    endcase
355
 
356
 
357
  //---------------------------------------------------
358
  // wb_conmax_top
359
 
360
  // Slave 0 Interface
361
  parameter   sw = dw / 8;  // Number of Select Lines
362
 
363
  wire  [dw-1:0]  s0_data_i;
364
  wire  [dw-1:0]  s0_data_o;
365
  wire  [aw-1:0]  s0_addr_o;
366
  wire  [sw-1:0]  s0_sel_o;
367
  wire            s0_we_o;
368
  wire            s0_cyc_o;
369
  wire            s0_stb_o;
370
  wire            s0_ack_i;
371
  wire            s0_err_i;
372
  wire            s0_rty_i;
373
 
374
  wire  [dw-1:0]  s1_data_i;
375
  wire  [dw-1:0]  s1_data_o;
376
  wire  [aw-1:0]  s1_addr_o;
377
  wire  [sw-1:0]  s1_sel_o;
378
  wire            s1_we_o;
379
  wire            s1_cyc_o;
380
  wire            s1_stb_o;
381
  wire            s1_ack_i;
382
  wire            s1_err_i;
383
  wire            s1_rty_i;
384
 
385
  wire  [dw-1:0]  s2_data_i;
386
  wire  [dw-1:0]  s2_data_o;
387
  wire  [aw-1:0]  s2_addr_o;
388
  wire  [sw-1:0]  s2_sel_o;
389
  wire            s2_we_o;
390
  wire            s2_cyc_o;
391
  wire            s2_stb_o;
392
  wire            s2_ack_i;
393
  wire            s2_err_i;
394
  wire            s2_rty_i;
395
 
396
  wire  [dw-1:0]  s3_data_i;
397
  wire  [dw-1:0]  s3_data_o;
398
  wire  [aw-1:0]  s3_addr_o;
399
  wire  [sw-1:0]  s3_sel_o;
400
  wire            s3_we_o;
401
  wire            s3_cyc_o;
402
  wire            s3_stb_o;
403
  wire            s3_ack_i;
404
  wire            s3_err_i;
405
  wire            s3_rty_i;
406
 
407
  wire  [dw-1:0]  s4_data_i;
408
  wire  [dw-1:0]  s4_data_o;
409
  wire  [aw-1:0]  s4_addr_o;
410
  wire  [sw-1:0]  s4_sel_o;
411
  wire            s4_we_o;
412
  wire            s4_cyc_o;
413
  wire            s4_stb_o;
414
  wire            s4_ack_i;
415
  wire            s4_err_i;
416
  wire            s4_rty_i;
417
 
418
  wire  [dw-1:0]  s5_data_i;
419
  wire  [dw-1:0]  s5_data_o;
420
  wire  [aw-1:0]  s5_addr_o;
421
  wire  [sw-1:0]  s5_sel_o;
422
  wire            s5_we_o;
423
  wire            s5_cyc_o;
424
  wire            s5_stb_o;
425
  wire            s5_ack_i;
426
  wire            s5_err_i;
427
  wire            s5_rty_i;
428
 
429
  wire  [dw-1:0]  s6_data_i;
430
  wire  [dw-1:0]  s6_data_o;
431
  wire  [aw-1:0]  s6_addr_o;
432
  wire  [sw-1:0]  s6_sel_o;
433
  wire            s6_we_o;
434
  wire            s6_cyc_o;
435
  wire            s6_stb_o;
436
  wire            s6_ack_i;
437
  wire            s6_err_i;
438
  wire            s6_rty_i;
439
 
440
  wb_conmax_top
441
    i_wb_conmax_top(
442
                      // Master 0 Interface
443
                      .m0_data_i(iwb_dat_o),
444
                      .m0_data_o(iwb_dat_i),
445
                      .m0_addr_i( iwb_remap_adr_o ),
446
                      .m0_sel_i(iwb_sel_o),
447
                      .m0_we_i(iwb_we_o),
448
                      .m0_cyc_i(iwb_cyc_o),
449
                      .m0_stb_i(iwb_stb_o),
450
                      .m0_ack_o(iwb_ack_i),
451
                      .m0_err_o(iwb_err_i),
452
                      .m0_rty_o(iwb_rty_i),
453
                      // Master 1 Interface 
454
                      .m1_data_i(dwb_dat_o),
455
                      .m1_data_o(dwb_dat_i),
456
                      .m1_addr_i(dwb_remap_adr_o),
457
                      .m1_sel_i(dwb_sel_o),
458
                      .m1_we_i(dwb_we_o),
459
                      .m1_cyc_i(dwb_cyc_o),
460
                      .m1_stb_i(dwb_stb_o),
461
                      .m1_ack_o(dwb_ack_i),
462
                      .m1_err_o(dwb_err_i),
463
                      .m1_rty_o(dwb_rty_i),
464
                      // Master 2 Interface
465 24 qaztronic
                      .m2_data_i(adbg_wb_dat_o),
466
                      .m2_data_o(adbg_wb_dat_i),
467
                      .m2_addr_i(adbg_wb_adr_o),
468
                      .m2_sel_i(adbg_wb_sel_o),
469
                      .m2_we_i(adbg_wb_we_o),
470
                      .m2_cyc_i(adbg_wb_cyc_o),
471
                      .m2_stb_i(adbg_wb_stb_o),
472
                      .m2_ack_o(adbg_wb_ack_i),
473
                      .m2_err_o(adbg_wb_err_i),
474
                      .m2_rty_o(),
475 22 qaztronic
                      // Master 3 Interface
476
                      .m3_data_i(32'h0000_0000),
477
                      .m3_addr_i(32'h0000_0000),
478
                      .m3_sel_i(4'h0),
479
                      .m3_we_i(1'b0),
480
                      .m3_cyc_i(1'b0),
481
                      .m3_stb_i(1'b0),
482
                      // Master 4 Interface
483
                      .m4_data_i(32'h0000_0000),
484
                      .m4_addr_i(32'h0000_0000),
485
                      .m4_sel_i(4'h0),
486
                      .m4_we_i(1'b0),
487
                      .m4_cyc_i(1'b0),
488
                      .m4_stb_i(1'b0),
489
                      // Master 5 Interface
490
                      .m5_data_i(32'h0000_0000),
491
                      .m5_addr_i(32'h0000_0000),
492
                      .m5_sel_i(4'h0),
493
                      .m5_we_i(1'b0),
494
                      .m5_cyc_i(1'b0),
495
                      .m5_stb_i(1'b0),
496
                      // Master 6 Interface
497
                      .m6_data_i(32'h0000_0000),
498
                      .m6_addr_i(32'h0000_0000),
499
                      .m6_sel_i(4'h0),
500
                      .m6_we_i(1'b0),
501
                      .m6_cyc_i(1'b0),
502
                      .m6_stb_i(1'b0),
503
                      // Master 7 Interface
504
                      .m7_data_i(32'h0000_0000),
505
                      .m7_addr_i(32'h0000_0000),
506
                      .m7_sel_i(4'h0),
507
                      .m7_we_i(1'b0),
508
                      .m7_cyc_i(1'b0),
509
                      .m7_stb_i(1'b0),
510
 
511
                      // Slave 0 Interface
512
                      .s0_data_i(s0_data_i),
513
                      .s0_data_o(s0_data_o),
514
                      .s0_addr_o(s0_addr_o),
515
                      .s0_sel_o(s0_sel_o),
516
                      .s0_we_o(s0_we_o),
517
                      .s0_cyc_o(s0_cyc_o),
518
                      .s0_stb_o(s0_stb_o),
519
                      .s0_ack_i(s0_ack_i),
520
                      .s0_err_i(s0_err_i),
521
                      .s0_rty_i(s0_rty_i),
522
                      // Slave 1 Interface
523
                      .s1_data_i(s1_data_i),
524
                      .s1_data_o(s1_data_o),
525
                      .s1_addr_o(s1_addr_o),
526
                      .s1_sel_o(s1_sel_o),
527
                      .s1_we_o(s1_we_o),
528
                      .s1_cyc_o(s1_cyc_o),
529
                      .s1_stb_o(s1_stb_o),
530
                      .s1_ack_i(s1_ack_i),
531
                      .s1_err_i(s1_err_i),
532
                      .s1_rty_i(s1_rty_i),
533
                      // Slave 2 Interface
534
                      .s2_data_i(s2_data_i),
535
                      .s2_data_o(s2_data_o),
536
                      .s2_addr_o(s2_addr_o),
537
                      .s2_sel_o(s2_sel_o),
538
                      .s2_we_o(s2_we_o),
539
                      .s2_cyc_o(s2_cyc_o),
540
                      .s2_stb_o(s2_stb_o),
541
                      .s2_ack_i(s2_ack_i),
542
                      .s2_err_i(s2_err_i),
543
                      .s2_rty_i(s2_rty_i),
544
                      // Slave 3 Interface
545
                      .s3_data_i(s3_data_i),
546
                      .s3_data_o(s3_data_o),
547
                      .s3_addr_o(s3_addr_o),
548
                      .s3_sel_o(s3_sel_o),
549
                      .s3_we_o(s3_we_o),
550
                      .s3_cyc_o(s3_cyc_o),
551
                      .s3_stb_o(s3_stb_o),
552
                      .s3_ack_i(s3_ack_i),
553
                      .s3_err_i(s3_err_i),
554
                      .s3_rty_i(s3_rty_i),
555
                      // Slave 4 Interface
556
                      .s4_data_i(s4_data_i),
557
                      .s4_data_o(s4_data_o),
558
                      .s4_addr_o(s4_addr_o),
559
                      .s4_sel_o(s4_sel_o),
560
                      .s4_we_o(s4_we_o),
561
                      .s4_cyc_o(s4_cyc_o),
562
                      .s4_stb_o(s4_stb_o),
563
                      .s4_ack_i(s4_ack_i),
564
                      .s4_err_i(s4_err_i),
565
                      .s4_rty_i(s4_rty_i),
566
                      // Slave 5 Interface
567
                      .s5_data_i(s5_data_i),
568
                      .s5_data_o(s5_data_o),
569
                      .s5_addr_o(s5_addr_o),
570
                      .s5_sel_o(s5_sel_o),
571
                      .s5_we_o(s5_we_o),
572
                      .s5_cyc_o(s5_cyc_o),
573
                      .s5_stb_o(s5_stb_o),
574
                      .s5_ack_i(s5_ack_i),
575
                      .s5_err_i(s5_err_i),
576
                      .s5_rty_i(s5_rty_i),
577
                      // Slave 6 Interface
578
                      .s6_data_i(s6_data_i),
579
                      .s6_data_o(s6_data_o),
580
                      .s6_addr_o(s6_addr_o),
581
                      .s6_sel_o(s6_sel_o),
582
                      .s6_we_o(s6_we_o),
583
                      .s6_cyc_o(s6_cyc_o),
584
                      .s6_stb_o(s6_stb_o),
585
                      .s6_ack_i(s6_ack_i),
586
                      .s6_err_i(s6_err_i),
587
                      .s6_rty_i(s6_rty_i),
588
                      // Slave 7 Interface
589
                      .s7_data_i(32'h0000_0000),
590
                      .s7_ack_i(1'b0),
591
                      .s7_err_i(1'b0),
592
                      .s7_rty_i(1'b0),
593
                      // Slave 8 Interface
594
                      .s8_data_i(32'h0000_0000),
595
                      .s8_ack_i(1'b0),
596
                      .s8_err_i(1'b0),
597
                      .s8_rty_i(1'b0),
598
                      // Slave 9 Interface
599
                      .s9_data_i(32'h0000_0000),
600
                      .s9_ack_i(1'b0),
601
                      .s9_err_i(1'b0),
602
                      .s9_rty_i(1'b0),
603
                      // Slave 10 Interface
604
                      .s10_data_i(32'h0000_0000),
605
                      .s10_ack_i(1'b0),
606
                      .s10_err_i(1'b0),
607
                      .s10_rty_i(1'b0),
608
                      // Slave 11 Interface
609
                      .s11_data_i(32'h0000_0000),
610
                      .s11_ack_i(1'b0),
611
                      .s11_err_i(1'b0),
612
                      .s11_rty_i(1'b0),
613
                      // Slave 12 Interface
614
                      .s12_data_i(32'h0000_0000),
615
                      .s12_ack_i(1'b0),
616
                      .s12_err_i(1'b0),
617
                      .s12_rty_i(1'b0),
618
                      // Slave 13 Interface
619
                      .s13_data_i(32'h0000_0000),
620
                      .s13_ack_i(1'b0),
621
                      .s13_err_i(1'b0),
622
                      .s13_rty_i(1'b0),
623
                      // Slave 14 Interface
624
                      .s14_data_i(32'h0000_0000),
625
                      .s14_ack_i(1'b0),
626
                      .s14_err_i(1'b0),
627
                      .s14_rty_i(1'b0),
628
                      // Slave 15 Interface
629
                      .s15_data_i(32'h0000_0000),
630
                      .s15_ack_i(1'b0),
631
                      .s15_err_i(1'b0),
632
                      .s15_rty_i(1'b0),
633
 
634
                      .clk_i(clk_i),
635
                      .rst_i(rst_i)
636
                    );
637
 
638
  //---------------------------------------------------
639
  // soc_boot
640
  wire  [1:0] boot_select;
641
 
642
  soc_boot i_soc_boot(
643
                      .mem_data_i(s0_data_o),
644
                      .mem_data_o(s0_data_i),
645
                      .mem_addr_i(s0_addr_o),
646
                      .mem_sel_i(s0_sel_o),
647
                      .mem_we_i(s0_we_o),
648
                      .mem_cyc_i(s0_cyc_o),
649
                      .mem_stb_i(s0_stb_o),
650
                      .mem_ack_o(s0_ack_i),
651
                      .mem_err_o(s0_err_i),
652
                      .mem_rty_o(s0_rty_i),
653
 
654
                      .boot_select(boot_select),
655
 
656
                      .mem_clk_i(clk_i),
657
                      .mem_rst_i(rst_i)
658
                    );
659
 
660
 
661
  //---------------------------------------------------
662
  // soc_mem_bank_1
663
  soc_mem_bank_1
664
    i_soc_mem_bank_1(
665
                      .mem_data_i(s1_data_o),
666
                      .mem_data_o(s1_data_i),
667
                      .mem_addr_i(s1_addr_o),
668
                      .mem_sel_i(s1_sel_o),
669
                      .mem_we_i(s1_we_o),
670
                      .mem_cyc_i(s1_cyc_o),
671
                      .mem_stb_i(s1_stb_o),
672
                      .mem_ack_o(s1_ack_i),
673
                      .mem_err_o(s1_err_i),
674
                      .mem_rty_o(s1_rty_i),
675
 
676
                      .mem_clk_i(clk_i),
677
                      .mem_rst_i(rst_i)
678
                    );
679
 
680
  //---------------------------------------------------
681
  // soc_mem_bank_2
682
  soc_mem_bank_2
683
    i_soc_mem_bank_2(
684
                      .mem_data_i(s2_data_o),
685
                      .mem_data_o(s2_data_i),
686
                      .mem_addr_i(s2_addr_o),
687
                      .mem_sel_i(s2_sel_o),
688
                      .mem_we_i(s2_we_o),
689
                      .mem_cyc_i(s2_cyc_o),
690
                      .mem_stb_i(s2_stb_o),
691
                      .mem_ack_o(s2_ack_i),
692
                      .mem_err_o(s2_err_i),
693
                      .mem_rty_o(s2_rty_i),
694
 
695
                      .fl_dq(fl_dq),
696
                      .fl_addr(fl_addr),
697
                      .fl_we_n(fl_we_n),
698
                      .fl_rst_n(fl_rst_n),
699
                      .fl_oe_n(fl_oe_n),
700
                      .fl_ce_n(fl_ce_n),
701
 
702
                      .mem_clk_i(clk_i),
703
                      .mem_rst_i(rst_i)
704
                    );
705
 
706
  //---------------------------------------------------
707
  // soc_mem_bank_3
708
  soc_mem_bank_3
709
    i_soc_mem_bank_3(
710
                      .mem_data_i(s3_data_o),
711
                      .mem_data_o(s3_data_i),
712
                      .mem_addr_i(s3_addr_o),
713
                      .mem_sel_i(s3_sel_o),
714
                      .mem_we_i(s3_we_o),
715
                      .mem_cyc_i(s3_cyc_o),
716
                      .mem_stb_i(s3_stb_o),
717
                      .mem_ack_o(s3_ack_i),
718
                      .mem_err_o(s3_err_i),
719
                      .mem_rty_o(s3_rty_i),
720
 
721
                      .sram_dq(sram_dq),
722
                      .sram_addr(sram_addr),
723
                      .sram_ub_n(sram_ub_n),
724
                      .sram_lb_n(sram_lb_n),
725
                      .sram_we_n(sram_we_n),
726
                      .sram_ce_n(sram_ce_n),
727
                      .sram_oe_n(sram_oe_n),
728
 
729
                      .mem_clk_i(clk_i),
730
                      .mem_rst_i(rst_i)
731
                    );
732
 
733
  //---------------------------------------------------
734
  // soc_system
735
  soc_system
736
    i_soc_system(
737
                  .sys_data_i(s4_data_o),
738
                  .sys_data_o(s4_data_i),
739
                  .sys_addr_i(s4_addr_o),
740
                  .sys_sel_i(s4_sel_o),
741
                  .sys_we_i(s4_we_o),
742
                  .sys_cyc_i(s4_cyc_o),
743
                  .sys_stb_i(s4_stb_o),
744
                  .sys_ack_o(s4_ack_i),
745
                  .sys_err_o(s4_err_i),
746
                  .sys_rty_o(s4_rty_i),
747
 
748
                  .boot_strap(boot_strap),
749
                  .boot_select(boot_select),
750
                  .boot_remap(boot_remap),
751
 
752
                  .sys_clk_i(clk_i),
753
                  .sys_rst_i(rst_i)
754
                );
755
 
756
  //---------------------------------------------------
757
  // peripherals
758
  soc_peripherals
759
    i_soc_peripherals(
760
                        .peri_data_i(s5_data_o),
761
                        .peri_data_o(s5_data_i),
762
                        .peri_addr_i(s5_addr_o),
763
                        .peri_sel_i(s5_sel_o),
764
                        .peri_we_i(s5_we_o),
765
                        .peri_cyc_i(s5_cyc_o),
766
                        .peri_stb_i(s5_stb_o),
767
                        .peri_ack_o(s5_ack_i),
768
                        .peri_err_o(s5_err_i),
769
                        .peri_rty_o(s5_rty_i),
770
 
771
                        .uart_txd_0(uart_txd_0),
772
                        .uart_rxd_0(uart_rxd_0),
773
 
774
                        .peri_clk_i(clk_i),
775
                        .peri_rst_i(rst_i)
776
                      );
777
 
778
  //---------------------------------------------------
779
  // gpio
780
  soc_gpio
781
    i_soc_gpio(
782
                  .gpio_data_i(s6_data_o),
783
                  .gpio_data_o(s6_data_i),
784
                  .gpio_addr_i(s6_addr_o),
785
                  .gpio_sel_i(s6_sel_o),
786
                  .gpio_we_i(s6_we_o),
787
                  .gpio_cyc_i(s6_cyc_o),
788
                  .gpio_stb_i(s6_stb_o),
789
                  .gpio_ack_o(s6_ack_i),
790
                  .gpio_err_o(s6_err_i),
791
                  .gpio_rty_o(s6_rty_i),
792
 
793 24 qaztronic
                  .gpio_a_aux_i(gpio_a_aux_i),
794
                  .gpio_a_ext_pad_i(gpio_a_ext_pad_i),
795
                  .gpio_a_ext_pad_o(gpio_a_ext_pad_o),
796
                  .gpio_a_ext_padoe_o(gpio_a_ext_padoe_o),
797 22 qaztronic
                  .gpio_a_inta_o(),
798
 
799 24 qaztronic
                  .gpio_b_aux_i(gpio_b_aux_i),
800
                  .gpio_b_ext_pad_i(gpio_b_ext_pad_i),
801
                  .gpio_b_ext_pad_o(gpio_b_ext_pad_o),
802
                  .gpio_b_ext_padoe_o(gpio_b_ext_padoe_o),
803 22 qaztronic
                  .gpio_b_inta_o(),
804
 
805 24 qaztronic
                  .gpio_c_aux_i(gpio_c_aux_i),
806
                  .gpio_c_ext_pad_i(gpio_c_ext_pad_i),
807
                  .gpio_c_ext_pad_o(gpio_c_ext_pad_o),
808
                  .gpio_c_ext_padoe_o(gpio_c_ext_padoe_o),
809 22 qaztronic
                  .gpio_c_inta_o(),
810
 
811 24 qaztronic
                  .gpio_d_aux_i(gpio_d_aux_i),
812
                  .gpio_d_ext_pad_i(gpio_d_ext_pad_i),
813
                  .gpio_d_ext_pad_o(gpio_d_ext_pad_o),
814
                  .gpio_d_ext_padoe_o(gpio_d_ext_padoe_o),
815 22 qaztronic
                  .gpio_d_inta_o(),
816
 
817 24 qaztronic
                  .gpio_e_aux_i(gpio_e_aux_i),
818
                  .gpio_e_ext_pad_i(gpio_e_ext_pad_i),
819
                  .gpio_e_ext_pad_o(gpio_e_ext_pad_o),
820
                  .gpio_e_ext_padoe_o(gpio_e_ext_padoe_o),
821 22 qaztronic
                  .gpio_e_inta_o(),
822
 
823 24 qaztronic
                  .gpio_f_aux_i(gpio_f_aux_i),
824
                  .gpio_f_ext_pad_i(gpio_f_ext_pad_i),
825
                  .gpio_f_ext_pad_o(gpio_f_ext_pad_o),
826
                  .gpio_f_ext_padoe_o(gpio_f_ext_padoe_o),
827 22 qaztronic
                  .gpio_f_inta_o(),
828
 
829 24 qaztronic
                  .gpio_g_aux_i(gpio_g_aux_i),
830
                  .gpio_g_ext_pad_i(gpio_g_ext_pad_i),
831
                  .gpio_g_ext_pad_o(gpio_g_ext_pad_o),
832
                  .gpio_g_ext_padoe_o(gpio_g_ext_padoe_o),
833 22 qaztronic
                  .gpio_g_inta_o(),
834
 
835
                  .gpio_clk_i(clk_i),
836
                  .gpio_rst_i(rst_i)
837
                );
838
 
839
  //---------------------------------------------------
840
  // debug_0
841
`ifdef USE_DEBUG_0
842
  assign debug_0 = {
843
                      iwb_clk_i,
844
                      iwb_rst_i,
845
                      iwb_ack_i,
846
                      iwb_err_i,
847
                      iwb_rty_i,
848
                      iwb_cyc_o,
849
                      iwb_stb_o,
850
                      iwb_we_o,
851
                      iwb_sel_o,
852
                      iwb_cab_o,
853
                      dwb_clk_i,
854
                      dwb_rst_i,
855
                      dwb_ack_i,
856
                      dwb_err_i,
857
                      dwb_rty_i,
858
                      dwb_cyc_o,
859
                      dwb_stb_o,
860
                      dwb_we_o,
861
                      dwb_sel_o,
862
                      dwb_cab_o,
863
                      iwb_adr_o,
864
                      iwb_dat_i,
865
                      iwb_dat_o,
866
                      dwb_adr_o,
867
                      dwb_dat_i,
868
                      dwb_dat_o
869
                    };
870
`endif
871
 
872
endmodule
873
 
874
 

powered by: WebSVN 2.1.0

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