"type" can't use for prefix variable

Discussion in 'VHDL' started by benghwee8, Aug 18, 2008.

  1. benghwee8

    benghwee8

    Joined:
    Aug 18, 2008
    Messages:
    1
    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?
    benghwee8, Aug 18, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tim Tyler
    Replies:
    36
    Views:
    1,448
    Darryl L. Pierce
    Dec 10, 2004
  2. Chris  Chiasson
    Replies:
    6
    Views:
    604
    Richard Tobin
    Nov 14, 2006
  3. gara.matt@gmail.com
    Replies:
    8
    Views:
    390
    James Kanze
    Jul 22, 2007
  4. Sanil
    Replies:
    2
    Views:
    4,723
    James Kanze
    Dec 14, 2007
  5. clearguy02@yahoo.com

    To strip off a prefix in a variable..

    clearguy02@yahoo.com, Feb 4, 2008, in forum: Perl Misc
    Replies:
    3
    Views:
    77
    John W. Krahn
    Feb 4, 2008
Loading...

Share This Page