TWiki
>
P1076 Web
>
Vhdl2019CollectedRequirements
>
TopLCS2016_018c
(2020-02-17,
JimLewis
)
(raw view)
E
dit
A
ttach
---+ Language Change Specification for Attributes for Enumerated Types ---++ | <sticky><b>LCS Number:</b></sticky> | LCS-2016-018c | | <sticky><b>Version:</b> </sticky> | 3 {03-Jan-2017} %BR% 2 {04-Jan-2017} %BR% 1 {04-Jan-2017} | | <sticky><b>Date:</b> </sticky> | 04-Jan-2017 | | <sticky><b>Status:</b> </sticky> | Voting | | <sticky><b>Author:</b> </sticky> | Jim Lewis | | <sticky><b>Email:</b> </sticky> | [[Main.JimLewis]] | | <sticky><b>Source Doc:</b></sticky> | [[EnumAttributes][Attributes for Enumerated Types]] | | <sticky><b>Summary:</b> </sticky> | Attributes for Enumerated Types | | <sticky><b>Overlapping/Conflicting LCS:</b> </sticky> | [[LCS2016_018][LCS-2016-018 - Attributes for Enumerated Types]] %BR%\ [[TopLCS2016_018b][LCS-2016-018b - Algorithm to create object attributes]] | ---+++ Voting Results: Cast your votes here Yes: 1 %USERSIG{JimLewis - 2017-01-04}% ver 3 1 No: 1. %USERSIG{PatrickLehmann - 2017-01-10}% - as this LCS started as a fork to propose an alternative wording, I prefer the initial LCS number, which now merges all changes (LCS 018, 018b, 018c). 2. %USERSIG{KevinJennings - 2017-01-11}% - Ver 3. Switched my 'Yes' vote to LCS 18 which merges LCS 18c back into LCS 18. Abstain: ---++ Style Notes <noautolink> <sticky> Changes are shown in %RED%red font%ENDCOLOR%. Deletions are %RED%<del>crossed out</del>%ENDCOLOR%. Editing notes in %GREEN%green font%ENDCOLOR%. ---++ Reviewing Notes This LCS offers an approach of defining attributes for objects in section 16.2.2 which is consistent with the approach done in section 16.2.3. Each edit is identified separately with edit flag: Edit1a, Edit2, Edit3, Edit1b, Edit4, Edit5 You may reference these when voting if desired. This LCS LCS2016_18c is in direct compilation / conflict with the attributes defined in: * [[TopLCS2016_018][LCS-2016-18 - Attributes for Enumerated Types]] in combination with [[TopLCS2016_018b][LCS2016-18b - Algorithm to create object attributes]] It should also be noted that the above two bullet point items conflict with each other - so this LCS makes it as 3 way conflict - ie: 1 must be selected the others or items from the others must be deleted. ---++ Details of Language Change ---+++ 16.2.2 Predefined attributes of types and objects <font color="green">[Edit1a: Edit existing attributes as follows ]</font> | <font color="red">P<strike>T</strike></font>'BASE | Kind: | Type. | | | Prefix: | %RED%<strike>Any type or subtype T.</strike>%BR% \ Any prefix P that is appropriate for an object with type or subtype T, or an alias thereof,\ or that denotes any type or subtype T.%ENDCOLOR% | | | Result: | The base type of T. | | | Restrictions: | This attribute is allowed only as the prefix of the name of another\ attribute; for example, T'BASE'LEFT. | | ||| | <font color="red">P<strike>T</strike></font>'LEFT | Kind: | Value. | | | Prefix: | %RED%<strike>Any scalar type or subtype T.</strike>%BR% \ Any prefix P that is appropriate for an object with a scalar type or subtype T, or an alias thereof,\ or that denotes any scalar type or subtype T.%ENDCOLOR% | | | Result type: | Same type as T. | | | Result: | The left bound of T. | | ||| | <font color="red">P<strike>T</strike></font>'RIGHT | Kind: | Value. | | | Prefix: | %RED%<strike>Any scalar type or subtype T.</strike>%BR% \ Any prefix P that is appropriate for an object with a scalar type or subtype T, or an alias thereof,\ or that denotes any scalar type or subtype T.%ENDCOLOR% | | | Result type: | Same type as T. | | | Result: | The right bound of T. | | ||| | <font color="red">P<strike>T</strike></font>'HIGH | Kind: | Value. | | | Prefix: | %RED%<strike>Any scalar type or subtype T.</strike>%BR% \ Any prefix P that is appropriate for an object with a scalar type or subtype T, or an alias thereof,\ or that denotes any scalar type or subtype T.%ENDCOLOR% | | | Result type: | Same type as T. | | | Result: | The upper bound of T. | | ||| | <font color="red">P<strike>T</strike></font>'LOW | Kind: Value. | | | Prefix: | %RED%<strike>Any scalar type or subtype T.</strike>%BR% \ Any prefix P that is appropriate for an object with a scalar type or subtype T, or an alias thereof,\ or that denotes any scalar type or subtype T.%ENDCOLOR% | | | Result type: | Same type as T. | | | Result: | The lower bound of T. | <font color="green">[Edit2: Add new attributes as follows ]</font> | %RED%T'LENGTH | %RED%Kind: | %RED%Pure function | | %RED%| %RED%Prefix: | %RED%Any prefix P that is appropriate for an object with a discrete or physical type or subtype T,\ or an alias thereof,\ or that denotes any discrete or physical type or subtype T. | | %RED%| %RED%Result type: | %RED%_universal_integer_. | | %RED%| %RED%Result: | %RED%T'LENGTH = maximum(0, T'POS(T'HIGH) - T'POS(T'LOW) + 1) | | %RED%||| | %RED%T'RANGE | %RED%Kind: | %RED%Range | | %RED%| %RED%Prefix: | %RED%Any prefix P that is appropriate for an object with a scalar type or subtype T,\ or an alias thereof,\ or that denotes any scalar type or subtype T. | | %RED%| %RED%Result type: | %RED%The type of T. | | %RED%| %RED%Result: | %RED%The range T'LEFT to T'RIGHT if the range of T is ascending, or the range %BR% \ T'LEFT downto T'RIGHT if the range of T is descending. | | %RED%||| | %RED%T'REVERSE_RANGE | %RED%Kind: | %RED%Range | | %RED%| %RED%Prefix: | %RED%Any prefix P that is appropriate for an object with a scalar type or subtype T,\ or an alias thereof,\ or that denotes any scalar type or subtype T. | | %RED%| %RED%Result type: | %RED%The type of T. | | %RED%| %RED%Result: | %RED%The range T'RIGHT downto T'LEFT if the range of T is ascending, or the range %BR% \ T'RIGHT to T'LEFT if the range of T is descending. | | %RED%||| <font color="green">[Edit3: Add new POS_RANGE and POS_REVERSE_RANGE attribute as follows ]</font> | %RED%T'POS_RANGE | %RED%Kind: | %RED%Range | | %RED%| %RED%Prefix: | %RED%Any prefix P that is appropriate for an object with a discrete or physical type or subtype T,\ or an alias thereof,\ or that denotes any discrete or physical type or subtype T. | | %RED%| %RED%Result type: | %RED%INTEGER. | | %RED%| %RED%Result: | %RED%The range T'POS(T'LEFT) to T'POS(T'RIGHT) if the range of T is ascending, or %BR% \ the range T'POS(T'LEFT) downto T'POS(T'RIGHT) if the range of T is descending. | | %RED%||| | %RED%T'POS_REVERSE_RANGE | %RED%Kind: | %RED%Range | | %RED%| %RED%Prefix: | %RED%Any prefix P that is appropriate for an object with a discrete or physical type or subtype T,\ or an alias thereof,\ or that denotes any discrete or physical type or subtype T. | | %RED%| %RED%Result type: | %RED%INTEGER. | | %RED%| %RED%Result: | %RED%The range T'POS(T'RIGHT) downto T'POS(T'LEFT) if the range of T is ascending, or %BR% \ the range T'POS(T'RIGHT) to T'POS(T'LEFT) if the range of T is descending. | <font color="green">[Edit1b: Edit existing attribute as follows ]</font> | <font color="red">P<strike>T</strike></font>'ASCENDING | Kind: | Value. | | | Prefix: | %RED%<strike>Any scalar type or subtype T.</strike>%BR% \ Any prefix P that is appropriate for an object with a scalar type or subtype T, or an alias thereof,\ or that denotes any scalar type or subtype T.%ENDCOLOR% | | | Result type: | Type BOOLEAN | | | Result: | It is TRUE if T is defined with an ascending range; FALSE otherwise. | <font color="green">[Edit 4: Insert each of the following attributes after the attribute with the same name]</font> | %RED%O'IMAGE | %RED%Kind: | %RED%Pure function. | | %RED%| %RED%Prefix: | %RED%Any prefix O that is appropriate a scalar type or subtype, or an alias thereof | | %RED%| %RED%Shorthand for: | %RED%O'SUBTYPE'IMAGE(O) | | %RED%||| | %RED%O'POS | %RED%Kind: | %RED%Pure function. | | %RED%| %RED%Prefix: | %RED%Any prefix O that is appropriate a discrete or physical type or subtype, or an alias thereof | | %RED%| %RED%Shorthand for: | %RED%O'SUBTYPE'POS(O) | | %RED%||| | %RED%O'SUCC | %RED%Kind: | %RED%Pure function. | | %RED%| %RED%Prefix: | %RED%Any prefix O that is appropriate a discrete or physical type or subtype, or an alias thereof | | %RED%| %RED%Shorthand for: | %RED%O'SUBTYPE'SUCC(O) | | %RED%||| | %RED%O'PRED | %RED%Kind: | %RED%Pure function. | | %RED%| %RED%Prefix: | %RED%Any prefix O that is appropriate a discrete or physical type or subtype, or an alias thereof | | %RED%| %RED%Shorthand for: | %RED%O'SUBTYPE'PRED(O) | | %RED%||| | %RED%O'LEFTOF | %RED%Kind: | %RED%Pure function. | | %RED%| %RED%Prefix: | %RED%Any prefix O that is appropriate a discrete or physical type or subtype, or an alias thereof | | %RED%| %RED%Shorthand for: | %RED%O'SUBTYPE'LEFTOF(O) | | %RED%||| | %RED%O'RIGHTOF | %RED%Kind: | %RED%Pure function. | | %RED%| %RED%Prefix: | %RED%Any prefix O that is appropriate a discrete or physical type or subtype, or an alias thereof | | %RED%| %RED%Shorthand for: | %RED%O'SUBTYPE'RIGHTOF(O) | <font color="green">[Edit 5: Edit Note 1 as below]</font><br> NOTE 1 - The relationship between the values of the LEFT, RIGHT, LOW, and HIGH attributes is expressed as follows: | | | <b>Ascending range</b> | <b>Descending range</b> | | %RED%P<del>T</del>%ENDCOLOR%'LEFT | = | %RED%P<del>T</del>%ENDCOLOR%'LOW | %RED%P<del>T</del>%ENDCOLOR%'HIGH | | %RED%P<del>T</del>%ENDCOLOR%'RIGHT | = | %RED%P<del>T</del>%ENDCOLOR%'HIGH | %RED%P<del>T</del>%ENDCOLOR%'LOW | <br> <br> ---++ Comments - Overlaps with section 16.2.3 - Does not cover all of the attributes of 16.2.3 - Does not at all address the key contribution of LCS-2016-072a ( [[http://www.eda-twiki.org/cgi-bin/view.cgi/P1076/TopLCS2016072a][Attributes with Function Knows Vector Size]]) which is to define a mechanism within a subprogram to get at the declared range for the actual that is bound to the formal parameter. - Since this LCS lacks a way for a subprogram to get at the attributes of the actual, it then limits the FunctionsKnowsVectorSize proposal (LCS-2016-072) since it would not allow for a function to determine the bounds of the target if that target happens to be a scalar. - Merging a section that describes attributes of types with something that attempts to describe attributes of objects doesn't add any value over current LRM with LCS-2016-072a but that was NIH I suppose. -- %BUBBLESIG{KevinJennings - 2017-01-04}% @KJ1: No. There is no overlap with 16.2.3. Section 16.2.3 applies to array types and objects of array types. These edits apply to scalar types (or a subset of scalar types) and objects of scalar types (or a subset of scalar types). Hence, while these edits make 16.2.2 and 16.2.3 converge in styles of defining the attributes for types and objects in the same place, they are non-overlapping. @KJ2: These are in LCS-2016-18_alt which I am working on now. %GREEN% [Note: In version 2, these are included here and there is no "_alt" version]%ENDCOLOR% @KJ3.1: This LCS is was developed based on Enumerated Attributes proposal. @KJ3.2 Doing things with attributes in a subprogram (part of 72a) is a separate issue from creating additional attributes. Please separate your LCS 72a into 2 pieces. At this point we have 3 approaches for handling the attributes. @KJ4: Same separate issue identified in @KJ3.2 @KJ5.1: The title of 16.2.2 is: "Predefined attributes of types and objects". Hence objects belong here. In addition, 16.2.3 is array types and objects, and the prefix in the revision of 16.2.2 makes both sections done in exactly the same style. @KJ5.2 NIH never entered my mind. My biggest concern is getting these done correctly in a timely fashion. The attribute descriptions you provided in 72a are currently wrong. -- %BUBBLESIG{JimLewis - 2017-01-04}% Version 3: Removed the parameters from attributes as they don't belong in the short hand. Fixed color of P in P'LEFT, ... -- %BUBBLESIG{JimLewis - 2017-01-05}% %COMMENT%</sticky> </noautolink>
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r11
<
r10
<
r9
<
r8
<
r7
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r11 - 2020-02-17 - 15:34:41 -
JimLewis
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-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback