i wrote a code for rom in vhdl using max plus 2 but it shows error when compiled .The following is the code
LIBRARY ieee;
USE ieee.std_logic_1164.all;
-------------------------------
PACKAGE my_package IS
TYPE col IS ARRAY(7 downto 0) OF std_logic;
TYPE matrix IS ARRAY(0 to 7) OF col;
END my_package;
---------------------------------
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE work.my_package.all;
------------------------------
ENTITY rom2 IS
PORT(addr:IN integer range 0 to 7;
dout:OUT col);
END rom2;
----------------------------------
ARCHITECTURE beh_rom2 OF rom2 IS
constant memory : matrix:=( "00000000","00000010","00000100","00001000","00010000","00100000","01000000","10000000");
BEGIN
dout<=memory(addr);
END beh_rom2;
When complied it shows the following
UNSUPPORTED FEATURE ERROR: AGGREGATES ARE SUPPORTED ONLY FOR TYPES THAT MAP TO AN ARRAY OF BITS
CAN ANY ONE HELP ME OUT
LIBRARY ieee;
USE ieee.std_logic_1164.all;
-------------------------------
PACKAGE my_package IS
TYPE col IS ARRAY(7 downto 0) OF std_logic;
TYPE matrix IS ARRAY(0 to 7) OF col;
END my_package;
---------------------------------
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE work.my_package.all;
------------------------------
ENTITY rom2 IS
PORT(addr:IN integer range 0 to 7;
dout:OUT col);
END rom2;
----------------------------------
ARCHITECTURE beh_rom2 OF rom2 IS
constant memory : matrix:=( "00000000","00000010","00000100","00001000","00010000","00100000","01000000","10000000");
BEGIN
dout<=memory(addr);
END beh_rom2;
When complied it shows the following
UNSUPPORTED FEATURE ERROR: AGGREGATES ARE SUPPORTED ONLY FOR TYPES THAT MAP TO AN ARRAY OF BITS
CAN ANY ONE HELP ME OUT