VHDL Issue Number: 1060 Classification: Language Definition Problem Language Version: VHDL-93 Summary: A'LEFT's result type is anomalously described. Related Issues: 0203 Relevant LRM Sections: 14.1 Key Words and Phrases: 'LEFT, predefined attributes Current Status: Analyzed ----------------------- Date Submitted: 1991/03/16 Author of Submission: Paul Menchini Author's Affiliation: CAD Language Systems, Inc. Author's Post Address: P.O. Box 13036 Research Triangle Park, NC 27709-3036 Author's Phone Number: (919) 361-1913 Author's Fax Number: Author's Net Address: mench@clsi.com ----------------------- Date Analyzed: 1995/06/14 Author of Analysis: Charles Swart (cswart@analogy.com) Revision Number: $Revision: 1.5 $ Date Last Revised: $Date: 1995/06/14 23:30:53 $ Description of Problem ---------------------- The result type for A'LEFT is described (on page 14-3) as: Type of the left bound of the Nth index range of A. The result types for A'RIGHT, A'HIGH, A'LOW, A'RANGE, and A'REVERSE RANGE are described as: Type of the Nth index range of A. This statement should also describe the result type for A'LEFT. Proposed Resolution ------------------- Change the description of the result type for A'LEFT to: Type of the Nth index range of A. VASG-ISAC Analysis & Rationale ------------------------------ The submitter is correct in that the result type for all four cases should be treated the same. This IR has uncovered a slightly deeper problem. The type of a range is not defined in the LRM, yet it is referred to in several places: Section 8.9 Loop statement "The loop parameter is an object whose type is the base type of the discrete range." Section 9.7 Generate statements "The generate parameter is a constant object whose type is the base type of the discrete range of the generate parameter specification." Section 12.4.2 Generate statements "The type of this declaration is determined by the base type of the discrete range of the generate parameter." Section 14.1 as mentioned above. This problem appears to be a carryover from Ada. The Ada 95 Reference Manual has been updated to include both the type of a range and the type of a discrete range. The Ada wording is essentially applicable to VHDL. VASG-ISAC Recommendation for IEEE Std 1076-1993 ----------------------------------------------- The type of a range should be interpreted as defined below. VASG-ISAC Recommendation for Future Revisions --------------------------------------------- Change Chapter 14.1 as suggested by the author. Formally define the concept of the type of a range similar to the following: Section 3.1 Scalar types. Change the sentence reading: "A range specifies a subset of values of a scalar type." to read: "A range specifies a subset of values of a scalar type (the "type of the range")." Section 3.2.1.1 Index constraints and discrete ranges. Add a paragraph immediately following the first paragraph which reads: "The type of a discrete_range is the type of the subtype defined by the subtype_indication, or the type of the range."