EDAboard.com | EDAboard.eu | EDAboard.de | EDAboard.co.uk | RTV forum PL | NewsGroups PL

Can you take attributes from array type element?

elektroda.net NewsGroups Forum Index - VHDL Language - Can you take attributes from array type element?

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.

elektroda.net NewsGroups Forum Index - VHDL Language - Can you take attributes from array type element?

Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
RTV map EDAboard.com map News map EDAboard.eu map EDAboard.de map EDAboard.co.uk map Opony