VHDL Issue Number: 2043 Language_Version: VHDL-2002 Classification: Language Definition Problem Summary: numeric VALUE attribute parameter can't have sign Relevant_LRM_Sections: 14.1 Predefined attributes, 13.4 Abstract literals Related_Issues: Key_Words_and_Phrases: predefined attribute, value, abstract literal Authors_Name: James Unterburger Authors_Phone_Number: 503.685.0860 Authors_Fax_Number: 503.685.0921 Authors_Email_Address: jamesu@model.com Authors_Affiliation: Model Technology Authors_Address1: 8005 SW Boeckman Road Authors_Address2: Wilsonville, OR 97070 Authors_Address3: Current Status: Analyzed Superseded By: ------------------------ Date Submitted: 15 October 2004 Date Analyzed: 5 May 2005 Author of Analysis: Deepak Pant Revision Number: 1 Date Last Revised: 15 October 2004 Description of Problem ---------------------- The Result description of predefined attribute T'VALUE(X) states that the parameter X be the string representation of a value of type T as defined in Clause 13. A value of a numeric type, when it contains an abstract literal (as it must for integer and floating point types and optionally for physical types), must use the syntax given in "13.4 Abstract literals", which does not allow a sign "+" or "-" to be part of the literal. This makes it impossible easily to represent negative numeric values: INTEGER'VALUE("-123") is illegal. Proposed Resolution ------------------- Allow an optional sign in the abstract literal portion of the string representation of a value of a numeric type. This was stipulated thus in "14.3 Package TEXTIO" for the string representation of INTEGER and REAL values. VASG-ISAC Analysis & Rationale ------------------------------ This is a valid request. The definition of T'Value needs to be updated on the lines of section 14.3. VASG-ISAC Recommendation for IEEE Std 1076-2002 ----------------------------------------------- None. VASG-ISAC Recommendation for Future Revisions --------------------------------------------- The wording for the definition of T'Value as defined in section 14.1 should be modified from "If T is a numeric type or subtype, the parameter may be expressed either as a decimal literal or as a based literal." to "If T is a numeric type or subtype, the parameter may be expressed either as decimal literal or a based literal, with the addition of an optional leading sign. No spaces can occur between the sign and the remainder of the value." -------------END OF IR----------------