Ensures that the value of a specified expression changes only by a value in the specified range.
assert_delta
[#(severity_level, width, min, max, property_type, msg, coverage_level )]
instance_name (clk, reset_n, test_expr );
The assert_delta
assertion checker checks the expression test_expr at each rising edge of clk to determine if its value has changed from its value at the previous rising edge of clk. If so, the checker verifies that the difference between the new value and the previous value (i.e., the delta value) is in the range from min to max, inclusive. If the delta value is less than min or greater than max, the assertion fails.
The checker is useful for ensuring proper changes in control structures such as up-down counters. For these structures, assert_delta
can check for underflow and overflow. In datapath and arithmetic circuits, assert_delta
can check for “smooth” transitions of the values of various variables (for example, for a variable that controls a physical variable that cannot detect a severe change from its previous value).
The parameters min and max must be specified such that min is less than or equal to max. Otherwise, the assertion fails on each tested clock cycle.
1. The assertion check compares the current value of test_expr with its previous value. Therefore, checking does not start until the second rising clock edge of clk after reset_n deasserts.
2. The assertion check allows the value of test_expr to wrap. The overflow or underflow amount is included in the delta value calculation.
assert_decrement, assert_increment, assert_no_overflow, assert_no_underflow, assert_range
Ensures that the y
output only changes by a maximum of 8 units each cycle (min is 0).
© Accellera Organization, Inc. 2005 All Rights Reserved. |
Standard OVL V1.1a |