Hardware Reference
In-Depth Information
Table 7.6
Future global clocking sampled value functions
Name Description
$future_gclk
Return expression value in next tick of global clock
$rising_gclk
Check whether signal value is rising
$falling_gclk
Check whether signal value is falling
$changing_gclk
Check whether signal value is changing
$steady_gclk
Check whether signal value is not changing
of
e
at the next tick of the global clock.
4
Other future global clocking SVF can be
defined through function
$future_gclk
:
$rising_gclk(e)
$sampled(LSB(e))!== 1 && $future_gclk(LSB(e))=== 1
$falling_gclk(e)
$sampled(LSB(e))!== 0 && $future_gclk(LSB(e))=== 0
$changing_gclk(e)
$sampled(e)!== $future_gclk(e)
$steady_gclk(e)
$sampled(e)=== $future_gclk(e)
There are several restrictions imposed on future value functions: they cannot be used
in reset conditions, outside concurrent assertions,
5
and they cannot be nested.
Example 7.29.
The following use of future functions is
illegal
:
always
@(posedge_clk) a <= $future_gclk(b) && c;
a1_illegal:
assert final
(a -> $future_gclk(b));
a2_illegal:
assert property
(@(
posedge
clk)
disable iff
(rst || $rising_gclk(interrupt)) req |=> gnt);
a3_illegal:
assert property
(@(
posedge
clk) req |-> $future_gclk
(ack && $rising_gclk(gnt));
In the first statement
$future_gclk(b)
is used in an assignment,
a1_illegal
is
not a concurrent assertion, in
a2_illegal
a future SFV is used in a reset condition,
and in
a3_illegal
two future SVF are nested.
t
Efficiency Tip.
Global clock future value functions are usually more efficient in FV
than past sampled value functions. In simulation, the picture is the opposite.
Stability Assertions.
The following examples illustrate how a future sampled value
function may be used to write assertions checking signal stability.
Example 7.30.
sig
value does not change.
4
Formal interpretation of
$future_gclk(e)
is provided in Chap.
21
.
5
Future global clocking sampled value functions are legal in let-statements used in concurrent
assertions, and in definitions of sequences and properties.
Search WWH ::
Custom Search