VHDL Issue Number: 0064 Classification: Language Definition Problem Language Version: VHDL-87 Summary: Visibility to the right of the "'" in an attribute name is unclear. Related Issues: None. Relevant LRM Sections: 5.1, 10.3, 14.1 Key Words and Phrases: Attribute name, visibility Current Status: ISAC-Approved 1076-1993 Disposition: Closed (All Issues Completely Addressed) Disposition Rationale: Sections 5.1 and 10.3 were updated. Superseded By: N/A ----------------------- Date Submitted: 1989/02/10 Author of Submission: Doug Dunlop Author's Affiliation: Intermetrics, Inc. Author's Post Address: 4733 Bethesda Ave #415 Bethesda, MD 20814 Author's Phone Number: (301) 657-3775 Author's Fax Number: Author's Net Address: dunlop@inmet.inmet.com ----------------------- Date Analyzed: 1990/11/16 Author of Analysis: Paul Menchini (mench@clsi.com) Revision Number: $Revision: 1.9 $ Date Last Revised: $Date: 1995/08/03 16:26:32 $ Description of Problem ---------------------- If X is the name of a pre-defined attribute and an entity E has a user-defined attribute named X, the VHDL LRM does not say what the attribute name E'X means since both the pre-defined attributes and the user-defined attributes are visible by selection following the "'" in an attribute name (LRM Section 10.3). Proposed Resolution ------------------- As in VHDL 7.2, we assume that the pre-defined attribute has priority and hides user-defined attributes with the same name. VASG-ISAC Analysis & Rationale ------------------------------ The LRM already prohibits a user-defined attribute from being associated with an entity having a predefined attribute of the same name. Sentence 2 of paragraph 7 of Section 5.1 states: ... it is an error if two different attributes with the same simple name are both associated with a given entity. Here "attribute" refers to both user-defined and predefined attributes. Therefore it is illegal to associate a user-defined attribute with an entity having a predefined attribute whose simple name is the same as that of the user-defined attribute. During our discussions a collateral issue surfaced: Where (if anywhere) are the predefined attributes declared? This issue is of importance when considering the direct visibility of the predefined attributes. Upon reflection, the ISAC decided that the predefined attributes needn't be declared anywhere and needn't be directly visible anywhere. The only time that an attribute name needs to be directly visible is in an attribute specification. Since it was decided that an attribute specification should never refer to a predefined attribute, the visibility of the predefined attributes is not an issue. (It is never necessary, indeed it is illegal, to explicitly associate a predefined attribute with an entity already having that predefined attribute. Moreover, no other entities may be associated with a given predefined attribute, as attribute specifications can only associate a constant value with an entity and the predefined attributes are not costants.) Finally, making the predefined attributes directly visible seems to cause nothing but problems. For example, consider the predefined attribute 'left and the enumeration literal Std.TextIO.Left. If the predefined attribute were directly visible (say by including it as part of package Std.Standard), then the use clause "use Std.TextIO.all;" has the effect of making neither "left" directly visible. Note that attribute names make the attribute visible by selection, so that the direct visiblity of the predefined attributes is not an issue for attribute names either. VASG-ISAC Recommendation for IEEE Std 1076-1987 ----------------------------------------------- No change to the interpretation of 1076-1987 is required by this issue. VASG-ISAC Recommendation for Future Revisions --------------------------------------------- Language to "lock in" these interpretations should be added to Sections 5.1, 10.3, and perhaps 14.1. In particular, the interaction between the predefined and user-defined attributes should be documented. Moreover, the lack of direct visibility of the predefined attribute names also needs to be documented.