Hi Tom,
Yes, this is correct. This is another related text in that section
'A value change function detects a change (or, in the case of $stable, lack of change) in the sampled value
of an expression. The change (or lack of change) is determined by comparing the sampled value of the
expression from the Preponed region of the current time step with the sampled value of the expression from
the Preponed region of the most recent strictly prior time step in which the clocking event occurred.'
Also, Annex F.6.2 describes the formal semantics for $past.
Anupam
-----Original Message-----
From: owner-sv-ac@eda.org [mailto:owner-sv-ac@eda.org] On Behalf Of Thomas J Thatcher
Sent: Thursday, May 05, 2011 12:50 PM
To: sv-ac@eda.org
Cc: KORPUSIK,NEIL
Subject: [sv-ac] When is $past "updated"
Hello Everyone,
This question came up today.
Since $past can now be called anywhere within design or verification
code, when is the value $past returns "updated"? When will the return
value change from one value to the next?
Here's what the LRM says:
"$past returns the value of expression1 that was sampled in the Preponed
region of a particular time step
strictly prior to the one in which $past is evaluated. If
number_of_ticks equals k and if ev is the event
expression underlying clocking_event, then the particular time step is
the kth strictly prior time step in which
the event ev iff expression2 occurred."
My interpretation:
Suppose the simulation is at a time step k in which a clocking event
occurs. All through this time step, a call to $past(a) will return the
sampled value of a from the most recent time step in which the clocking
event occurred. On the next time step k+1, any call to $past(a) will
now return the sampled value from the time step k.
So imprecisely speaking, the return value from $past changes at the
beginning of any time step immediately following a time step in which a
clocking event occurred.
Does everyone agree? Does everyone think this is clear from the LRM?
Thanks,
Tom
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Thu May 5 13:22:32 2011
This archive was generated by hypermail 2.1.8 : Thu May 05 2011 - 13:22:36 PDT