PAPER: Understanding the SVA Engine + Simple alternate solutions

Abstract: Understanding the engine behind SVA provides not only a better appreciation and limitations of SVA, but in some situations provide features that cannot be simply implemented with the current definition of SVA. This paper first explains, by example, how a relatively simple assertion example can be written without SVA with the use of SystemVerilog tasks; this provides the basis for understanding the concepts of multithreading and exit of threads upon a condition, such as an error in the assertion. The paper then provides examples that uses computational variables within threads; those variables can cause, in some cases, errors in SVA. The strictly emulation model with tasks solves this issue.
Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
For training, consulting, services: contact Home - My cvcblr


In reply to ben@SystemVerilog.us:

An application example in using a task called from a consequent in an assertion:
https://verificationacademy.com/forums/systemverilog/usage-variable-delay-sva

SystemVerilog.us

In reply to ben@SystemVerilog.us:
I updated the text with the following modification:
Change ALL always_ff to always
http://systemverilog.us/vf/understanding_assertions.pdf Updated
Note that per 1800

The always_ff procedure imposes the restriction that it contains one and only one event control and no blocking timing controls. Variables on the left-hand side of assignments within an always_ff procedure, including variables from the contents of a called function, shall not be written to by any other process.
Software tools should perform additional checks to warn if the behavior within an always_ff procedure does not represent sequential logic

As of today, many (if not all) ignore this restriction. However, in my always procedures I call tasks that do have more than one event control. Thus, the tools should have flagged that as an error, but they did not.

Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
For training, consulting, services: contact Home - My cvcblr