assert_handshake

Ensures that specified request and acknowledge signals follow a specified handshake protocol.

Parameters:
severity_level
min_ack_cycle
max_ack_cycle
req_drop
deassert_count
max_ack_length
property_type
msg
coverage_level
Class:
event-bounded assertion

Syntax

assert_handshake  
		[#(severity_level, min_ack_cycle, max_ack_cycle, req_drop, deassert_count,  
		max_ack_length, property_type, msg, coverage_level )] 
		instance_name (clk, reset_n, req, ack );

Parameters

 
severity_level
Severity of the failure. Default: ‘OVL_ERROR.
 
min_ack_cycle
Minimum number of clock cycles before acknowledge. A value of 0 turns off the ack min cycle check. Default: 0.
 
max_ack_cycle
Maximum number of clock cycles before acknowledge. A value of 0 turns off the ack max cycle check. Default: 0.
 
req_drop
If greater than 0, value of req must remain TRUE until acknowledge. A value of 0 turns off the req drop check. Default: 0.
 
deassert_count
Maximum number of clock cycles after acknowledge that req can remain TRUE (i.e., req must not be stuck active). A value of 0 turns off the req deassert check. Default: 0.
 
max_ack_length
Maximum number of clock cycles that ack can be TRUE. A value of 0 turns off the max ack length check. Default: 0.
 
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.
 
req
 
Expression that starts a transaction.
 
ack
 
Expression that indicates the transaction is complete.

Description

The assert_handshake assertion checker checks the single-bit expressions req and ack at each rising edge of clk to verify their values conform to the request-acknowledge handshake protocol specified by the checker parameters. A request event (where req transitions to TRUE) initiates a transaction on the rising edge of the clock and an acknowledge event (where ack transitions to TRUE) signals the transaction is complete on the rising edge of the clock. The transaction must not include multiple request events and every acknowledge must have a pending request. Other checks——to ensure the acknowledge is received in a specified window, the request is held active until the acknowledge, the requests and acknowledges are not stuck active and the pulse length is not too long——are enabled and controlled by the checker’s parameters.

When a violation occurs, the checker discards any pending request. Checking is restarted the next cycle that ack is sampled FALSE.

Assertion Checks

 
multiple req violation
The value of req transitioned to TRUE while waiting for an acknowledge or while acknowledge was asserted. Extra requests do not initiate new transactions.
 
ack without req violation
The value of ack transitioned to TRUE without a pending request.
 
ack min cycle violation
The value of ack transitioned to TRUE before min_ack_cycle clock cycles transpired after the request.
 
ack max cycle violation
The value of ack did not transition to TRUE before max_ack_cycle clock cycles transpired after the request.
 
req drop violation
The value of req transitioned from TRUE before an acknowledge.
 
req deassert violation
The value of req did not transition from TRUE before deassert_count clock cycles transpired after an acknowledge.
 
ack max length violation
The value of ack did not transition from TRUE before max_ack_length clock cycles transpired after an acknowledge.

Cover Points

 
req_asserted
A transaction initiated.
 
ack_asserted
A transaction completed.

See also

assert_window, assert_win_change, assert_win_unchange

Examples

assert_handshake #(
 
‘OVL_ERROR,
0,
0,
0,
0,
0,
‘OVL_ASSERT,
“hold-holda handshake error”,
‘OVL_COVER_ALL)
// severity_level
// min_ack_cycle
// max_ack_cycle
// req_drop
// deassert_count
// max_ack_length
// property_type
// msg
// coverage_level
 
valid_hold_holda (
 
 
 
clk,
reset_n,
hold,
holda);
// clock
// reset
// req
// ack

Ensures that multiple hold requests are not made while waiting for a holda acknowledge and that every holda acknowledge is in response to a unique hold request.

After a violation, checking is turned off until holda acknowledge is sampled deasserted.

assert_handshake #(
 
‘OVL_ERROR,
2,
3,
0,
0,
0,
‘OVL_ASSERT,
“hold-holda handshake error”,
‘OVL_COVER_ALL)
// severity_level
// min_ack_cycle
// max_ack_cycle
// req_drop
// deassert_count
// max_ack_length
// property_type
// msg
// coverage_level
 
valid_hold_holda (
 
 
 
clk,
reset_n,
hold,
holda);
// clock
// reset
// req
// ack

Ensures that multiple hold requests are not made while waiting for a holda acknowledge and that every holda acknowledge is in response to a unique hold request. Ensures holda acknowledge asserts 2 to 3 cycles after each hold request.

assert_handshake #(
 
‘OVL_ERROR,
0,
0,
0,
0,
2,
‘OVL_ASSERT,
“hold-holda handshake error”,
‘OVL_COVER_ALL)
// severity_level
// min_ack_cycle
// max_ack_cycle
// req_drop
// deassert_count
// max_ack_length
// property_type
// msg
// coverage_level
 
valid_hold_holda (
 
 
 
clk,
reset_n,
hold,
holda);
// clock
// reset
// req
// ack

Ensures that multiple hold requests are not made while waiting for a holda acknowledge and that every holda acknowledge is in response to a unique hold request. Ensures holda acknowledge asserts for 2 cycles.

assert_handshake #(
 
‘OVL_ERROR,
0,
0,
1,
1,
0,
‘OVL_ASSERT,
“hold-holda handshake error”,
‘OVL_COVER_ALL)
// severity_level
// min_ack_cycle
// max_ack_cycle
// req_drop
// deassert_count
// max_ack_length
// property_type
// msg
// coverage_level
 
valid_hold_holda (
 
 
 
clk,
reset_n,
hold,
holda);
// clock
// reset
// req
// ack

Ensures that multiple hold requests are not made while waiting for a holda acknowledge and that every holda acknowledge is in response to a unique hold request. Ensures hold request remains asserted until its holda acknowledge and then deasserts in the next cycle.


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