VHDL Issue Number: 2032 Language_Version: VHDL-2002 Classification: Language Definition Problem Summary: Function "now" is not pure Relevant_LRM_Sections: 7.4.2 Globally static primaries 14.2 Package STANDARD Related_Issues: Key_Words_and_Phrases: Authors_Name: Chuck Swart Authors_Phone_Number: 503.685.0846 Authors_Fax_Number: 503.685.0921 Authors_Email_Address: cswart@model.com Authors_Affiliation: Model Technology Authors_Address1: 8005 SW Boeckman Road Authors_Address2: Wilsonville, OR 97070 Authors_Address3: Current Status: Submitted Superseded By: ------------------------ Date Submitted: 25 November 103 Date Analyzed: Author of Analysis: Revision Number: $Revision$ Date Last Revised: $Date$ Description of Problem ---------------------- Declaring NOW to be pure is a technical mistake. 1. According to the rules for globally static expressions, expressions involving NOW can be globally static since "An expression is said to be globally static if and only if every operator in the expression denotes a pure function and every primary in the expression is a globally static primary...and is one of the following: i) A function call whose function name denotes a pure function and whose actual parameters are each globally static expressions" Obviously,expressions involving now can compute different values at different simulation times. So claiming that NOW is pure breaks the notion of staticness. 2. Some optimizations can be performed as early as analysis time if functions are known to be pure. If NOW is considered pure, these optimizations become much more difficult, since they can only be done with knowledge of the bodies of all functions to insure that no calls to NOW occur, either directly or indirectly. 3. Historically, the declaration of NOW to be pure caused problems for VITAL. However, VITAL 2000 has correctly resolved these issues, and, in fact, their glitch handling depends on NOW being impure (their code takes different actions for time 0 than for positive time values). Proposed Resolution ------------------- Declare NOW to be impure, as it was in VHDL-93 VASG-ISAC Analysis & Rationale ------------------------------ TBD VASG-ISAC Recommendation for IEEE Std 1076-1993 ----------------------------------------------- TBD VASG-ISAC Recommendation for Future Revisions --------------------------------------------- TBD -------------END OF IR----------------