RE: What does 'last_event really return?

From: Muranyi, Arpad <arpad.muranyi_at_.....>
Date: Wed Feb 15 2006 - 12:06:38 PST
Ernst,

Thank you very much for the clarification,
this explains it very well!  So a tool
claiming to be "VHDL-AMS" should support
the syntax without the explicit conversion,
correct?

This brings up another question about Peter
Ashenden's book.  The tables on p. 144 and
p. 674 indicate that the return type of
S'last_event is time.  Considering that the
title of the book is "The System Designer's
Guide to VHDL-AMS" (and not VHDL), is this
a typo in the book?

Thanks,

Arpad
=========================================== 

-----Original Message-----
From: Ernst Christen [mailto:Ernst.Christen@synopsys.COM] 
Sent: Wednesday, February 15, 2006 11:50 AM
To: Muranyi, Arpad; vhdl-ams@eda.org
Subject: Re: What does 'last_event really return?

Hi Arpad,

I believe the answer to your question is related to the VHDL language version supported by 
your tool. 

The VHDL language, defined by IEEE Std. 1076, defines S'LAST_EVENT to be a function whose 
result type is the predefined type TIME. All tools compliant with any version of VHDL will 
support this function. 

VHDL-AMS, defined by IEEE Std. 1076.1, is an extension of VHDL and as such supports 
everything defined in VHDL (currently the 1993 version). VHDL-AMS defines another function 
S'LAST_EVENT whose result type is the predefined type REAL. All tools supporting VHDL-AMS 
will support this function, but tools supporting the base language will not.

In the case of VHDL-AMS, the two overloaded functions are disambiguated based on their 
signature, which for the S'LAST_EVENT function in essence means its result type. In your 
example, you are looking for a function whose return type is REAL. This function is only 
available in tools compliant with VHDL-AMS. Your second attempt, based on TIME'Pos, will 
always force the version of S'LAST_EVENT returning TIME to be called, so it is expected to 
work in all tools.
Received on Wed Feb 15 12:07:05 2006

This archive was generated by hypermail 2.1.8 : Wed Feb 15 2006 - 12:07:52 PST