VHDL Issue Number: 0188 Classification: Language Definition Problem Language Version: VHDL-87 Summary: VPI Issue 12 -- Range direction in qual. exps. Related Issues: TBD Relevant LRM Sections: TBD Key Words and Phrases: TBD Current Status: Superseded 1076-1993 Disposition: Superseded (ISAC Issues Outstanding) Disposition Rationale: none. Superseded By: 0050 (Previously) ----------------------- Date Submitted: 1991/03/15 Author of Submission: J. R. Armstrong Author's Affiliation: Virginia Polytechnic Institute and State University Author's Post Address: Bradley Department of Electrical Engineering Virginia Polytechnic Institute and State University Blacksburg, VA 24061 Author's Phone Number: (703) 231-4723 Author's Fax Number: Author's Net Address: JRA@VTVM1.CC.VT.EDU ----------------------- Date Analyzed: 1992/01/02 Author of Analysis: Alex Zamfirescu Revision Number: $Revision: 1.9 $ Date Last Revised: $Date: 1995/05/13 21:53:48 $ Description of Problem ---------------------- Can a range within a qualified expression be spec- ified as an ascending range when it was declared as a de- scending range? Test File: ch07/s03/s2/s2/04020101.vhd --##73224211245FF************************************************************* -- --+ File: [SUITE.CH07.S03.S2.S2]04020101.VHD -- --+ Copyright: (c) 1986 by Intermetrics Inc. All rights reserved -- --+ LRM_Version: IEEE Std. 1076-1987 -- --+ Subsets: None -- --+ Description: -- --+ Test_point - (070322_040201) "For an array aggregate that does not -- have an others choice, if the aggregate appears -- in one of the contexts described in the test points -- 070322_030201 through 070322_031001, the direction of -- the index subtype of the aggregate is that of the -- corresponding constrained array subtype." -- -- --+ Test_objective (1) - Test that the direction of the index subtype of the -- aggregate array is the same as the direction of the index -- subtype of the base type of the array. -- --+ References: None -- --+ Instructions: None -- --+ Keywords: Array aggregate, index subtype -- --+ Test_Results: Expect_Success. Output_Checked. -- --+ Test_Type: Locally Static Semantic -- --+ History: Created MM/MCC 7-13-89 -- Modified CHC/VT 8-29-89 -- Corrected KSC/VT 12-22-89 -- Modified CHC/VT 5-4-90 -- --+ Comments: Original file name: E-07-2-2-2211A.VHD -- Updated package declaration Sun Oct 2 14:55:11 1988 -- (David)Franke@mcc.com -- Updated to 1076-1987 VHDL, checked w/Recognizer. -- (Steve)Grout@mcc.com 20jun88 -- -- Zycad claimed that this should be an expect failure test -- because of the direction of the range of CA_DOWN in -- the return statement. -- This will be sent to VASG for clarification. --**************************************************************************** package P1 is type UNCONSTRAINED_ARRAY is array ( integer range <> ) of character; subtype CA_UP is UNCONSTRAINED_ARRAY ( 1 to 10 ); subtype CA_DOWN is UNCONSTRAINED_ARRAY (10 downto 1); function F_bad (C : CA_UP) return CA_UP; end P1; package body P1 is function F_bad (C : CA_UP) return CA_UP is begin return CA_DOWN'((1 to 10 => 'B')); -- No_failure_here end F_bad; end P1; use work.P1.all; entity E is end E; Proposed Resolution ------------------- The direction of a discrete range is used in an aggregate just to express a correct discrete range, and it has no other significance. VASG-ISAC Analysis & Rationale ------------------------------ VASG-ISAC Recommendation for IEEE Std 1076-1987 for the ISAC-Approved VHDL Issue Number 0050 solves the problem raised by this IR. The intent of the language is to allow any direction of a discrete range that appears in an aggregate. The direction of a discrete range is used in an aggregate just to express a correct discrete range, and it has no other significance. Test is correct VHDL code, excepting the subtype of the return value in function F_bad that has to be CA_UP. VASG-ISAC Recommendation for IEEE Std 1076-1987 ----------------------------------------------- Refer to IR-0050. The present IR is now superseded by IR-0050. VASG-ISAC Recommendation for Future Revisions --------------------------------------------- See issue Report 0050.