Application program interface, Assertion checking, Set_enable_a_empty_legal() – Altera Avalon Verification IP Suite User Manual

Page 112: Set_enable_a_less_than_max_channel(), Set_enable_a_no_data_outside_packet(), Application program interface –3, Assertion checking –3

Advertising
background image

Chapter 5: Avalon-ST Monitor

5–3

Application Program Interface

May 2011

Altera Corporation

Avalon Verification IP Suite User Guide

Application Program Interface

This section describes the API for the Avalon-ST Monitor.

Assertion Checking

Assertion checking methods enable and disable protocol assertions that are used to
ensure protocol compliance. For example, the

enable_a_no_data_outside_packet

method enables the assertion that verifies that no data is transmitted between the
assertion of the

endofpacket

and the next

startofpacket

signals. If a violation is

found, an error message is displayed on the console running the simulation. Error
flags also are displayed in the waveform viewer. By default all assertions are enabled.
However, depending on the parameterization of a the Avalon-ST interface, some
assertions are automatically disabled. For example, you might have to disable some
assertion checking to avoid generating error messages when injecting protocol errors
to test the Avalon-ST component’s error handling capability. The names of all
methods that implement assertions begin with

set_enable_a

. By default, if your

testbench includes the Avalon-ST monitor, the checking function is enabled. You can
disable checking with the

DISABLE_ALTERA_AVALON_SIM_SVA

macro.

set_enable_a_empty_legal()

set_enable_a_less_than_max_channel()

set_enable_a_no_data_outside_packet()

Prototype:

set_enable_a_empty_legal().

Arguments:

Boolean

.

Returns:

Void

.

Description:

Enables an assertion that ensures

empty

is 0 except when

endofpacket

is

asserted and that

empty

is always less than the number of symbols in a

packet.

Prototype:

set_enable_a_less_than_max_channel().

Arguments:

Boolean

.

Returns:

Void

.

Description:

Enables an assertion that ensures that the value of the

channel

signal is

less than the maximum number of channels.

Prototype:

set_enable_a_no_data_outside_packet().

Arguments:

Boolean

.

Returns:

Void

.

Description:

Enables an assertion that ensures

valid

data is not transferred outside of

a packet when the interface uses packet transmission.

Advertising