Re: [vhdl-200x] interface proposals

From: Tristan Gingold <tgingold@free.fr>
Date: Sun Nov 22 2015 - 03:40:59 PST
On 22/11/15 11:56, Brent Hayhoe wrote:
> Some thoughts:
>
> -- So this is the Ada 'discriminated record' type that I presume we are
> -- discussing. The way it looks to me is just a 'constant generic'
> applied to -- the record type:
>
> type Discriminated_Record (Size : Natural) is
>     record
>        A : String (1 .. Size);
>     end record;
>
> -- So if I VHDL'asize this we could have a generic block preceding the
> record
> -- block in the type declaration.
>
> -- We then need to 'generic map' the 'Size' value through when we declare a
> -- constant and signals:
>
> type MyRecType is
>     generic(
>        Size : Natural
>     );
>     record
>        A : String (1 to Size);
>     end record MyRecType;

Isn't this a little bit overkill given that it is already possible
to have unbounded arrays as record elements ?

> constant MyRecConst  : MyRecType generic map(10) := (A => "0123456789AB");

I suppose this results in an error when elaborated ? :-)

Tristan.
Received on Sun Nov 22 03:41:05 2015

This archive was generated by hypermail 2.1.8 : Sun Nov 22 2015 - 03:41:15 PST