TWiki
>
P1076 Web
>
VHDL2017
>
LCS2016_019
(revision 38) (raw view)
Edit
Attach
---+ Language Change Specification for Inferring Constraints from Initial Values for Signals and Variables ---+ Proposal ---++ | <sticky><b>LCS Number:</b></sticky> | LCS-2016-019 | | <sticky><b>Version:</b></sticky> | 8 | | <sticky><b>Date:</b></sticky> | 2017-02-24 | | <sticky><b>Status:</b></sticky> | | | <sticky><b>Author:</b></sticky> | Ryan Hinton %BR% Martin Zabel %BR% Jim Lewis | | <sticky><b>Email:</b></sticky> | [[Main.RyanHinton]] %BR% [[Main.MartinZabel]] %BR% [[Main.JimLewis]] | | <sticky><b>Source Doc:</b></sticky> | [[InitObjectSizing][Inferring Constraints from Initial Values for Signals and Variables]] | | <sticky><b>History Doc:</b></sticky> | [[LCS2016_019_History][History]] | | <sticky><b>Summary:</b></sticky> | Allow for signal and variable subtype constraints to be inferred from initial value | ---++ Style Notes <noautolink> <sticky> Changes are shown in %RED%red font%ENDCOLOR%.%BR% Deletions are %RED%<del>crossed out</del>%ENDCOLOR%.%BR% Editing or reviewing notes in %GREEN%green font%ENDCOLOR%. ---++ Details of Language Change ---+++ LRM 5.3.2.2 Index constraints and discrete ranges ---++++ edit 019.1: Bulleted list from the end of page 47 to the beginning of page 48 The index range for each index of an array object or array subelement of a composite object is determined as follows: %RED%<del>a) ...</del> %GREEN%[Remove this item and fix bullet labels of ensuing list.]%ENDCOLOR% %RED%<del>b</del>a%ENDCOLOR%) For a constant, %RED%variable, or signal%ENDCOLOR% declared by an object declaration, if the subtype %RED%indication of the object declaration%ENDCOLOR% %RED%<del>of the constant</del>%ENDCOLOR% defines the index range, %RED%then%ENDCOLOR% the index range of the %RED%<del>constant</del> object%ENDCOLOR% is that defined by the subtype %RED%indication%ENDCOLOR%; otherwise, the index range of the %RED%<del>constant</del> object%ENDCOLOR% is the corresponding index range of the initial value %RED%if one is given. For a constant with an initialization expression, a variable, or a signal, it is an error if the index range is not determinable from either the subtype indication or the initialization expression. %ENDCOLOR% ---+++ edit 019.2: LRM 14.4.2.5 Object declarations The rules of this subclause apply only to explicitly declared objects (see 6.4.2.1). Generic declarations, port declarations, and other interface declarations are elaborated as described in 14.3.2 through 14.3.5 and 14.6. Elaboration of an object declaration that declares an object other than a file object or an object of a protected type proceeds as follows: <font color="red"><strike> a) The subtype indication is first elaborated; this establishes the subtype of the object. b) If the object declaration includes an explicit initialization expression, then the initial value of the object is obtained by evaluating the expression. It is an error if the value of the expression does not belong to the subtype of the object; if the object is a composite object, then an implicit subtype conversion is first performed on the value unless the object is a constant whose subtype indication denotes an unconstrained type. Otherwise, any implicit initial value for the object is determined.</strike></font> <font color="red"> a) The subtype indication is first elaborated; this establishes an initial subtype of the object. b) If the object declaration includes an initialization expression, * The initial value of the object is obtained by evaluating the expression. * If the object is a composite object, then an implicit subtype conversion is performed on the initial value. * It is an error if the initial value does not belong to the subtype of the object. * If the subtype of the object is either an unconstrained or partially constrained type, for each index range that is not determined, the corresponding index range of the initial value is used. * It is an error if an index range cannot be determined from either the subtype indication or the initial value. c) If the object declaration is a signal or variable and does not include an initialization expression, * It is an error if the subtype of the object is either an unconstrained or partially constrained type. * Any implicit initial value for the object is determined. </font> %RED%d <del>c</del>%ENDCOLOR%) The object is created. %RED%e <del>d</del>%ENDCOLOR%) Any initial value is assigned to the object. %GREEN%(Delete following paragraph because it repeats information from the steps above (for VHDL-2008) without clarification or additional information.)%ENDCOLOR% %RED%<del>The initialization of such an object (either the declared object or one of its subelements) involves a check that the initial value belongs to the subtype of the object. For a composite object declared by an object declaration, an implicit subtype conversion is first applied as for an assignment statement, unless the object is a constant whose subtype is an unconstrained type. </del>%ENDCOLOR% %GREEN%(Remainder of section on file objects and protecte type objects remains unmodified.)%ENDCOLOR% ---++ <a name="Comments"></a>Comments %COMMENT%</sticky> </noautolink>
Edit
|
Attach
|
P
rint version
|
H
istory
:
r41
<
r40
<
r39
<
r38
<
r37
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r1 - 2017-07-22 - 17:07:20 -
TWikiGuest
P1076
Log In
or
Register
P1076 Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
Webs
Main
P1076
Ballots
LCS2016_080
P10761
P1647
P16661
P1685
P1734
P1735
P1778
P1800
P1801
Sandbox
TWiki
VIP
VerilogAMS
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback