H
Hayami
Guest
Hi all,
when compiling code with xilinx ISE i get this error code:
WARNING:Xst:790 - C:/Programmi/bios/bios.vhd line 51 and 53: Index
value(s) does not match array range, simulation mismatch.
I spend last 3 days to find the bug without any results, please help!
The code read out one byte each clock edge from the array.
Thank you very much
entity ram_module is
port(clk : in std_logic;
R_W : in std_logic;
data_in : in std_logic_vector (15 downto 0);
data_out : out std_logic_vector (15 downto 0));
end ram_module;
architecture BHV of ram_module is
signal addr: std_logic_vector(3 downto 0);
type memory is array (0 to 9) of std_logic_vector(15 downto 0);
signal reg : memory := (
"1110001100000000",
"0101010010100000",
"0001010010101100",
"0000010000001010",
"0110100001000000",
"0001011011000100",
"0001001001100001",
"0001010010111111",
"0000111000000100",
"1111111111111111" --HALT
);
begin
process(clk, R_W)
begin
if (clk = '1' and clk' event) then
if (R_W = '1') then
data_out <= reg(conv_integer(addr)); -- LINE 51
else
reg(conv_integer(addr)) <= data_in; -- LINE 53
end if;
addr<=addr+1;
end if;
end process;
end BHV;
when compiling code with xilinx ISE i get this error code:
WARNING:Xst:790 - C:/Programmi/bios/bios.vhd line 51 and 53: Index
value(s) does not match array range, simulation mismatch.
I spend last 3 days to find the bug without any results, please help!
The code read out one byte each clock edge from the array.
Thank you very much
entity ram_module is
port(clk : in std_logic;
R_W : in std_logic;
data_in : in std_logic_vector (15 downto 0);
data_out : out std_logic_vector (15 downto 0));
end ram_module;
architecture BHV of ram_module is
signal addr: std_logic_vector(3 downto 0);
type memory is array (0 to 9) of std_logic_vector(15 downto 0);
signal reg : memory := (
"1110001100000000",
"0101010010100000",
"0001010010101100",
"0000010000001010",
"0110100001000000",
"0001011011000100",
"0001001001100001",
"0001010010111111",
"0000111000000100",
"1111111111111111" --HALT
);
begin
process(clk, R_W)
begin
if (clk = '1' and clk' event) then
if (R_W = '1') then
data_out <= reg(conv_integer(addr)); -- LINE 51
else
reg(conv_integer(addr)) <= data_in; -- LINE 53
end if;
addr<=addr+1;
end if;
end process;
end BHV;