Ensures that the value of a specified expression is zero or one-hot.
assert_zero_one_hot
[#(severity_level, width, property_type, msg, coverage_level )]
instance_name (clk, reset_n, test_expr );
The assert_zero_one_hot
assertion checker checks the expression test_expr at each rising edge of clk to verify the expression evaluates to a one-hot value or is zero. A one-hot value has exactly one bit set to 1.
The checker is useful for verifying control circuits, circuit enabling logic and arbitration logic. For example, it can ensure that a finite-state machine with zero-one-cold encoding operates properly and has exactly one bit asserted high——or else is zero. In a datapath circuit the checker can ensure that the enabling conditions for a bus do not result in bus contention.
|
ASSERT_ZERO_ONE_HOT
|
Expression evaluated to a value with multiple bits set to 1.
|
|
test_expr contains X/Z value
|
Expression evaluated to a value with an X or Z bit, and ‘OVL_XCHECK_OFF is not set.
|
|
all_one_hots_checked
|
Expression evaluated to all possible combinations of one-hot values.
|
|
test_expr_all_zeros
|
Expression evaluated to 0.
|
|
test_expr_change
|
Expression has changed value.
|
1. By default, the assert_zero_one_hot
assertion is optimistic and the assertion fails if test_expr has multiple bits not set to 0 (i.e.equals 1, X, Z, etc.). However, if ‘OVL_XCHECK_OFF is set, the assertion fails if and only if test_expr has multiple bits that are 1.
assert_one_cold, assert_one_hot
Ensures that sel
is zero or one-hot at each rising edge of clk.
© Accellera Organization, Inc. 2005 All Rights Reserved. |
Standard OVL V1.1a |