Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > unconstrained two-dimensional array?

Thread Tools

unconstrained two-dimensional array?

andrea2 andrea2 is offline
Junior Member
Join Date: Oct 2006
Posts: 1

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!
Reply With Quote

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
Unconstrained array of unconstrained vector. Amal VHDL 5 03-08-2006 05:02 PM
How to specify default value to a variable of unconstrained type INSIDE a VHDL procedure ? Pankaj VHDL 2 08-23-2004 04:36 AM
array of signed with unconstrained bit width (suggestions?) Victor Hannak VHDL 1 11-25-2003 11:20 PM
Using nested, unconstrained array types? Alex Rast VHDL 3 10-06-2003 07:08 PM
Re: Unconstrained 2 D array FE VHDL 0 06-26-2003 12:55 PM