assert_always
Ensures that the value of a specified expression is TRUE.
|
Parameters:
severity_level
property_type
msg
coverage_level
|
Class:
single-cycle assertion
|
Syntax
assert_always
[#(severity_level, property_type, msg, coverage_level )]
instance_name (clk, reset_n, test_expr );
Parameters
|
severity_level
|
Severity of the failure. Default: ‘OVL_ERROR.
|
|
property_type
|
Property type. Default: ‘OVL_ASSERT.
|
|
msg
|
Error message printed when assertion fails. Default: “VIOLATION”.
|
|
coverage_level
|
Coverage level. Default: ‘OVL_COVER_ALL.
|
Ports
|
clk
|
|
Clock event for the assertion. The checker samples on the rising edge of the clock.
|
|
reset_n
|
|
Active low synchronous reset signal indicating completed initialization.
|
|
test_expr
|
|
Expression that should evaluate to TRUE on the rising clock edge.
|
Description
The assert_always
assertion checker checks the single-bit expression test_expr at each rising edge of clk to verify the expression evaluates to TRUE.
Assertion Check
|
ASSERT_ALWAYS
|
Expression did not evaluate to TRUE.
|
Cover Points
none
See also
assert_always_on_edge, assert_implication, assert_never, assert_proposition
Example
assert_always #(
|
|
‘OVL_ERROR,
‘OVL_ASSERT,
“Error: reg_a < reg_b is not TRUE”,
‘OVL_COVER_ALL)
|
// severity_level
// property_type
// msg
// coverage_level
|
|
reg_a_lt_reg_b (
|
|
|
|
clk,
reset_n,
reg_a < reg_b );
|
// clock
// reset
// test_expr
|
Ensures that (reg_a < reg_b
) is TRUE at each rising edge of clk.
|
© Accellera Organization, Inc. 2005 All Rights Reserved.
|
Standard OVL V1.1a
|