M
Max
Guest
I wrote this code:
------------8<---------------------
entity main is
Generic (w : integer := 12);
Port ( addr : in std_logic_vector(3 downto 0);
ce : in std_logic;
y : out std_logic_vector(w-1 downto 0));
end main;
architecture Behavioral of main is
begin
process (addr, ce)
begin
y <= (others => '0');
if (addr < w and ce = '1') then
y(to_integer(unsigned(addr))) <= '1';
end if;
end process;
end Behavioral;
------------8<---------------------
when I try to synthetize I obtain:
WARNING:Xst:790 - main.vhd line XX: Index value(s) does not match
array range, simulation mismatch.
This is correct, but there is no way to overflow y array index.
So how can I avoid this warnig?
thanks
------------8<---------------------
entity main is
Generic (w : integer := 12);
Port ( addr : in std_logic_vector(3 downto 0);
ce : in std_logic;
y : out std_logic_vector(w-1 downto 0));
end main;
architecture Behavioral of main is
begin
process (addr, ce)
begin
y <= (others => '0');
if (addr < w and ce = '1') then
y(to_integer(unsigned(addr))) <= '1';
end if;
end process;
end Behavioral;
------------8<---------------------
when I try to synthetize I obtain:
WARNING:Xst:790 - main.vhd line XX: Index value(s) does not match
array range, simulation mismatch.
This is correct, but there is no way to overflow y array index.
So how can I avoid this warnig?
thanks