TWiki
>
P1076/Ballots Web
>
Vhdl2019CollectedRequirements
>
NoOverridingPredefinedAttributes
(revision 1) (raw view)
Edit
Attach
---+ User-Defined Attributes May Not Redefine Predefined Attributes %TOC% ---++ Proposal Details * Who Updates: Main.CliffordWalinsky * Date Proposed:2013-12-9 * Date Last Updated:2013-12-9 * Bugzilla Reference: 259 ---+++ Current Situation In section 7.2 "Attribute specification", the statement is made that "An attribute specification associates a user-defined attribute with one or more named entities and defines the value of that attribute for those entities." From this statement, we can infer that attribute specifications cannot be provided for predefined attributes. The possibility for redefining a predefined attribute also seems to be precluded by the following statement: "Similarly, it is an error if two different attributes with the same simple name (whether predefined or user-defined) are both associated with a given named entity." Nonetheless, section 6.7 "Attribute declarations" never explicitly prevents a user-defined attribute from possessing the same name as a predefined attribute. If a user-defined attribute were to have the same name as a predefined attribute, the requirement of section 7.2 would prevent creation of attribute specifications associated with the same entity classes as the predefined attribute. The utility of being able to define attributes to have the same names as predefined attributes is severely limited. -- Main.ErnstChristen - 2015-01-27 - 1076.1 defines an exception: S'LAST_EVENT has 2 definitions that are disambiguated by the VHDL overloading rules. ---+++ Requirement Since it is only legal to provide an attribute specifications for a user-defined attribute that has the same name as a predefined attribute when the associated attribute entities differ, according to the requirement of section 7.2, and since this requirement greatly reduces the utility of redefining predefined attributes, we suggest adding the following requirement to section 6.7 (third paragraph): "The designator of an attribute shall not have the same simple name as any predefined attribute." ---+++ Implementation details Compilers will make it an error to attempt to define an attribute with the same name as a predefined attribute. ---+++ Code Examples The following example will no longer be accepted without error: <verbatim>port( p : bit_vector(9 downto 0) ); attribute high : integer; attribute high of p : signal is 5;</verbatim> Currently, the Mentor Graphics compiler accepts these declarations, but produces a warning. This requirement would change the warning to an error at the point of the attribute declaration. ---++ Use Cases ---++ Arguments FOR Accepting this proposal would prevent user-defined attributes from re-defining the predeclared attributes. Use of a predefined attribute would have the same meaning across all designs. ---++ Arguments AGAINST Predefined attributes are not fully described when associated with non-standard entity classes. For example, it's currently possible to create a user definition for 'high of a subprogram. This proposal would render existing designs non-compliant with the standard; hence, existing designs will not compile if they declare attributes identical to predefined attributes. -- Main.ErnstChristen - 2015-01-27 - The restrictions described under Current Situation are a consequence of the VHDL overloading rules. I believe that no artificial constraints should be imposed by the language definition, so I see this proposal to be an issue for coding guidelines, not for the language. ---++ General Comments ---++ Supporters _Add your signature here to indicate your support for the proposal_ * Main.CliffordWalinsky - 2013-12-09
Edit
|
Attach
|
P
rint version
|
H
istory
:
r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r1 - 2020-02-17 - 15:34:57 -
TWikiGuest
P1076/Ballots
Log In
or
Register
P1076/Ballots 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