I have a mixed signal property to compare two real values every clock rising edge.
The property has an enable bit using the disable iff() clause. Which is a static value not changing during run time.
In fact its always 0.
The check_value() method compares a and b, within a tolerance and/or absolute difference.
It prints a message when the comparison is not successful and returns 0.
I don’t expect any of these messages to be printed since EN_CHK_AVG is 0.
I get this output when I run it
UVM_INFO @ 416385.00000 ns: reporter [CHK_VALUE_ERR] CHK_AVG value is not close enough to expected value !
Actual value : 0.00
Expected value : 37.25
Variation (0…1) is : 0.00 [or +/-10.00]
Expected range is between 47.25 and 27.25
UVM_INFO @ 416385.00000 ns: reporter [CHK_VALUE_ERR] CHK_AVG value is not close enough to expected value !
Actual value : 0.00
Expected value : 37.25
Variation (0…1) is : 0.00 [or +/-10.00]
Expected range is between 47.25 and 27.25
ncsim> describe systemTop.pfc_mon.EN_CHK_AVG
systemTop.pfc_mon.EN_CHK_AVG…variable bit = 1’h0
The check_value message is printed twice every clk edge. However the assertion error is not triggered.
The behaviour of disable iff() seems to disable the assertion but not the code in the property.
Is this the way it’s supposed to behave?
In reply to DamianS:
You are dealing with tool specific behavior as this is not legal SystemVerilog code. Please contact your vendor as this Mentor sponsored forum is not for discussing tool specific issues.
You have a method involving the sampling of real values. That is not defined in the LRM.
In any case, I do not agree with the behavior of the tool you are using, but putting a display statement inside a function as part of a boolean expression is considered a side affect and not allowed anyway.
I changed a, b and the method to integers, but I see almost the same behaviour. That is the property is executed regardless of disable clause. Only once per clock edge with integers and twice per clock in the case of reals. This is not what I expected, is my understanding of disable iff incorrect?
It seems to only disable the assertion not the property.
I can remove the print side effect from check_value() although that leaves a rather unsatisfactory error message => Assertion xxx has failed.
Anyway that doesn’t change the fact that the method is called when disabled which is not efficient.