Can you take attributes from array type element?

T

Tricky

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?
 
K

KJ

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
 
A

Andy Rushton

Tricky said:
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
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top