для примера приведу простую программку с этой проблемой:
read_testCODE
module read_test ( clk,data_out);
input clk;
output [13:0] data_out;
parameter size = 10;
reg [13:0] read_mem[size-1:0];
reg [13:0] data_out;
reg [9:0] i;
initial
begin
i=0;
$readmemb ("data.mif", read_mem);
end
always@(posedge clk)
begin
data_out<= read_mem[i];
i <= i + 1;
end
endmodule
read_test_tbCODE
`timescale 1ns/10ps
module read_test_tb;
reg clk;
read_test model(.clk(clk));
initial
begin
clk=0;
end
always
begin
#5000 clk=~clk;
end
endmodule
data.mifCODE
-- Copyright © 1991-2011 Altera Corporation
-- Your use of Altera Corporation's design tools, logic functions
-- and other software and tools, and its AMPP partner logic
-- functions, and any output files from any of the foregoing
-- (including device programming or simulation files), and any
-- associated documentation or information are expressly subject
-- to the terms and conditions of the Altera Program License
-- Subscription Agreement, Altera MegaCore Function License
-- Agreement, or other applicable license agreement, including,
-- without limitation, that your use is for the sole purpose of
-- programming logic devices manufactured by Altera and sold by
-- Altera or its authorized distributors. Please refer to the
-- applicable agreement for further details.
-- Quartus II generated Memory Initialization File (.mif)
WIDTH=10;
DEPTH=14;
ADDRESS_RADIX=UNS;
DATA_RADIX=BIN;
CONTENT BEGIN
0 : 0000101010;
1 : 0000001111;
2 : 0010101010;
3 : 0000010111;
4 : 0000100011;
5 : 0000010101;
6 : 0000000100;
7 : 0101010011;
8 : 0000000011;
9 : 0000111111;
10 : 0000000011;
11 : 0100101010;
12 : 0000000010;
13 : 0000000110;
END;
проблема та же.ни у кого нет идей?
Сообщение отредактировал Kokos - Oct 31 2012, 06:22