A property takes a whole sequence as its argument. Expand it in place and give the verdict and decision edge of every attempt.
Hardware context: A request/acknowledge handshake passed as a sequence argument to a reusable property. Expand the sequence argument in place and read each attempt's verdict from the trace.
The property then_ready has a formal of type sequence. The assertion passes it the named sequence req_ack.
The trace gives the sampled values at ten rising edges. Every edge starts an attempt; eight of them are asked here. For each, choose its verdict and the edge where it is decided.
The Assertion and the Trace
Read the sampled values as text
req: edge 1 = 1, edge 2 = 1, edge 3 = 0, edge 4 = 0, edge 5 = 1, edge 6 = 0, edge 7 = 1, edge 8 = 1, edge 9 = 1, edge 10 = 0ack: edge 1 = 0, edge 2 = 1, edge 3 = 1, edge 4 = 0, edge 5 = 0, edge 6 = 1, edge 7 = 0, edge 8 = 0, edge 9 = 1, edge 10 = 1rdy: edge 1 = 0, edge 2 = 0, edge 3 = 0, edge 4 = 1, edge 5 = 0, edge 6 = 0, edge 7 = 1, edge 8 = 0, edge 9 = 0, edge 10 = 1
Standard behaviour: no free simulator runs this construct correctly. The key was derived by hand from IEEE 1800-2017 and checked independently.
Simulator note: Verilator 5.052 rejects a sequence-typed formal ("Unsupported: sequence argument data type"). The key is the standard behaviour, checked against an independent evaluator.
How to Answer
For each attempt, choose its verdict and the edge where that verdict is decided. A vacuous attempt is graded on its verdict only. A pending one is still running at the end of the run.
- Answer every attempt: its verdict, and the edge where that verdict is decided.
- Read the values the assertion samples at each edge (the dots), not the values after the edge.
- Run grades the first attempt and says whether it is right. Submit grades every attempt and says only whether all are right.
Full specification
sequence req_ack;
req ##1 ack;
endsequence
property then_ready(sequence s, untyped d);
s |-> ##1 d;
endproperty
a1: assert property (@(posedge clk) then_ready(req_ack, rdy));
| Name | Kind | Meaning |
|---|---|---|
| req_ack | named sequence | req, then ack one edge later |
| then_ready(s, d) | property: s is a sequence formal, d is untyped | after s matches, d one edge later |
The clock rises at 5, 15, 25, ... 95. The run ends at 100, so the edge at 95 is the last one.
Hints
Hint 1
Write the instance out by hand: put the body of req_ack where s stands, and rdy where d stands.
Hint 2
The consequent ##1 d counts from the edge where the sequence argument matches, not from the start of the attempt.
Hint 3
An attempt still waiting when the trace ends is pending. Is ##1 rdy weak or strong?
What is checked: The verdict and decision edge of eight attempts, against the standard key derived in docs/sva-standard-traces/A2.md (sva-065-b).
More problems on this topic