help!(rom code)

Joined
Dec 22, 2007
Messages
1
Reaction score
0
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top