unconstrained two-dimensional array?

Discussion in 'VHDL' started by andrea2, Oct 19, 2006.

  1. andrea2

    andrea2

    Joined:
    Oct 19, 2006
    Messages:
    1
    Likes Received:
    0
    Hello,

    I am using a two-dimensional array, the type is declared in a package:
    type my_array is array (natural range <>) of std_logic_vector(31 downto 0);
    Then I can use signals or ports of this type throughout my design:
    signal my_signal: my_array(a downto 0);
    where a is a generic value.

    Now I wonder is it possible to make the second dimension of my 2-dim-array also depend on a generic? (Because in most cases I won't need a length of 32 bit...)
    As I cannot use the generics in my package, this would mean to declare an array which is unconstrained in both dimensions...

    I'll be very grateful if anyone can help me with this topic. Thanks!
     
    andrea2, Oct 19, 2006
    #1
    1. Advertisements

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. Alex Rast
    Replies:
    3
    Views:
    6,600
    Jim Lewis
    Oct 6, 2003
  2. Amal
    Replies:
    5
    Views:
    9,751
    Brandon
    Mar 8, 2006
  3. John Harrison
    Replies:
    4
    Views:
    7,130
    Default User
    Aug 19, 2003
  4. Icosahedron
    Replies:
    8
    Views:
    898
    Vivek
    Aug 21, 2003
  5. Venkat
    Replies:
    4
    Views:
    1,261
    Venkat
    Dec 5, 2003
  6. Kenneth Brody

    Two-dimensional array to array of arrays

    Kenneth Brody, Dec 21, 2006, in forum: C Programming
    Replies:
    2
    Views:
    652
    Simon Biber
    Dec 21, 2006
  7. jens
    Replies:
    3
    Views:
    1,306
  8. Wirianto Djunaidi
    Replies:
    2
    Views:
    372
    Wirianto Djunaidi
    Apr 29, 2008
Loading...