VHDL Issue Number: 0069 Classification: Language Definition Problem Language Version: VHDL-87 Summary: Expression class of predefined attribute reference is unclear. Related Issues: 0096 Relevant LRM Sections: 6.4, 7.4 Key Words and Phrases: Locally Static Expression, Globally Static Expression, Locally Static Primary, Globally Static Primary, Locally Static Subtype, Globally Static Subtype, Predefined Attribute Name, Subtype, Object Current Status: ISAC-Approved 1076-1993 Disposition: Closed (All Issues Completely Addressed) Disposition Rationale: Superseded By: N/A ----------------------- Date Submitted: 1988/02/12 Author of Submission: Doug Dunlop Author's Affiliation: Intermetrics, Inc. Author's Post Address: 4733 Bethesda Avenue, Suite 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: 1989/02/23 Author of Analysis: Paul Menchini (mench@clsi.com) Revision Number: $Revision: 1.9 $ Date Last Revised: $Date: 1995/05/13 19:34:42 $ Description of Problem ---------------------- Items 4 and 5 in the Section 7.4 list of locally static primaries speak of "a predefined attribute of a locally static subtype that is ...." It is unclear whether this refers only to an attribute name whose prefix is a locally static subtype or also to an attribute name whose prefix is an object of a locally static subtype. Certain predefined attributes (such as 'LENGTH for array objects of a locally static subtype) are analysis-time computable. Others (such as 'LAST_EVENT for signal objects of a locally static subtype) are not analysis-time computable. Another potential issue is that when an object is of a locally static subtype. For slices, e.g., this is far from clear, particularly with regard to the direction of the index subtype of the slice. Proposed Resolution ------------------- Items 4 and 5 in the LRM 7.4 list of locally static primaries refer to attribute names whose prefix is a locally static subtype. They do not apply to attribute names whose prefix is an object of a locally static subtype. Similarly, Items 7 and 8 in the section 7.4 list of globally static primaries apply to attribute names whose prefix is a globally static subtype, not to attributes names whose prefix is an object of a globally static subtype. VASG-ISAC Analysis & Rationale ------------------------------ The issue can be concisely stated via an example: subtype S is String (1 to 10); variable V: S; Is the attribute name V'Left a globally static primary? The fundamental issue here is whether an attribute whose prefix is an object (i.e., a signal, a variable, or a constant) is a globally static primary. Or, must the prefix be a subtype? This question arises because of two possible interpretations of the word "of" in items 7 and 8 in the list of globally static primaries on page 7-16. Consider item 5 of paragraph 7 of Section 7.4 (page 7-16): "5. an aggregate of a globally static subtype...." Here, "of" means "Given an aggregate, determine its subtype. If that subtype is a globally static subtype, then the aggregate is said to be of a globally static subtype." Now consider items 4 and 5 of paragraph 3 of Section 7.4 (on page 7-15): "4. a predefined attribute of a locally static subtype.... 5. a predefined attribute of a locally static subtype...." and items 7 and 8 on page 7-16: "7. a predefined attribute of a globally static subtype.... 8. a predefined attribute of a globally static subtype...." The author's issue revolves on the meaning of "of" in these last four contexts. Does it mean "Given an attribute name whose suffix denotes a predefined attribute, determine the meaning of the prefix. If the prefix denotes a object, determine the subtype of the object; if the prefix denotes a type mark, use the subtype denoted by the type mark. If the resulting subtype is a locally or globally static subtype (as appropriate), then the predefined attribute is said to be of a locally or globally static subtype (as appropriate)." (Call this interpretation 1.) Or, does it mean "Given an attribute name whose suffix denotes a predefined attribute, determine the prefix of the attribute name. If the prefix is a type mark, and if the subtype denoted by the type mark is a locally or globally static subtype (as appropriate), then the predefined attribute is said to be of a locally or globally static subtype (as appropriate)." (Call this interpretation 2.) In other words, does "of" in the last four items refer to the subtype of the result of evaluating the attribute name (interpretation 1), or does it refer to the prefix of the attribute name (interpretation 2)? Consider the example opening this analysis. The attribute name "S'Left" is a globally static primary under either interpretation, but the attribute name "V'Left" is globally static only under interpretation 1. It is the concensus of the VASG-ISAC that interpretation 2 of the term "of" for attribute names is what is intended. The authors of the 1076-1987 LRM concur. Thus, in the above example, "S'Left" is a locally (and globally) static primary, while "V'Left" is neither a locally nor a globally static primary. Given this interpretation, one may ask why "V'Left" cannot be a locally or a globally static primary. Given that an Analyzer can determine that "S" is the subtype of "V", why then cannot it perform an analysis on "V'Left" similar to that performed on "S'Left"? It can, but the LRM does not require that it does. Given interpretation 2 above, the LRM is unambiguous and self-consistent. This issue report also mentions in passing that there is a definitional lack with respect to locally static subtypes because the index subtype of a slice is not defined. However, this issue is taken up in Issue Report 0096. VASG-ISAC Recommendation for IEEE Std 1076-1987 ----------------------------------------------- Do not change the language in response to this report. Interpret the word "of" in items 4 and 5 on page 7-15 and items 7 and 8 on page 7-16 according to interpretation 2 developed above. See Issue Report 0096 for the recommendation on index subtypes of slices. VASG-ISAC Recommendation for Future Revisions --------------------------------------------- Clarify the language in items 4 and 5 on page 7-15 and items 7 and 8 on page 7- 16. A suggested change to item 4 on page 7-15 is: "4. an attribute name whose prefix denotes a locally static subtype that is a value and whose suffix denotes a predefined attribute." Furthermore, it may be desirable to expand the definition of locally (and globally) static primaries to include attribute names whose prefix are objects of locally static subtypes. However, this will have to be done carefully (as the author points out), as not all predefined attributes of such objects will have values during analysis or static elaboration. In particular, the predefined attributes of a signal kind (i.e., 'DELAYED, 'STABLE, 'QUIET, and 'TRANSACTION), and certain others (i.e., 'EVENT, 'ACTIVE, 'LAST_EVENT, 'LAST_ACTIVE, and 'LAST_VALUE) are never evaluable during analysis or static elaboration. See Issue Report 0096 for the recommendation on index subtypes of slices.