assert_time

Ensures that the value of a specified expression remains TRUE for a specified number of cycles after a start event.

Parameters:
severity_level
num_cks
action_on_new_start
property_type
msg
coverage_level
Class:
n-cycle assertion

Syntax

assert_time 
		[#(severity_level, num_cks, action_on_new_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 that test_expr must be held TRUE. Default: 1.
 
action_on_new_start
Method for handling a new start event that occurs while a check is pending. Values are: ‘OVL_IGNORE_NEW_START, ‘OVL_RESET_ON_NEW_START and ‘OVL_ERROR_ON_NEW_START. Default: ‘OVL_IGNORE_NEW_START.
 
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 for num_cks cycles after start_event initiates a check.

Description

The assert_time assertion checker checks the expression start_event at each rising edge of clk to determine whether or not to initiate a check. Once initiated, the check evaluates test_expr each rising edge of clk for num_cks cycles to verify that its value is TRUE. During that time, the assertion fails each cycle a sampled value of test_expr is not TRUE.

The method used to determine what constitutes a start event for initiating a check is controlled by the action_on_new_start parameter. If no check is in progress when start_event is sampled TRUE, a new check is initiated. But, if a check is in progress when start_event is sampled TRUE, the checker has the following actions:

‘OVL_IGNORE_NEW_START

The checker does not sample start_event for the next num_cks cycles after a start event.

‘OVL_RESET_ON_NEW_START

The checker samples start_event every cycle. If a check is pending and the value of start_event is TRUE, the checker terminates the check and initiates a new check without sampling test_expr.

‘OVL_ERROR_ON_NEW_START

The checker samples start_event every cycle. If a check is pending and the value of start_event is TRUE, the assertion fails with an illegal start event violation. In this case, the checker does not initiate a new check, does not terminate a pending check and reports an additional assertion violation if test_expr is FALSE.

Assertion Checks

 
ASSERT_TIME
The value of test_expr was not TRUE within num_cks cycles after start_event was sampled TRUE.
 
illegal start event
The action_on_new_start parameter is set to ‘OVL_ERROR_ON_NEW_START and start_event expression evaluated to TRUE while the checker was monitoring test_expr.

Cover Points

 
window_open
A time check was initiated.
 
window_close
A time check lasted the full num_cks cycles.
 
window_resets
The action_on_new_start parameter is ‘OVL_RESET_ON_NEW_START, and start_event was sampled TRUE while the checker was monitoring test_expr.

See also

assert_change, assert_next, assert_frame, assert_unchange, 
assert_win_change, assert_win_unchange, assert_window

Examples

  
assert_time #(
 
‘OVL_ERROR,
3,
‘OVL_IGNORE_NEW_START,
‘OVL_ASSERT,
“Error: invalid transaction”,
‘OVL_COVER_ALL)
// severity_level
// num_cks
// action_on_new_start
// property_type
// msg
// coverage_level
 
valid_transaction (
 
 
 
clk,
reset_n,
req == 1,
ptr >= 1 && ptr <= 3);
// clock
// reset
// start_event
// test_expr
    

Ensures that ptr is sampled in the range 1 to 3 for three cycles after req is sampled equal to 1 at the rising edge of clk. If req is sampled equal to 1 when the checker samples ptr, a new check is not initiated (i.e., the new start is ignored).

  
assert_time #(
 
‘OVL_ERROR,
3,
‘OVL_RESET_ON_NEW_START,
‘OVL_ASSERT,
“Error: invalid transaction”,
‘OVL_COVER_ALL)
// severity_level
// num_cks
// action_on_new_start
// property_type
// msg
// coverage_level
 
valid_transaction (
 
 
 
clk,
reset_n,
req == 1,
ptr >= 1 && ptr <= 3);
// clock
// reset
// start_event
// test_expr
    

Ensures that ptr is sampled in the range 1 to 3 for three cycles after req is sampled equal to 1 at the rising edge of clk. If req is sampled equal to 1 when the checker samples ptr, a new check is initiated (i.e., the new start restarts a check).

  
assert_time #(
 
‘OVL_ERROR,
3,
‘OVL_ERROR_ON_NEW_START,
‘OVL_ASSERT,
“Error: invalid transaction”,
‘OVL_COVER_ALL)
// severity_level
// num_cks
// action_on_new_start
// property_type
// msg
// coverage_level
 
valid_transaction (
 
 
 
clk,
reset_n,
req == 1,
ptr >= 1 && ptr <= 3);
// clock
// reset
// start_event
// test_expr
    

Ensures that ptr is sampled in the range 1 to 3 for three cycles after req is sampled equal to 1 at the rising edge of clk. If req is sampled equal to 1 when the checker samples ptr, the checker issues an illegal start event violation and does not start a new check.


  © Accellera Organization, Inc. 2005
All Rights Reserved.
Standard OVL V1.1a