VHDL Issue Number: 0094 Classification: Language Definition Problem Language Version: VHDL-87 Summary: Definitions of locally and globally static subtype not applicable to records, etc. Related Issues: 0022, 0078 Relevant LRM Sections: 7.4 Key Words and Phrases: Subtypes, Select Names, Locally Static Expressions, Globally Static Expressions Current Status: VASG-Approved 1076-1993 Disposition: Closed (All Issues Completely Addressed) Disposition Rationale: LRM was updated. Superseded By: N/A ----------------------- Date Submitted: 1988/02/19 Author of Submission: Doug Dunlop Author's Affiliation: Intermetrics, Inc. Author's Post Address: 4733 Bethesda Avenue Bethesda, MD 20814 Author's Phone Number: (301) 357-3775 Author's Fax Number: Author's Net Address: dunlop@inmet.inmet.com ----------------------- Date Analyzed: 1989/10/23 Author of Analysis: Paul Menchini (mench@clsi.com) Revision Number: $Revision: 1.9 $ Date Last Revised: $Date: 1995/08/03 18:16:40 $ Description of Problem ---------------------- The LRM states that a globally static subtype is either a scalar subtype or an array subtype [that meets certain constraints--PM]. Similarly, a locally static subtype is either a scalar subtype or an array subtype [again, that meets certain constraints--PM]. This means that a record type can never be a globally or a locally static subtype. This in turn disallows certain expressions of a record type from being globally or locally static expressions. This is overly restrictive since it means, for example, that a record aggregate can never be a globally static expression. It seems apparent this is not what was intended by the language designers. Proposed Resolution ------------------- Allow all record types to be locally static (and, by extension, globally static). Adopt this same extension to access types and file types. This change is embodied in the Intermetrics Analyzer. VASG-ISAC Analysis & Rationale ------------------------------ It is necessary to consider three VASG goals when examining this issue. First, the internal consistency of VHDL must be assured. Secondly, it is desirable to change the language as little as is possible. When this issue is measured against these criteria, no further analysis seems required. The definition of static subtypes is self-consistent: record, access and file subtypes are never static. This is perfectly clear from reading Section 7.4. Since the language is self-consistent in this area, no change is indicated. However appealing this argument is, it neglects the third relevant criterion imposed on VHDL by the VASG, that of usefulness of the language. This is, in fact, the very criterion which motivated the formation of the VASG. Record types are not nearly as useful as they could be if constants of a record type are not static. (One of the most-often identified problems with version 7.2 was that aggregates were not static expressions; consequently, constants of a composite type were never static. While this particular problem has been addressed in 1076-1987, the overall issue is still not addressed for record types. It appears that record types were not addressed only because of an oversight.) The situation is not as critical for access and file types; nevertheless, for completeness, these types should also be considered. While the usefulness criterion is in conflict with the desire for minimal change, it is the opinion of the ISAC that a modification to the language is indicated in this case. VASG-ISAC Recommendation for IEEE Std 1076-1987 ----------------------------------------------- Adopt the recommendation. Specifically, the LRM should be interpreted as follows: 1. Change the sentence in Section 7.4 currently reading: "A locally static subtype is either a locally static scalar subtype or a locally static array subtype." to: "A locally static subtype is either a locally static scalar subtype, a locally static array subtype, a locally static record subtype, a locally static access subtype, or a locally static file subtype." 2. Following the sentence in Section 7.4: "A locally static array subtype is a constrained array subtype formed by imposing on an unconstrained array type a locally static index constraint." add: "A locally static record subtype is a subtype denoting a record type. A locally static access subtype is a subtype denoting an access type. A locally static file subtype is a subtype denoting a file type." 3. Changes to the paragraphs on globally static subtypes in Section 7.4 similar to changes 1 and 2 for locally static subtypes are also needed. VASG-ISAC Recommendation for Future Revisions --------------------------------------------- Incorporate the above language in the LRM. Also consider, in light of Issue Report 0078, whether or not the constituent subtypes of arrays (element and index subtypes), records (element subtypes), access subtypes (designated (sub)type) and files (element? subtype) should influence the "staticness" of the overall subtype.