Chapter 4 PSL
Chapter 4 PSL
Chapter 4 PSL
1
In this chapter we assume finite paths such as those seen in simulation. On infinite
paths, such as those seen in formal verification, there is also a difference between
weak and strong operators. We discuss this issue in Chapter 11.
28 Chapter 4. Weak vs. Strong Temporal Operators
0 1 2 3 4 5 6 7 8 9 10
Fig. 4.1: A trace illustrating the idea behind weak and strong operators
say that a property holds without having all the information. Thus, Asser-
tion 4.1b, which uses the strong next! operator, does not hold on Trace 4.1(i).
NOTE: A weak temporal operator is lenient even about ‘false, and a
strong temporal operator is strict even about ‘true. Thus, Assertion 4.2a
holds on Trace 4.2(i) because ‘false is treated as something that could hap-
pen in the future, and Assertion 4.2b does not hold on Trace 4.2(i) because
‘true is not treated as a sure thing.
0 1 2 3 4 5 6 7 8 9 10
Fig. 4.2: A weak temporal operator is lenient even about ‘false, and a strong
temporal operator is strict even about ‘true
4.2. Variations on next! including next event! 29
Assertion 4.3a states that whenever a holds, then b should hold in the next
cycle. Using the strong version of the next operator, we get Assertion 4.3b
which requires that in addition, there be a next cycle. For example, while
Assertion 4.3a holds on Trace 4.3(i), Assertion 4.3b does not, because even
though b is asserted after the first two assertions of a, the trace ends too soon
with regards to the third assertion of a.
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
gnt
You should by now be able to guess the meaning of the next a![i:j]
and next event a!(b)[i:j] operators. The next a![i:j] operator holds if
there are at least j additional cycles, and its operand holds on all of the ith
through j th of them, inclusive. The next event a!(b)[i:j] operator holds if
there are at least j additional cycles on which b holds, and the second operand
holds on all of the ith through j th of them, inclusive.
The next e![i:j] operator creates a property that holds if its operand
holds on at least one of the ith through j th next cycles, inclusive. There
do not have to be j cycles if the operand holds on some cycle between the
ith and the j th , inclusive. Similarly, the next event e!(b)[i:j] operator
creates a property that holds if its second operand holds on at least one of
the ith through j th next occurrences of b, inclusive. There do not have to be
j occurrences if the second operand holds on some occurrence between the ith
and the j th , inclusive. For example, consider Assertion 4.5b, which states that
a request (assertion of req) must be acknowledged (assertion of ack) on one of
the next four grants, and that in addition, the trace must not end before there
is an appropriate grant. Assertion 4.5b does not hold on Trace 4.5(i) because
none of the three grants shown is acknowledged. However, it does hold on
Trace 4.5(ii) because at least one of the first, second, third or fourth grants
is acknowledged. The fact that the fourth grant does not occur is immaterial
4.3. The until! and until! operators 31
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
req req
gnt gnt
ack ack
(i) Assertion 4.5a holds, but 4.5b (ii) Assertion 4.5a and 4.5b both
does not hold
– there is no way for a fourth grant to change the fact that we know for sure
that one of the first, second, third or fourth grants is acknowledged.
The weak version of Assertion 4.5b holds on both Trace 4.5(i) and
Trace 4.5(ii). The only way to violate the weak version shown in Assertion 4.5a
is for there to be four grants, none of which are acknowledged.
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
a a
b b
c c
(i) Assertions 4.6a and 4.6b hold (ii) Assertion 4.6a holds, but 4.6b
does not
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
req req
gnt gnt
(i) Assertion 4.7a holds, but 4.7b (ii) Assertions 4.7a and 4.7b both
does not hold
being weak holds not only on Trace 4.7(ii), but also on Trace 4.7(i), in which
after the second request neither a grant nor a third request ever arrives. The
strong version, shown in Assertion 4.7b, requires that a grant eventually be
given, but not necessarily that another request be seen. Thus, Assertion 4.7b
does not hold on Trace 4.7(i), but holds on Trace 4.7(ii).
The before! operator is the strong version of the before operator. Thus,
Assertion 4.8a holds on Trace 4.8(i), in which the first request (assertion of
signal req) is granted (assertion of signal gnt) but the second is not. The
strong version of Assertion 4.8a, shown in Assertion 4.8b, does not hold on
Trace 4.8(i) because the second request is not granted. Both Assertion 4.8a
and 4.8b hold on Trace 4.8(ii).
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
req req
gnt gnt
(i) Assertion 4.8a holds but 4.8b does (ii) Assertions 4.8a and 4.8b both
not hold
We have seen weak and strong versions of many operators. The eventually!
operator is not a strong version of some other operator. In other words, there
is no weak version of eventually!. The reason is that the meaning of other
strong operators can be broadly described as requiring that nothing bad must
happen up until some terminating condition, and in addition, the terminat-
ing condition must eventually occur. The weak versions then waive the re-
quirement that the terminating condition eventually occur, leaving only the
requirement that nothing bad must happen. The eventually! operator, how-
ever, contains no idea of a bad “something”, only a terminating condition.
34 Chapter 4. Weak vs. Strong Temporal Operators