Ensures that the value of a specified expression is one-hot.
assert_one_hot
[#(severity_level, width, property_type, msg, coverage_level )]
instance_name (clk, reset_n, test_expr );
The assert_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. A one-hot value has exactly one bit set to 1.
The checker is useful for verifying control circuits, for example, it can ensure that a finite-state machine with one-hot encoding operates properly and has exactly one bit asserted high. In a datapath circuit the checker can ensure that the enabling conditions for a bus do not result in bus contention.
|
ASSERT_ONE_HOT
|
Expression evaluated to zero or 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_change
|
Expression has changed value.
|
1. By default, the assert_one_hot
assertion is optimistic and the assertion fails if test_expr is zero or has multiple bits not set to 0 (i.e.equals 1, X, Z, etc.). However, if ‘OVL_XCHECK_OFF is set, the ASSERT_ONE_HOT assertion fails if and only if test_expr is zero or has multiple bits that are 1.
assert_one_cold, assert_zero_one_hot
Ensures that sel
is one-hot at each rising edge of clk.
© Accellera Organization, Inc. 2005 All Rights Reserved. |
Standard OVL V1.1a |