assert_window

Ensures that the value of a specified expression is TRUE in a specified window between a start event and an end event.

Parameters:
severity_level
property_type
msg
coverage_level
Class:
event-bounded assertion

Syntax

assert_window 
		[#(severity_level, property_type, msg, coverage_level )] 
		instance_name (clk, reset_n, start_event, test_expr, end_event );

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.
 
start_event
 
Expression that opens an event window.
 
test_expr
 
Expression that should be TRUE in the event window
 
end_event
 
Expression that closes an event window.

Description

The assert_window assertion checker checks the expression start_event at each rising edge of clk to determine if it should open an event window at the start of the next cycle. If start_event is sampled TRUE, at each subsequent rising edge of clk, the checker evaluates end_event and test_expr. If a sampled value of test_expr is not TRUE, then the assertion fails. If end_event is TRUE, the checker closes the event window and returns to the state of monitoring start_event at the next rising edge of clk.

The checker is useful for ensuring proper changes in structures after various events. For example, it can be used to check that multiple-cycle operations with enabling conditions function properly with the same data. It can be used to check that single-cycle operations function correctly with data loaded at different cycles. It also can be used to verify synchronizing conditions that require date to be stable after an initial triggering event.

Assertion Check

 
ASSERT_WINDOW
The test_expr expression changed value during an open event window.

Cover Points

 
window_open
A change check was initiated.
 
window_close
A change check lasted the full num_cks cycles.

See also

assert_change, assert_time, assert_unchange, assert_win_change, 
assert_win_unchange

Example

  
assert_window #(
 
‘OVL_ERROR,
‘OVL_ASSERT,
“Error: write without grant”,
‘OVL_COVER_ALL)
// severity_level
// property_type
// msg
// coverage_level
 
valid_sync_data_bus_write (
 
 
 
clk,
reset_n,
write,
bus_gnt,
write_ack );
// clock
// reset
// start_event
// test_expr
// end_event
    

Ensures that the bus grant is not deasserted during a write cycle.


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