assert_win_change

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

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

Syntax

assert_win_change 
		[#(severity_level, width, 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.
 
width
Width of the test_expr argument. Default: 1.
 
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
[ width - 1: 0 ]
Expression that should change value in the event window
 
end_event
 
Expression that closes an event window.

Description

The assert_win_change 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, the checker evaluates test_expr. At each subsequent rising edge of clk, the checker evaluates end_event and re-evaluates test_expr. If end_event is TRUE, the checker closes the event window and if all sampled values of test_expr equal its value at the start of the window, then the assertion fails. The checker returns to the state of monitoring start_event at the next rising edge of clk after the event window is closed.

The checker is useful for ensuring proper changes in structures in various event windows. A typical use is to verify that synchronization logic responds after a stimulus (for example, bus transactions occurs without interrupts or write commands are not issued during read cycles). Another typical use is verifying a finite-state machine responds correctly in event windows.

Assertion Check

 
ASSERT_WIN_CHANGE
The test_expr expression did not change value during an open event window.

Cover Points

 
window_open
An event window opened (start_event was TRUE).
 
window_close
An event window closed (end_event was TRUE in an open event window).

See also

assert_change, assert_time, assert_unchange, assert_win_unchange, 
assert_window

Example

  
assert_win_change #(
 
‘OVL_ERROR,
32,
‘OVL_ASSERT,
“Error: read not synchronized”,
‘OVL_COVER_ALL)
// severity_level
// width
// property_type
// msg
// coverage_level
 
valid_sync_data_bus_rd (
 
 
 
clk,
reset_n,
rd,
data,
rd_ack );
// clock
// reset
// start_event
// test_expr
// end_event
    

Ensures that data changes value in every data read window.


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