-------------BEGINNING OF IR---------------- VHDL Issue Number: 2098 Language_Version VHDL-2002 Classification Language Modeling Enhancement or Deficiency Summary Ambiguity in definition of T'VAL for Physical types Relevant_LRM_Sections 14.1 Predefined attributes 3.1.3 Physical types Related_Issues Key_Words_and_Phrases Authors_Name Manadher Kharroubi Authors_Phone_Number 650 584 4677 Authors_Fax_Number 650 584 5620 Authors_Email_Address manadher@synopsys.com Authors_Affiliation Authors_Address1 700 East Midlefield Road Authors_Address2 Mountain View CA, 94043 Authors_Address3 Current Status: VASG-Approved Superseded By: ------------------------ Date Submitted: 13 June 2006 Date Analyzed: 28 August 2006 Author of Analysis: Peter Ashenden Revision Number: 4 Date Last Revised: 23 May 2007 Description of Problem ---------------------- <<"The" value whose position number is the universal_integer value corresponding to X.>> Above is the LRM definition of the result of T'VAL(X). In the case the Type T is a physical type with real abstract_value's more than one physical literal will have the same position. the word "The" in the beginning of the definition doesn't have any sense. In that case, theoretically there's an infinity of literals between T'VAL(X) and T'VAL(X+1)that have the same position X. Proposed Resolution ------------------- 1- Extend the accepted parameter type to "real" and change the definition of the position in 3.1.3 to give also "real" positions. OR 2- State clearly in the definition of T'VAL(X) that the result is the only physical literal "V" that satisfies T'VAL(T'POS(V)): V and T'POS(V)=X. VASG-ISAC Analysis & Rationale ------------------------------ The definition of the 'VAL attribute, is as the submitter quotes. The attribute is a function whose parameter X is any integer type. The submitter questions the definition of 'VAL for physical types in which real (non-integral) abstract values occur. In 3.1.3, a physical type is defined to contain values that are integral multiples of the primary unit of measurement for the type. Secondary units must be defined to be integral multiples of the primary unit of the type. This is reinforces by the specific rule" "The abstract literal portion (if present) of a physical literal appearing in a secondary unit declaration must be an integer literal." 3.1.3 also defines the position number for each value of a physical type: "The position number of the value corresponding to a unit name is the number of primary units represented by that unit name." Since unit names must be an integral multiple of primary units, the position number of each unit name must be an integer. "The position number of the value corresponding to a physical literal with an abstract literal part is the largest integer that is not greater than the product of the value of the abstract literal and the position number of the accompanying unit name." This specifically states that the position number of a physical literal with an abstract literal part (whether that abstract literal be integral or not) is an integer. So, while a physical literal can be written with an abstract literal that is non-integral, the position number of that physical literal is integral, and is the floor of the product of the value of the abstract literal and the position number of the unit. Since we can place the integers in the range of the physical type definition in one-to-one correspondence with values of the physical type, there is a unique value of the type for any integer in that range. That is the value returned by the 'VAL attribute applied to such an integer value in the range. VASG-ISAC Recommendation for IEEE Std 1076-2002 ----------------------------------------------- No change is required. VASG-ISAC Recommendation for Future Revisions --------------------------------------------- No change is required. -------------END OF IR----------------