VHDL Issue Number: 2049 Language_Version: VHDL-2002 Classification: Language Definition Problem Summary: Circular definition of an event on a signal Relevant_LRM_Sections: 12.6.2 Related_Issues: Key_Words_and_Phrases: event, signal update Authors_Name: Peter Ashenden Authors_Phone_Number: +61 8 8339 7532 Authors_Fax_Number: +61 8 8339 2616 Authors_Email_Address: peter@ashenden.com.au Authors_Affiliation: Ashenden Designs Authors_Address1: Authors_Address2: Authors_Address3: Current Status: VASG-Approved Superseded By: ------------------------ Date Submitted: 7 May 2004 Date Analyzed: 2 Feb 2005 Author of Analysis: Ajayharsh Varikat Revision Number: 3 Date Last Revised: 09 May 2005 Description of Problem ---------------------- We appear to have created a circular definition for the term "event". 12.6.2 on page 174 defines an event on S in terms of the expression "S = S'Delayed" being false. 12.6.3 on page 176 defines update of S'Delayed in terms of execution of an equivalent process. 14.1 on page 196 specifies the equivalent process as P: process (S) begin R <= transport S after T; end process ; and specifies that S'Delayed(T) is the same as R for any T. 9.2 on page 135 specifies that a process containing a sensitivity list contains an implicit wait statement of the form wait on sensitivity_list ; where the sensitivity_list in the wait statement is that in the process header. Hence, the above process is equivalent to P: process begin R <= transport S after T; wait on S; end process ; 8.1 on page 117 defines the sensitivity set of a wait statement such as the one above as the set of signal in the sensitivity list, in this case, S. 8.1 on page 117 then specifies that a process suspended by a wait statement can resume as the result of an event occurring on a signal in the sensitivity set of the wait statement. An event is defined .... Proposed Resolution ------------------- I'd suggest avoiding this circular definition by revising the definition of event as follows: Updating a signal of type T is said to change the current value of the signal if and only if application of the predefined "=" operator on type T to the newly updated value of the variable containing the current value of the signal and the previous value of that variable evaluates to False. VASG-ISAC Analysis & Rationale ------------------------------ In VHDL-2002, an event on a signal S is defined in terms of the attribute S'delayed. However, as pointed out in the description section, the meaning of the 'delayed attribute itself is indirectly dependent on the definition of an event, resulting in a circular dependency between these definitions. Prior to VHDL-2002, an event was defined in the following terms: If updating a signal causes the current value of that signal to change, then an event is said to have occurred on the signal. The problem with this definition was that the LRM did not clearly specify whether the term "change" referred to the representation of a signal's value or the actual value itself. In most floating point implementations, the representation of +0.0 and -0.0 are different, though the two are considered equal. The earlier definition of an event was incomplete for a real signal that went from -0.0 to +0.0. While resolving the circular definition in VHDL-2002, we need to ensure that the ambiguity in the earlier definition is also addressed. VASG-ISAC Recommendation for IEEE Std 1076-2002 ----------------------------------------------- Interpret the LRM as if the Recommendation for Future Revisions were in effect. VASG-ISAC Recommendation for Future Revisions --------------------------------------------- Change the definition of an event to the following: If updating a signal causes the current value of that signal to change, then an event is said to have occurred on the signal. The current value of a signal of type T is said to change if and only if application of the predefined "=" operator for type T to the current value of the signal and the value of the signal prior to the update evaluates to false.