Comment on IR2063

From: Peter Ashenden <peter_at_.....>
Date: Wed Jan 11 2006 - 21:45:45 PST
Folks,

Our recommendation for IR2063 was to say "someone else's problem." Guess
where that landed! ;-)

I've just been working on clauses 2.1.1.1 and 2.1.1.2 as part of the
unconstrained element proposal for the Accellera VHDL-TC. 


The revised text for the relevant paragraph of 2.1.1.1 is:

For a formal parameter of a composite subtype, the index ranges of the
formal, if it is an array, and of any array subelements, are determined as
specified in 3.2.1.1. For a formal parameter of mode in or inout, it is an
error if the value of the associated actual parameter (after application of
any conversion function or type conversion present in the actual part) does
not contain a matching subelement for each subelement of the formal. It is
also an error if the value of each subelement of the actual (after applying
any conversion function or type conversion present in the actual part) does
not belong to the subtype of the corresponding subelement of the formal. If
the formal parameter is of mode out or inout, it is also an error if, at the
end of the subprogram call, the value of each subelement of the formal
(after applying any conversion function or type conversion present in the
formal part) does not belong to the subtype of the corresponding subelement
of the actual.


And for 2.1.1.2:

For a formal parameter of a composite subtype, the index ranges of the
formal, if it is an array, and of any array subelements, are determined as
specified in 3.2.1.1. It is an error if the actual signal does not contain a
matching subelement for each subelement of the formal. It is also an error
if the mode of the formal is in or inout and if the value of each subelement
of the actual does not belong to the subtype of the corresponding subelement
of the formal.


As James correctly points out, the subtype for the formal is defined by the
formal's declaration, and it is the index ranges that may be determined from
the actual. The way in which the index ranges are determined is specified in
3.2.1.1, so we can refer to that clause directly. My plan is for 3.2.1.1 to
determine the (nested) index ranges that are left undefined by the subtype
of the formal (that is, those index ranges for which the subtype provides no
constraint). Thus, which ever way the index range for a given (possibly
nested) index is determined, either from the subtype of the formal or from
the actual, there must be a matching actual subelement for each formal
subelement. That's what I've tried to capture in the above changes.

Comments?

Cheers,

PA

--
Dr. Peter J. Ashenden                peter@ashenden.com.au
Ashenden Designs Pty. Ltd.           www.ashenden.com.au
PO Box 640                           VoIP: 0871270078@sip.internode.on.net
Stirling, SA 5152                    Phone (mobile):  +61 414 709 106
Australia
Received on Wed Jan 11 21:45:45 2006

This archive was generated by hypermail 2.1.8 : Wed Jan 11 2006 - 21:45:48 PST