"type" can't use for prefix variable

Joined
Aug 18, 2008
Messages
1
Reaction score
0
entity RAM_TEST is
generic
(
B : natural := 9
);

port
(
ADD : in natural range 0 to 2**B - 1;
DATA_IN : in std_logic_vector(15 downto 0);
DATA_OUT: out std_logic_vector (15 downto 0);

);
end RAM_TEST
architecture RAM_TEST_arch of RAM_TEST is

-- Build a 2-D array type for the RAM
type MEMORY is array(ADD'high downto 0) of std_logic_vector(15 downto 0);

-- Declare the RAM signal.
signal RAM : MEMORY;

begin
.......................
........................
RAM(ADD) <= DATA_IN
......................



Hi, I am trying to write some commads to build ram, above are the commands.
However, I have met an error from simulator:
1st. This error mentions that the 'type' syntax cannot support the prefix like "ADD'high", any suggestion to correct this?
 

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,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top