Re: [vhdl-200x] RFC: New Predefined Attributes: 'actual, and 'formal

From: Brent Hayhoe <bahayhoe@gmail.com>
Date: Mon Sep 08 2014 - 10:36:14 PDT
Well done Ryan, I'd overlooked obvious that one!

Brent.


On 08/09/2014 16:37, ryan.w.hinton@L-3com.com wrote:
> No, the 'SUBTYPE attribute does not become redundant.  With your suggestions we can get the bounds of a scalar value, but 'SUBTYPE includes the base type as well.
>
>
> entity example is
>    port (
>      clk    : std_logic;
>      port_a : <whatever>;
>      ...);
> end entity example;
>
> architecture sparse of example is
>    signal port_a_registered : port_a'subtype;
>    ...
> begin
>
>    port_a_registered <= port_a when rising_edge(clk);
>    ...
> end architecture sparse;
>
>
> This works regardless of whether port_a is type integer, time, real, enumerated, other scalar, array, record, whatever.  I use 'ELEMENT and 'SUBTYPE constantly in code that I write.
>
> - Ryan
>
> -----Original Message-----
> From: owner-vhdl-200x@eda.org [mailto:owner-vhdl-200x@eda.org] On Behalf Of Brent Hayhoe
> Sent: Sunday, September 07, 2014 5:00 PM
> To: vhdl-200x@eda.org
> Subject: Re: [vhdl-200x] RFC: New Predefined Attributes: 'actual, and 'formal
>
> There has been some discussion on the following proposal:
>
>       http://www.eda-twiki.org/cgi-bin/view.cgi/P1076/NewPredefinedAttributeActual
>
> A suggestion has been made to extend scaler (and composite record) type related attributes to objects of these types in the same way that it is done for composite array types ('left, 'right, 'low, 'high, etc.)
>
> If this were to be adopted it would make the 'subtype attribute redundant.
>
> So, does anyone know why the 'subtype attribute was adopted rather than just extending the prefix of these attributes of scaler types to objects?
>
> Are there any other reasons for its use (apart from accessing type attributes of an object)?
>
>


-- 

Regards,

         Brent Hayhoe.

Aftonroy Limited                            Telephone: +44 (0)20-8449-1852
135 Lancaster Road,
New Barnet,                                    Mobile: +44 (0)79-6647-2574
Herts., EN4 8AJ,  U.K.                          Email: Brent.Hayhoe@Aftonroy.com

Registered Number: 1744190 England.
Registered Office:

4th Floor, Imperial House,
15 Kingsway,
London, WC2B 6UN, U.K.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Sep 8 10:36:44 2014

This archive was generated by hypermail 2.1.8 : Mon Sep 08 2014 - 10:37:10 PDT