VHDL Issue Number: 2002 Language_Version: VHDL-93 Classification: Language Modeling Enhancement or Deficiency Summary: Resize(R.2) function in numeric_std.vhd does improper array length check Relevant_LRM_Sections: Related_Issues: Key_Words_and_Phrases: Authors_Name: Chuck Wilde Authors_Phone_Number: 630 979-1773 Authors_Fax_Number: 630 979-1389 Authors_Email_Address: cjwilde@lucent.com Authors_Affiliation: Lucent Technologies Authors_Address1: 1200 E. Warrenville Road Authors_Address2: Room 1G-221 Authors_Address3: Naperville, IL 60566 Current Status: VASG-Approved Superseded By: ------------------------ Date Submitted: 4 April 2000 Date Analyzed: 28-Oct-04 Author of Analysis: Peter Ashenden Revision Number: 3 Date Last Revised: 09 May 2005 Description of Problem ---------------------- If Resize(ARG: UNSIGNED, NEW_SIZE: NATURAL) is called with Length(Unsigned) = NEW_SIZE, the else statement(line 3192) will try to evaluate RESULT(X downto X+1). This caused a fatal error in the RTLcompile tool from IKOS. Proposed Resolution ------------------- Proposed_Resolution: Change the if statement in line 3190 to use "<=" instead of "<", so it reads if (RESULT'LENGTH <= ARG'LENGTH) then VASG-ISAC Analysis & Rationale ------------------------------ The code is correct. The assignment statement referred to, in the circumstances described, assigns to a null slice of an array. The tool referred to by the submitter would appear to have a defect. While the change proposed by the submitter may avoid the tool defect, it is not required for correctness of the standard. VASG-ISAC Recommendation for IEEE Std 1076-1993 ----------------------------------------------- No change for 1076 or 1076.3. VASG-ISAC Recommendation for Future Revisions --------------------------------------------- The packages currently in 1076.3 are being incorporated into the next revision of 1076 and extended in that context. No change to the described aspects of the code are required. -------------END OF IR----------------