Re: What does 'last_event really return?

From: John Shields <jshields_at_.....>
Date: Wed Feb 15 2006 - 11:31:35 PST
Arpad,

'last_event is a function that returns type time.  This is a VHDL 
attribute that applies to a signal class object in the discrete domain. 
There is no implicit conversion of type time to type real.  Any tool 
that accepts the call and does an implicit conversion is wrong.

Regards, John

Muranyi, Arpad wrote:

>Hello everyone,
>
>I would like to find out what the return type of the 'last_event
>attribute really should be according to the LRM.  The reason I am
>asking is because different tools behave differently on a piece
>of code I am wrestling with.
>
>I have a function in which one of the inputs is declared as a real.
>
>    function MyFunction (X : real) return real is
>
>When I call it I am trying to pass the time of an event into it
>using the return value of 'last_event.
>
>    SomeReal == MyFunction(SomeSignal'last_event);
>
>Some of the tools I use take the above line, but others will generate
>a type mismatch error and will only work if I do it with an explicit
>type conversion.
>
>    SomeReal == MyFunction(time'pos(SomeSignal'last_event)*1.0e-15);
>
>The tool that works with the first example will also work with the
>second, but I would like to find out which one is the PROPER syntax
>according to the language reference manual.  I read something about
>the two different representations of time in the analog and digital
>solvers, but I don't understand it completely.  Could someone please
>explain this to me?
>
>Thanks,
>
>Arpad Muranyi
>Intel Corporation
>======================================================================
>
>  
>
Received on Wed Feb 15 11:31:38 2006

This archive was generated by hypermail 2.1.8 : Wed Feb 15 2006 - 11:32:25 PST