Section 17.7.3, page 246 (IEEE Std 1800™-2005)
Replace
The use of these functions is
not limited to assertion features; they can be used as expressions in
procedural
code as well.
The clocking event, although optional as an explicit argument to the functions,
is required for
their semantics. The clocking
event is used to sample the value of the argument expression.
With
The use of these functions is
not limited to assertion features; they can be used as expressions in
procedural code as well. The clocking event, although optional as an explicit
argument to the functions $past, $rose, $stable and
$fell, is required for their semantics. The clocking event is used to
sample the value of the argument expression.
The
function $sampled does not use a clocking event, although one can be optionally
provided. The optional clocking event is ignored, and its use is deprecated.
The
value of the sampled value functions is updated in the postponed scheduling
region and can be read in the subsequent time step.
Replace
Function $sampled returns the sampled value of the expression with respect to
the last occurrence of the clocking event. When $sampled is invoked prior to the occurrence of the first clocking
event, the value of X is returned. The use of $sampled in assertions, although allowed, is redundant, as the result
of the function is identical to the sampled value of the expression itself used
in the assertion.
With
The $sampled function returns the value of the expression sampled in the
preponed region of the simulation time step in which the function is called. No
clocking event is ever inferred. The value is stable throughout the simulation
step.
When $sampled is invoked prior to the occurrence of the first clocking event, the
value of X is returned. The sampled value in the preponed region at time 0 of an expression
is the default initial value of the expression type. For example, if $sampled(y) is called at time 0, and y is of type logic, the value
returned is X.
The use of $sampled in assertions, although allowed, is redundant, as the result
of the function is identical to the sampled value of the expression itself used
in the assertion.
Replace
A value change function detects
the change in the sampled value of an expression. The clocking event is used to
obtain the sampled value of the argument expression at a clock tick prior to
the current simulation time unit. Here, the current simulation time unit refers
to the simulation time unit in which the function is evaluated. This sampled
value is compared against the value of the expression determined at the prepone
time of the current simulation time unit. The result of a value change
expression is true or false and can be used as a boolean expression.
With
A value change function
detects the change in the sampled value of an expression. The clocking event is
used to obtain the sampled value of the argument expression at a clock tick
prior to the current simulation time unit. Here, the current simulation time
unit refers to the simulation time unit in which the function is evaluated.
This sampled value is compared against the value of the expression determined
at the prepone time of the current simulation time unit. The result of a value
change expression is true or false starting from the active region of the current time
step and can be
used as a boolean expression.
Page
247
Replace
When these
functions are called at or before the first clock tick of the clocking event,
the results are computed by comparing the current sampled value of the
expression to X.
With
When these functions are called
at or before the first clock tick of the clocking event, the results are
computed by comparing the current sampled value of the expression to X the default initial value of the type of the argument.
Page
248
Replace
A clock
tick is based on clocking_event. If the specified clock tick in the past is
before the start of simulation, the returned value from the $past function is a value of X.
With
A clock
tick is based on clocking_event. If the specified clock tick in the past is
before the start of simulation, the returned value from the $past function is a value of X the default initial
value of the type of the argument.
The values of the $past function is updated in the
postponed region of the simulation time step in which a clock tick occurred and
thus the new value becomes available starting in the active region of the next
time step.