assert_frame

Ensures that when a specified start event is TRUE, then a specified expression must not evaluate TRUE before a minimum number of clock cycles and must transition to TRUE no later than a maximum number of clock cycles.

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

Syntax

assert_frame 
		[#(severity_level, min_cks, max_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.
 
min_cks
Number of cycles after the start event that test_expr must not evaluate to TRUE. The special case where min_cks is 0 turns off minimum checking (i.e., test_expr can be TRUE in the same clock cycle as the start event). Default: 0.
 
max_cks
Number of cycles after the start event that during which test_expr must transition to TRUE. The special case where max_cks is 0 turns off maximum checking (i.e., test_expr does not need to transition to TRUE). Default: 0.
 
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.
 
start_event
 
Expression that (along with action_on_new_start) identifies when to initiate checking of test_expr.
 
test_expr
 
Expression that should not evaluate to TRUE for min_cks -1 cycles after start_event initiates a check (unless min_cks is 0) and that should evaluate to TRUE before max_cks cycles transpire (unless max_cks is 0).

Description

The assert_frame assertion checker checks for a start event at each rising edge of clk. A start event occurs if start_event has transitioned to TRUE, either at the clock edge or in the previous cycle. A start event also occurs if start_event is TRUE at the rising clock edge after a checker reset.

When a start event occurs, the checker performs the following steps:

1. Unless it is disabled by setting min_cks to 0, a minimum check is initiated. The check evaluates test_expr at each subsequent rising edge of clk for the next min_cks cycles. However, if a sampled value of test_expr is TRUE, the minimum check fails and the checker returns to the state of waiting for a start event.

2. Unless it is disabled by setting max_cks to 0 (or a minimum violation has occurred), a maximum check is initiated. The check evaluates test_expr at each subsequent rising edge of clk for the next (max_cks - min_cks) cycles. However, if a sampled value of test_expr is TRUE, the checker returns to the state of waiting for a start event. If its value does not transition to TRUE by the time max_cks cycles transpire (from the start of checking), the maximum check fails at cycle max_cks.

3. The checker returns to the state of waiting for a start event.

The method used to determine how to handle start_event when the checker is in the state of checking test_expr is controlled by the action_on_new_start parameter. The checker has the following actions:

‘OVL_IGNORE_NEW_START

The checker does not sample start_event until it returns to the state of waiting for a start event.

‘OVL_RESET_ON_NEW_START

Each time the checker samples test_expr, it also samples start_event. If start_event is TRUE, the checker first checks whether a pending minimum check is just failing. If so, the assertion failed. Then——unless the assertion failed and it was fatal——the checker terminates the current checks and initiates a new pair of checks.

‘OVL_ERROR_ON_NEW_START

Each time the checker samples test_expr, it also samples start_event. If start_event is TRUE, the assertion fails with an illegal start event error. If the error is not fatal, the checker returns to the state of waiting for a start event at the next rising clock edge.

Assertion Checks

 
 
 
 
ASSERT_FRAME
The value of test_expr was TRUE before min_cks cycles after start_event was sampled TRUE or its value was not TRUE before max_cks cycles transpired after the rising edge of start_event.
 
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.
 
min_cks > max_cks
The min_cks parameter is greater than the max_cks parameter (and max_cks >0). Unless the violation is fatal, either the minimum or maximum check will fail.

Cover Point

 
start_event
The value of start_event was TRUE on a rising edge of clk.

Notes

1. The special case where min_cks and max_cks are both 0 is the default. Here, test_expr must be TRUE every cycle there is a start event.

See also

assert_change, assert_next, assert_time, assert_unchange, assert_width

Examples

  
assert_frame #(
 
‘OVL_ERROR,
2,
4,
‘OVL_IGNORE_NEW_START,
‘OVL_ASSERT,
“Error: invalid transaction”,
‘OVL_COVER_ALL)
// severity_level
// min_cks
// max_cks
// action_on_new_start
// property_type
// msg
// coverage_level
 
valid_transaction (
 
 
 
clk,
reset_n,
req,
ack);
// clock
// reset
// start_event
// test_expr
    

Ensures that after a rising edge of req, ack goes high between 2 and 4 cycles later. New start events during transactions are not considered to be new transactions and are ignored.

  
assert_frame #(
 
‘OVL_ERROR,
2,
4,
‘OVL_RESET_ON_NEW_START,
‘OVL_ASSERT,
“Error: invalid transaction”,
‘OVL_COVER_ALL)
// severity_level
// min_cks
// max_cks
// action_on_new_start
// property_type
// msg
// coverage_level
 
valid_transaction (
 
 
 
clk,
reset_n,
req,
ack);
// clock
// reset
// start_event
// test_expr
    

Ensures that after a rising edge of req, ack goes high between 2 and 4 cycles later. A new start event during a transaction restarts the transaction.

  
assert_frame #(
 
‘OVL_ERROR,
2,
4,
‘OVL_ERROR_ON_NEW_START,
‘OVL_ASSERT,
“Error: invalid transaction”,
‘OVL_COVER_ALL)
// severity_level
// min_cks
// max_cks
// action_on_new_start
// property_type
// msg
// coverage_level
 
valid_transaction (
 
 
 
clk,
reset_n,
req,
ack);
// clock
// reset
// start_event
// test_expr
    

Ensures that after a rising edge of req, ack goes high between 2 and 4 cycles later. Also ensures that a new transaction does not start before the previous transaction is acknowledged. If a start event occurs during a transaction, the checker does does not initiate a new check.


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