Tricky
Guest
Mon Jul 05, 2010 12:02 pm
Is there any way to get access to the elements in an array type?
eg, array is declared:
type sfixed_array_t is array(integer range<>) of sfixed(5 downto -12);
is there any way to access the length of the sfixed element via the
sfixed_array_t?
Or do I just have to declare a subtype and make an array of them?
KJ
Guest
Mon Jul 05, 2010 5:18 pm
On Jul 5, 5:02 am, Tricky <trickyh...@gmail.com> wrote:
Quote:
Is there any way to get access to the elements in an array type?
eg, array is declared:
type sfixed_array_t is array(integer range<>) of sfixed(5 downto -12);
is there any way to access the length of the sfixed element via the
sfixed_array_t?
Or do I just have to declare a subtype and make an array of them?
Once you declare a signal or variable of the sfixed_array_t, (or
you're within a function or a procedure that gets passed an
sfixed_array_t parameter) then you can get the length of an element of
the array.
KJ
Andy Rushton
Guest
Tue Jul 06, 2010 7:13 pm
Tricky wrote:
Quote:
Is there any way to get access to the elements in an array type?
eg, array is declared:
type sfixed_array_t is array(integer range<>) of sfixed(5 downto -12);
is there any way to access the length of the sfixed element via the
sfixed_array_t?
No there isn't
Quote:
Or do I just have to declare a subtype and make an array of them?
Exactly. Then you can use attributes of the subtype to get details such
as the length of the element.