VHDL Issue Number: 0172 Classification: Language Definition Problem Language Version: VHDL-87 Summary: Rules for non-local access to signals and variables in functions are too restrictive. Related Issues: None. Relevant LRM Sections: 2.2 Key Words and Phrases: Non-local signal and variable access within functions, nested procedures, pure functions, side effects Current Status: Submitted 1076-1993 Disposition: Superseded (ISAC Issues Outstanding) Disposition Rationale: N/A Superseded By: 1035 ----------------------- Date Submitted: 1991/03/15 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: TBD Author of Analysis: TBD Revision Number: $Revision: 1.10 $ Date Last Revised: $Date: 1995/05/13 21:53:48 $ Description of Problem ---------------------- Consider the following VHDL fragment: procedure P1 (...) is variable V: ...; procedure P2 (...) is begin -- manipulates V end P2; begin P2 (...); end P1; function F (...) return ... is begin P1 (...); return ...; end F; : : ... F(...).. This fragment is illegal because of the restrictions of paragraph 7 of Section 2.2 (the one on page 2-5 that starts with "If a function subprogram is a parent...."). However, this fragment meets the spirit and the intent of the restriction, in that neither the function, nor any subprogram invoked by the funcition, refers to a signal or variable whose lifetime is not a subset of the function invocation's lifetime. Therefore, the function call is still "pure." Proposed Resolution ------------------- Relax the restrictions of paragraph 7 of Section 2.2 to allow the above fragment while still preserving the purity of functions. VASG-ISAC Analysis & Rationale ------------------------------ TBD VASG-ISAC Recommendation for IEEE Std 1076-1987 ----------------------------------------------- TBD VASG-ISAC Recommendation for Future Revisions --------------------------------------------- TBD