VHDL Issue Number: 2010 Language_Version: VHDL-2002 Classification: LRM Terminology, Grammar and Typographical Errors Summary: The description of type/subtype relationship could be better Relevant_LRM_Sections: Chapter 3 of 1076-1993, sections 3.1, 3.2, and 3.3 Related_Issues: Key_Words_and_Phrases: types subtypes Authors_Name: Dale Martin Authors_Phone_Number: (513) 771-3751 Authors_Fax_Number: (513) 563-4693 Authors_Email_Address: dmartin@clifton-labs.com Authors_Affiliation: Clifton Labs, Inc. Authors_Address1: 10265 Spartan Dr, Suite N Authors_Address2: Cincinnati, OH 45215 Authors_Address3: Current Status: VASG-Approved Superseded By: ------------------------ Date Submitted: 7 December 2000 Date Analyzed: 29-Oct-04 Author of Analysis: Peter Ashenden Revision Number: 2 Date Last Revised: 05 May 2005 Description of Problem ---------------------- In 3.1.1, the first sentence is "An enumeration type definition defines an enumeration type." It says nothing about a subtype being defined as well. Conversely, lines 119 and 157, pg 36 and pg 37, respectively, say for physical and integer types that a type and a subtype are created. For unconstrained array types, there is a similar lack of explicitness about the subtype creation. Proposed Resolution ------------------- Peter Ashenden made this comment about it: The same issue arose in the definition of Ada. They solved it by saying explicitly that a type definition defines an anonymous base type and a *first subtype* of the base type. Thus base types never have an explicit name in Ada, only subtypes do. Thus, the Ada standard always talks about subtype names, and where it's important, qualifies the discussion by referring to a first subtype name. VASG-ISAC Analysis & Rationale ------------------------------ An enumeration type explicitly defines the set of values for the type. An implementation must be able to represent all values of the type. Compare this with an integer, physical and floating point type, for which an implementation may choose a range for representation, provided it includes the range specified in the type definition. This is reflected in the language by having an integer, physical or floating point type definition define an anonymous type whose range is implementation defined, and a named subtype constrained by the range in the type definition. Clause 3, page 33, states: A type is a subtype of itself; such a subtype is said to be unconstrained (it corresponds to a condition that imposes no restriction). Thus, for an enumeration type definition, the defined enumeration type also serves as a subtype. No distinction need be made between the type as a type and the type as a subtype. In relation to unconstrained array types, 3.2.1, page 41, states: An unconstrained array definition defines an array type and a name denoting that type. Thus, for an unconstrained array type definition, the defined array type also serves as a subtype. While it might be possible to review and redefine the specification of types and subtypes using the notion of first subtypes from Ada, to do so would be a major undertaking. It would subsequently entail verification by tool implementers that their tools conform to the revised rules. The benefit of such an exercise would be small for the LRM maintainers and tool implementers, and negligible for users. Thus, it is not warranted. VASG-ISAC Recommendation for IEEE Std 1076-2002 ----------------------------------------------- No change. VASG-ISAC Recommendation for Future Revisions --------------------------------------------- No change. -------------END OF IR----------------