I met a problem when trying to write this assertion. I tried to assert the scenario that signal B must be true at least 1 occurrence after signal A is true.
The assertion I wrote is below:
example : assert property(
@(posedge clk) disable iff(reset)
A |-> ##[0:$] B[->1]) else `uvm_error(....)
The problem is, if during the simulation signal B is never be true after A is true, the uvm_error is not executed. I expected it to be executed, and the simulation reports the message:
example: started at xxxxxxps not finished
It seems the assertion is not finished even the simulation reaches the end.
I looked up in google, there is a similar question: Assertion to check for the toggle (0->1) of a signal
I also tried use strong() operation, it did not help as well.
How to solve this problem?
Bneeds to be true at least once afterAis true, but your assertion is checking forAneeding to be true at least once afterBis true (ie the other way round). Which is correct? - Matthew TaylorA[->1]means the same as this##[0:$] A[->1]. - Matthew Taylor