Hardware Reference
In-Depth Information
endproperty
a: assert property (p);
This could again be written using a strong sequence as follows:
property p;
logic [3:0] tag;
(req, tag = req_tag)
|->
strong (
!(ack && (ack_tag == tag))[ * 2]
##[1:16]
(ack && (ack_tag == tag))
);
endproperty
a: assert property (p);
t
An option is to separate the two clauses into two independent assertions as shown
in Example 19.5 .
In the following section, we briefly discuss debugging assertion failures that
occur during a test of a design.
19.2
Debugging Assertion Failures from a Test
Without specialized debugging tools that vendors may provide, a similar technique
to the one in the preceding section can be used to debug assertion failures as a result
of running a test. The failure can be due to either an incorrect assertion or an error in
the design. One difference in debugging is that there may be many assertions (that
fail or not) and that rerunning the test may become quite demanding on resources
and time. In this scenario, we do not construct a new test bench, but continue with
the same failing test.
Assuming that rerunning the test either with its original design or from a saved
signal dump is possible, we can concentrate on the particular assertion failure. If
there are more than one failure of the same assertion in the run, we start with the
first one that is not due to some clearly apparent reason like neglecting to stop the
assertion during the reset phase.
There are three possible ways to approach the debugging problem:
1. To concentrate on that failure, we should stop all assertions at time 0, and then
start only the one of interest just before the clock tick associated with the start
time of the failing attempt. We will thus need to specify the complete path to the
assertion in the call to $asserton as well as to the subsequent $assertoff that
shuts it off just after the attempt started. These calls can be placed in a new top-
level module that is used only for this assertion control. We also instrument the
assertion following the ideas shown in Example 19.2 .
2. An alternative is to shut off all assertions and add a copy of the instrumented
failing assertion into the new top-level module. The actual arguments then must
Search WWH ::




Custom Search