Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > "type" can't use for prefix variable

Reply
Thread Tools

"type" can't use for prefix variable

 
 
benghwee8 benghwee8 is offline
Junior Member
Join Date: Aug 2008
Posts: 2
 
      08-18-2008
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?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
To strip off a prefix in a variable.. clearguy02@yahoo.com Perl Misc 3 02-04-2008 11:35 AM
"Variable variable name" or "variable lvalue" mfglinux Python 11 09-12-2007 03:08 AM
question about code style specifically variable declaration using _ prefix gara.matt@gmail.com C++ 8 07-22-2007 05:49 PM
removing a namespace prefix and removing all attributes not in that same prefix Chris Chiasson XML 6 11-14-2006 05:08 PM
"static" prefix - to parallel "this" prefix Tim Tyler Java 36 12-10-2004 01:02 AM



Advertisments