Hardware Reference
In-Depth Information
Table 7.3 Sampled and past values of a
Time $sampled(a) $past(a,,,@( posedge clk))
30
0
0
1
0
40
0
1
42
0
1
50
1
0
60
70
1
1
80
0
1
90
0
0
10
20
30
40
50
60
70
80
90
100
clk
en
a
Fig. 7.2
Timing diagram for Examples 7.10 , 7.15 , 7.19 ,and 7.23
All arguments but the first one are optional and have default values:
￿ If the clocking event is omitted, it is inferred from the context as described in
Sect. 7.2.1.5 . For example, if $past is invoked in a singly clocked assertion then
the clock of this assertion is assumed, both in the assertion body and in the
assertion action blocks.
￿ The gating condition defaults to 1'b1 — no clock gating.
￿ The number of clock ticks defaults to 1.
The last optional arguments may be skipped, like in $past(a) . If the intermediate
ones are omitted, a comma should be placed for each omitted argument:
$past(a,,,@( posedge clk))
$past returns the sampled value of e that was n strictly prior time steps ago in
which event @(clk iff en) occurred, i.e., the value is taken n ticks of clk ago,
but counting only those clock ticks in which en was high.
Example 7.10. Table 7.3 contains sampled and past values of a for some time steps
for the waveforms shown in Fig. 7.2 . For example, to find $past(a,,,@( posedge
clk)) at time 40 we must take the sampled value of a at time 30, which is 0. To find
$past(a,,,@( posedge clk)) at time 42 we must take the sampled value of a at
the time of the last strictly preceding clock tick, which is 40, and this value is 1. t
 
Search WWH ::




Custom Search