M
Mad I.D.
Guest
ERROR MESSAGE :
"Selector (Signal 'addr' of type std_logic_vector) is an unconstrained
array."
Architecture body, declarative part (before begin) can use entity
generics but statement part can't ?
I'm I right? Little explanation on this please.
entity rom1 is
generic (
ADDR_WIDTH : integer :=4;
DATA_WIDTH : integer :=8
);
port (
addr : in std_logic_vector (ADDR_WIDTH-1 downto 0);
dout : out std_logic_vector (DATA_WIDTH-1 downto 0)
);
end rom1;
architecture beh of rom1 is
begin
with addr select
dout <= "11001101" when "0000",
"01011100" when "0001",
"01010101" when "0010",
"00000000" when "0011",
...............
...............
"Selector (Signal 'addr' of type std_logic_vector) is an unconstrained
array."
Architecture body, declarative part (before begin) can use entity
generics but statement part can't ?
I'm I right? Little explanation on this please.
entity rom1 is
generic (
ADDR_WIDTH : integer :=4;
DATA_WIDTH : integer :=8
);
port (
addr : in std_logic_vector (ADDR_WIDTH-1 downto 0);
dout : out std_logic_vector (DATA_WIDTH-1 downto 0)
);
end rom1;
architecture beh of rom1 is
begin
with addr select
dout <= "11001101" when "0000",
"01011100" when "0001",
"01010101" when "0010",
"00000000" when "0011",
...............
...............