Ensures that the value of a specified expression changes only by the specified decrement value.
assert_decrement
[#(severity_level, width, value, property_type, msg, coverage_level )]
instance_name (clk, reset_n, test_expr );
The assert_decrement
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 new value equals the previous value decremented by value. The checker allows the value of test_expr to wrap, if the total change equals the decrement value. For example, if width is 5 and value is 4, then the following change in test_expr is valid:
5’b00010 ——> 5’b11110
The checker is useful for ensuring proper changes in structures such as counters and finite-state machines. For example, the checker is useful for circular queue structures with address counters that can wrap. Do not use this checker for variables or expressions that can increment. Instead consider using the assert_delta
checker.
|
ASSERT_DECREMENT
|
Expression evaluated to a value that is not its previous value decremented by value.
|
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_increment, assert_no_underflow
Ensures that the programmable counter’s count
variable only decrements by 1. If count
wraps, the assertion fails, because the change is not a binary decrement.
© Accellera Organization, Inc. 2005 All Rights Reserved. |
Standard OVL V1.1a |