|
楼主 |
发表于 2013-9-19 09:00:30
|
显示全部楼层
回复 6# rvnistelrooy
又看了一下,应该是没错,还是一样的结果,不知道怎么搞的??[\n]
mif文件应该没错,是用matlab生成 content...end 之间的内容,大致如下(数据太多,列举一部分):WIDTH=10;
DEPTH=1024;
ADDRESS_RADIX=UNS;
DATA_RADIX=UNS;
CONTENT
BEGIN
0 : 0 ;
1 : 1 ;
2 : 2 ;
3 : 3 ;
4 : 4 ;
5 : 5 ;
6 : 6 ;
7 : 7 ;
8 : 8 ;
9 : 9 ;
10 : 10 ;
. .
(略)
. .
1023:804;
END;
这是生成的rom程序:
`timescale 1 ps / 1 ps
// synopsys translate_on
module atan_rom (
address,
clock,
q);
input
[9:0] address;
input
clock;
output
[9:0] q;
`ifndef ALTERA_RESERVED_QIS
// synopsys translate_off
`endif
tri1
clock;
`ifndef ALTERA_RESERVED_QIS
// synopsys translate_on
`endif
wire [9:0] sub_wire0;
wire [9:0] q = sub_wire0[9:0];
altsyncram
altsyncram_component (
.clock0 (clock),
.address_a (address),
.q_a (sub_wire0),
.aclr0 (1'b0),
.aclr1 (1'b0),
.address_b (1'b1),
.addressstall_a (1'b0),
.addressstall_b (1'b0),
.byteena_a (1'b1),
.byteena_b (1'b1),
.clock1 (1'b1),
.clocken0 (1'b1),
.clocken1 (1'b1),
.clocken2 (1'b1),
.clocken3 (1'b1),
.data_a ({10{1'b1}}),
.data_b (1'b1),
.eccstatus (),
.q_b (),
.rden_a (1'b1),
.rden_b (1'b1),
.wren_a (1'b0),
.wren_b (1'b0));
defparam
altsyncram_component.clock_enable_input_a = "BYPASS",
altsyncram_component.clock_enable_output_a = "BYPASS",
altsyncram_component.init_file = "../atan/atan_data.mif",
altsyncram_component.intended_device_family = "Stratix II",
altsyncram_component.lpm_hint = "ENABLE_RUNTIME_MOD=NO",
altsyncram_component.lpm_type = "altsyncram",
altsyncram_component.numwords_a = 1024,
altsyncram_component.operation_mode = "ROM",
altsyncram_component.outdata_aclr_a = "NONE",
altsyncram_component.outdata_reg_a = "CLOCK0",
altsyncram_component.widthad_a = 10,
altsyncram_component.width_a = 10,
altsyncram_component.width_byteena_a = 1;
endmodule |
|