
Mentor Verification IP AE AMBA AXI4-Stream User Guide, V10.3
126
VHDL Slave BFM
VHDL Slave BFM API
April 2014
Example 9-2. Slave 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));
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 9-2 and assign the assertion within the
AXI4STREAM_CONFIG_ENABLE_ASSERTION bit vector to 1.
For a complete listing of assertions, refer to “Assertions” on page 205.
VHDL Slave BFM API
This section describes the VHDL Slave BFM API.
Each procedure available within the slave BFM API is detailed in the following chapter. The
set*() and get*() procedures that operate on the Transaction Record fields have a simple rule for
the procedure name: set_ or get_ followed by the name of the transaction field to be accessed.
Refer to “Transaction Record” on page 23 for details of transaction field names.
The slave BFM API package is the axi4stream/bfm/mgc_axi4stream_bfm_pkg.vhd file
packaged within the Mentor Verification IP Altera Edition.
Kommentare zu diesen Handbüchern