Altera Mentor Verification IP Altera Edition AMBA AXI4-Stream User Manual

Page 160

Advertising
background image

Mentor Verification IP AE AMBA AXI4-Stream User Guide, V10.3

160

VHDL Monitor BFM
Monitor Assertions

April 2014

By default, all built-in assertions are enabled in the monitor BFM. To globally disable them in
the monitor BFM, use the

set_config()

command as shown in

Example 10-1

.

Example 10-1. Monitor BFM Disable All Assertions

set_config(AXI4STREAM_CONFIG_ENABLE_ALL_ASSERTIONS,0,bfm_index,
axi4stream_tr_if_0(bfm_index));

Alternatively, you can disable individual built-in assertions by using a sequence of

get_config()

and

set_config()

commands on the respective assertion.

Example 10-2

shows how to disable

assertion checking for the TLAST signal changing between the TVALID and TREADY
handshake signals.

Example 10-2. Monitor BFM Individual Assertion Enable/Disable

-- Define a local bit vector to hold the value of the assertion bit vector
variable config_assert_bitvector :
std_logic_vector(AXI4STREAM_MAX_BIT_SIZE-1 downto 0);

-- Get the current value of the assertion bit vector
get_config(AXI4STREAM_CONFIG_ENABLE_ASSERTION, config_assert_bitvector,
bfm_index, axi4stream_tr_if_0(bfm_index));

-- Assign the AXI4STREAM_TLAST_CHANGED_BEFORE_TREADY assertion bit to 0
config_assert_bitvector(AXI4STREAM_TLAST_CHANGED_BEFORE_TREADY) := ‘0’;

-- Set the new value of the assertion bit vector
set_config(AXI4STREAM_CONFIG_ENABLE_ASSERTION, config_assert_bitvector,
bfm_index, axi4stream_tr_if_0(bfm_index));

Note

Do not confuse the AXI4STREAM_CONFIG_ENABLE_ASSERTION bit vector with
the AXI4STREAM_CONFIG_ENABLE_ALL_ASSERTIONS global enable/disable.

To re-enable the AXI4STREAM_TLAST_CHANGED_BEFORE_TREADY assertion, follow
the code sequence in

Example 10-2

and assign the assertion enable within the

AXI4STREAM_CONFIG_ENABLE_ASSERTION bit vector to 1.

For a complete listing of assertions, refer to “

Assertions

” on page 205.

Advertising