Four dimensional array

Discussion in 'VHDL' started by sridar, Jun 20, 2009.

  1. sridar

    sridar

    Joined:
    Jun 5, 2007
    Messages:
    51
    Hi techies,

    I am declaring constant value of four dimension array as below.

    Type Ostates is array (0 to 1) of std_logic_vector (1 downto 0);
    Type Outstates is array (0 to 1) of Ostates ;
    Type VaryStates is array (0 to 1) of Outstates;
    Type User is array (0 to 1) of VaryStates;

    CONSTANT fourdarray : User := ( ( (("11","01"),
    ("10","11")),
    (("11","01"),
    ("10","11")) ),
    ( (("11","01"),
    ("10","11")),
    (("11","01"),
    ("10","11")) ) );

    any of the value in constant is accessed by fourdarray (x)(x)(x)(x). for example, fourdarray (0)(0)(1)(1) access the value 11.

    I am able to synthesize as well as implement the design in xilinx ISE tool.

    But i wanna know whether this approach is correct??
     
    sridar, Jun 20, 2009
    #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. Alf P. Steinbach
    Replies:
    0
    Views:
    450
    Alf P. Steinbach
    Aug 18, 2003
  2. John Harrison
    Replies:
    4
    Views:
    6,949
    Default User
    Aug 19, 2003
  3. Venkat
    Replies:
    4
    Views:
    1,007
    Venkat
    Dec 5, 2003
  4. fivelitermustang
    Replies:
    11
    Views:
    823
    John Harrison
    May 23, 2004
  5. sridar

    Four dimensional array

    sridar, Jun 20, 2009, in forum: VHDL
    Replies:
    0
    Views:
    433
    sridar
    Jun 20, 2009
Loading...

Share This Page