Ensures that the value of a specified expression does not overflow.
assert_no_overflow
[#(severity_level, width, min, max, property_type, msg, coverage_level )]
instance_name (clk, reset_n, test_expr );
The assert_no_overflow
assertion checker checks the expression test_expr at each rising edge of clk to determine if its value has changed from a value (at the previous rising edge of clk) that was equal to max. If so, the checker verifies that the new value has not overflowed max. That is, it verifies the value of test_expr is not greater than max or less than or equal to min (in which case, the assertion fails).
The checker is useful for verifying counters, where it can ensure the counter does not wrap from the highest value to the lowest value in a specified range. For example, it can be used to check that memory structure pointers do not wrap around. For a more general test for overflow, use assert_delta
or assert_fifo_index
.
|
ASSERT_NO_OVERFLOW
|
Expression changed value from max to a value not in the range min + 1 to max - 1.
|
|
test_expr_change
|
Expression changed value.
|
|
test_expr_at_min
|
Expression evaluated to min.
|
|
test_expr_at_max
|
Expression evaluated to max.
|
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 for which test_expr changed from max.
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.
assert_delta, assert_fifo_index, assert_increment, assert_no_overflow
Ensures that addr
does not overflow (i.e., change from a value of 4 at the rising edge of clk
to a value of 0 or a value greater than 4 at the next rising edge of clk
).
© Accellera Organization, Inc. 2005 All Rights Reserved. |
Standard OVL V1.1a |