VHDL Issue Number: 0248 Classification: Language Definition Problem; Modeling Problems Language Version: VHDL-87 Summary: 'last_value for composite has non intuitive behavior, Related Issues: 0039 Relevant LRM Sections: 14.1 Key Words and Phrases: predefined attributes, signal, last_value, composite Current Status: Submitted 1076-1993 Disposition: Closed (All Issues Completely Addressed) Disposition Rationale: The definition of S'LAST_VALUE was changed for VHDL-93. Superseded By: N/A ----------------------- Date Submitted: 1991/12/11 Author of Submission: Oz Levia Author's Affiliation: Viewlogic Systems, Inc. Author's Post Address: 293 Boston Post Rd. W. Marlboro, MA 01752-4615 Author's Phone Number: (508) 480-0881 Author's Fax Number: Author's Net Address: oclive@viewlogic.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 ---------------------- The predefined signal's attribute, 'last_value, when applied to composite signals can return a value which the signal never had. Additionally the result may depend on the level in which the composite is resolved. Consider: .. signal s : bit_vector(1 to 3); -- initial value is ('0','0','0') -- which is also the value of 'last_value .. s <= "101"; -- value changes to ('1','0','1') -- events occur on: s(1) and s(3). -- as a result 'last_value is modified -- only for two bits. -- 'last_value is: ('0','0','0'), now .. s <= "001" -- value changes to ('0','0','1') but -- since an event occur only on s(1) -- 'last_value is: ('1','0','0'). This -- is a value s never had! It is not clear from LRM 14.1 if the level at which a signal is resolved has any affect on 'last_value. Another interesting observation is that if 'last_value was a signal attribute then: s'delayed(t)'last_value /= s'last_value'delayed(t) in many cases. Proposed Resolution ------------------- The LRM is clear. No clarification is needed for the description of 'last_event (assuming IR39's recomendation is adopted). The author is not sure what should be the functionality of 'last_event. The ISAC should consider the intuitive behavior vs the current behavior. If the intuitive behavior is desired then LRM 14.1 (addition which was made for IR 39 on 'last_value) should change to read: For a scalar AND COMPOSITE signal s, S'LAST_VALUE = S'DELAYED(T) where T = S'LAST_EVENT. VASG-ISAC Analysis & Rationale ------------------------------ TBD VASG-ISAC Recommendation for IEEE Std 1076-1987 ----------------------------------------------- TBD VASG-ISAC Recommendation for Future Revisions --------------------------------------------- TBD