|
楼主 |
发表于 2010-10-9 10:47:09
|
显示全部楼层
能否在“打开nios_core_inst.v,根据该Nios II软核系统例化模板文件,编辑顶层文件nios_sram.v”中再详细一点呢?我生成的nios_core_inst.v与顶层文件nios_sram.v分别为:
//Example instantiation for system 'niosii_core_sram'
niosii_core_sram niosii_core_sram_inst
(
.clk_50 (clk_50),
.coe_SRAM_ADDR_from_the_sram (coe_SRAM_ADDR_from_the_sram),
.coe_SRAM_CE_N_from_the_sram (coe_SRAM_CE_N_from_the_sram),
.coe_SRAM_DQ_to_and_from_the_sram (coe_SRAM_DQ_to_and_from_the_sram),
.coe_SRAM_LB_N_from_the_sram (coe_SRAM_LB_N_from_the_sram),
.coe_SRAM_OE_N_from_the_sram (coe_SRAM_OE_N_from_the_sram),
.coe_SRAM_UB_N_from_the_sram (coe_SRAM_UB_N_from_the_sram),
.coe_SRAM_WE_N_from_the_sram (coe_SRAM_WE_N_from_the_sram),
.in_port_to_the_pio_key (in_port_to_the_pio_key),
.out_port_from_the_pio_led (out_port_from_the_pio_led),
.reset_n (reset_n)
);
************与***********
module niosii_core_sram (
// 1) global signals:
clk_50,
reset_n,
// the_pio_key
in_port_to_the_pio_key,
// the_pio_led
out_port_from_the_pio_led,
// the_sram
coe_SRAM_ADDR_from_the_sram,
coe_SRAM_CE_N_from_the_sram,
coe_SRAM_DQ_to_and_from_the_sram,
coe_SRAM_LB_N_from_the_sram,
coe_SRAM_OE_N_from_the_sram,
coe_SRAM_UB_N_from_the_sram,
coe_SRAM_WE_N_from_the_sram
)
;
output [ 17: 0] coe_SRAM_ADDR_from_the_sram;
output coe_SRAM_CE_N_from_the_sram;
inout [ 15: 0] coe_SRAM_DQ_to_and_from_the_sram;
output coe_SRAM_LB_N_from_the_sram;
output coe_SRAM_OE_N_from_the_sram;
output coe_SRAM_UB_N_from_the_sram;
output coe_SRAM_WE_N_from_the_sram;
output [ 2: 0] out_port_from_the_pio_led;
input clk_50;
input [ 2: 0] in_port_to_the_pio_key;
input reset_n;
wire clk_50_reset_n;
wire [ 17: 0] coe_SRAM_ADDR_from_the_sram;
wire coe_SRAM_CE_N_from_the_sram;
..............................................
);
endmodule
如何修改注意部分,只需在module中增加相关的,如:
nios_core nios_core_inst
16 (
17 .clk_50 (CLOCK_50),
18 //
19 .coe_SRAM_ADDR_from_the_sram (SRAM_ADDR),
20 .coe_SRAM_CE_N_from_the_sram (SRAM_CE_N),
21 .coe_SRAM_DQ_to_and_from_the_sram (SRAM_DQ),
22 .coe_SRAM_LB_N_from_the_sram (SRAM_LB_N),
23 .coe_SRAM_OE_N_from_the_sram (SRAM_OE_N),
24 .coe_SRAM_UB_N_from_the_sram (SRAM_UB_N),
25 .coe_SRAM_WE_N_from_the_sram (SRAM_WE_N),
26 //
27 .out_port_from_the_pio (Q_LED),
28 .reset_n (Q_KEY)
29 );
文件就行了么?.inst文件不用动了吧!
若是这样的话,我就出现了以上的问题了。快崩溃了,麻烦在指教一下吧,谢谢了!! |
|