I just saw the assertion control task called $assertvacuousoff to turn off the pass action block in case of any false pass. I dont know how to use it in my assertion property. For example I have the following property:
turn off the pass action block in case of any false pass
There no such thing as a “false pass”; it is called a vacuous successe or a vacuuss pass.
To use those action control tasks, insert them in a block, such as the initial or always block.
Thus, your assertion will look like the following:
// For straightforward, not reused assertions with no local variables, avoid declaring
// property first, it is no needed.
initial $assertvacuousoff(0);
// initial $assertpassoff(0);
pa_ab: assert property(@ (posedge clk) $rose(a) |-> b)
$display ("@ %t PASS: a=%b b=%b", $realtime, $sampled(a), $sampled(a));
else $display ("@ %t FAIL: a=%b b=%b", $realtime, $sampled(a), $sampled(a));