VHDL Issue Number: 1015 Classification: Examples, Notes, and Appendices Language Version: VHDL-93 Summary: The note illustrating the equivalent sequence of declarations for a constrained array type definition is in error. Related Issues: 0105 Relevant LRM Sections: 3.2.1 Key Words and Phrases: Constrained array types Current Status: Analyzed ----------------------- 1076-1993 Disposition: N/A Disposition Rationale: N/A Superseded By: N/A Date Submitted: 1988/06/04 Author of Submission: Paul Menchini Author's Affiliation: Menchini Consultancy Author's Post Address: 2 Davis Drive, P.O. Box 13036 Research Triangle Park, NC 27709-3036 Author's Phone Number: (919) 990-9506 Author's Fax Number: (919) 990-8561 Author's Net Address: mench@mercury.interpath.net ----------------------- Date Analyzed: 1994/07/25 Author of Analysis: John Willis Revision Number: $Revision: 1.2 $ Date Last Revised: $Date: 1995/05/15 19:09:55 $ Description of Problem ---------------------- (This IR superseded IR 0105.) The note at the end of Section 3.2.1, on Page 3-10, illustrating the sequence of declarations equivalent to the constrained array type declaration shown in the note is incorrect. The relevant LRM text (on the bottom of Page 3-9) reads: "A constrained array definition defines both an array type and a subtype of this type: * The array type is an implicitly declared anonymous type; this type is defined by an (implicit) unconstrained array definition, in which the element subtype indication is that of the constrained array definition, and in which the type mark of each index subtype definition denotes the subtype defined by the corresponding discrete range. * The array subtype is the subtype obtained by imposition of the index constraint on the array type." This text defines two declarations, not the three shown in the note on Page 3-10. Proposed Resolution ------------------- Change the note to read: "The rules concerning constrained type declarations mean that a type declaration with a constrained array declaration such as type T is array (POSITIVE range MIN to MAX) of ELEMENT; is equivalent to the sequence of declarations type array_type is array (POSITIVE range <>) of ELEMENT; subtype T is array_type (MIN to MAX); where array_type is anonymous. Consequently, T is the name of a subtype and all objects declared with this type mark are arrays that have the same index range. VASG-ISAC Analysis & Rationale ------------------------------ The proposed note revision increases the consistency between the precise definition and the example. The change seems to make sense. VASG-ISAC Recommendation for IEEE Std 1076-1993 ----------------------------------------------- None VASG-ISAC Recommendation for Future Revisions --------------------------------------------- As Paul suggests, change the note to read: "The rules concerning constrained type declarations mean that a type declaration with a constrained array declaration such as type T is array (POSITIVE range MIN to MAX) of ELEMENT; is equivalent to the sequence of declarations type array_type is array (POSITIVE range <>) of ELEMENT; subtype T is array_type (MIN to MAX); where array_type is anonymous. Consequently, T is the name of a subtype and all objects declared with this type mark are arrays that have the same index range.