assert_next
Ensures that the value of a specified expression is TRUE a specified number of cycles after a start event.
|
Parameters:
severity_level
num_cks
check_overlapping
check_missing_start
property_type
msg
coverage_level
|
Class:
n-cycle assertion
|
Syntax
assert_next
[#(severity_level, num_cks, check_overlapping, check_missing_start, property_type,
msg, coverage_level )]
instance_name (clk, reset_n, start_event, test_expr );
Parameters
|
severity_level
|
Severity of the failure. Default: ‘OVL_ERROR.
|
|
num_cks
|
Number of cycles after start_event is TRUE to wait to check that the value of test_expr is TRUE. Default: 1.
|
|
check_overlapping
|
Whether or not to perform overlap checking. Default: 1 (overlap checking off).
² If set to 0, overlap checking is performed. From the rising edge of clk after start_event is sampled TRUE to the rising edge of clk of the cycle before test_expr is sampled for the current next check, the checker performs an overlap check. During this interval, if start_event is TRUE at a rising edge of clk, then the overlap check fails (illegal overlapping condition). The current next check continues but a new next check is not initiated.
² If set to 1, overlap checking is not performed. A separate next check is initiated each time start_event is sampled TRUE (overlapping start events are allowed).
|
|
check_missing_start
|
Whether or not to perform missing-start checking. Default: 0 (missing-start checking off).
² If set to 0, missing start checks are not performed.
² If set to 1, missing start checks are performed. The checker samples test_expr every rising edge of clk. If the value of test_expr is TRUE, then num_cks rising edges of clk prior to the current time, start_event must have been TRUE (initiating a next check). If not, the missing-start check fails (start_event without test_expr).
|
|
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.
|
|
start_event
|
|
Expression that (along with num_cks) identifies when to check test_expr.
|
|
test_expr
|
|
Expression that should evaluate to TRUE num_cks cycles after start_event initiates a next check.
|
Description
The assert_next
assertion checker checks the expression start_event at each rising edge of clk. If start_event is TRUE, a check is initiated. The check waits for num_cks cycles (i.e., for num_cks additional rising edges of clk) and evaluates test_expr. If test_expr is not TRUE, the assertion fails.
If overlap
checking is off (check_overlapping is 1), additional checks can start while a current check is pending. If overlap checking is on, the assertion fails if start_event is sampled TRUE while a check is pending (except on the last clock).
If missing-start
checking is off (check_missing_start is 0), test_expr can be TRUE any time. If missing-start
checking is on, the assertion fails if test_expr is TRUE without a corresponding start event (num_cks cycles previously). However, if test_expr is TRUE in the interval of num_cks - 1 cycles after a reset and has no corresponding start event, the result is indeterminate (i.e., the missing-start
check might or might not fail).
Assertion Checks
|
start_event without test_expr
|
The value of start_event was TRUE on a rising edge of clk, but num_cks cycles later the value of test_expr was not TRUE.
|
|
illegal overlapping condition detected
|
The check_overlapping parameter is set to 0 and start_event was TRUE on the rising edge of clk, but a previous check was pending.
|
|
test_expr without start_event
|
The check_missing_start parameter is set to 1 and start_event was not TRUE on the rising edge of clk, but num_cks cycles later test_expr was TRUE.
|
|
num_cks parameter<=0
|
The num_cks parameter is less than 2.
|
Cover Points
|
start_event
|
The value of start_event was TRUE on a rising edge of clk.
|
|
overlapping_start_events
|
The value of start_event was TRUE on a rising edge of clk while a check was pending.
|
See also
assert_change, assert_frame, assert_time, assert_unchange
Examples
assert_next #(
|
|
‘OVL_ERROR,
4,
1,
0,
‘OVL_ASSERT,
“error:”,
‘OVL_COVER_ALL)
|
// severity_level
// num_cks
// check_overlapping (off)
// check_missing_start (off)
// property_type
// msg
// coverage_level
|
|
valid_next_a_b (
|
|
|
|
clk,
reset_n,
a,
b );
|
// clock
// reset
// start_event
// test_expr
|
Ensures that b
is TRUE 4 cycles after a
is TRUE.
assert_next #(
|
|
‘OVL_ERROR,
4,
0,
0,
‘OVL_ASSERT,
“error:”,
‘OVL_COVER_ALL)
|
// severity_level
// num_cks
// check_overlapping (on)
// check_missing_start (off)
// property_type
// msg
// coverage_level
|
|
valid_next_a_b (
|
|
|
|
clk,
reset_n,
a,
b );
|
// clock
// reset
// start_event
// test_expr
|
Ensures that b
is TRUE 4 cycles after a
is TRUE. Overlaps are not allowed
assert_next #(
|
|
‘OVL_ERROR,
4,
1,
1,
‘OVL_ASSERT,
“error:”,
‘OVL_COVER_ALL)
|
// severity_level
// num_cks
// check_overlapping (off)
// check_missing_start (on)
// property_type
// msg
// coverage_level
|
|
valid_next_a_b (
|
|
|
|
clk,
reset_n,
a,
b );
|
// clock
// reset
// start_event
// test_expr
|
Ensures that b
is TRUE 4 cycles after a
is TRUE. Missing-start check is on.
|
© Accellera Organization, Inc. 2005 All Rights Reserved.
|
Standard OVL V1.1a
|