
VHDL Tutorials
Verifying a Slave DUT
Mentor VIP AE AXI3/4 User Guide, V10.2b
609
September 2013
which data byte lane will be written into memory. Similarly, you can call the
set_write_strobes() procedure to set the write_strobes[0] transaction field with the value of
4'b0010, indicating that only valid data is being transferred on byte lane 1. The write transaction
then executes on the protocol signals using the execute_transaction() procedure.
All other transaction fields default to legal protocol values (refer to “Master BFM
Configuration” on page 204 for more details).
Example 11-2. Write Transaction Creation and Execution
-- Write data value 1 on byte lanes 1 to address 1.
create_write_transaction(1, tr_id, index, axi_tr_if_0(index));
data_words(31 downto 0) := x"00000100";
set_data_words(data_words, tr_id, index, axi_tr_if_0(index));
set_write_strobes(2, tr_id, index, axi_tr_if_0(index));
report "master_test_program: Writing data (1) to address (1)";
-- By default it will run in Blocking mode
execute_transaction(tr_id, index, axi_tr_if_0(index));
In the complete Master Test Program three subsequent write transactions are created and
executed in a similar manner to that shown in Example 11-2. See “VHDL AXI3 Master BFM
Test Program” on page 731 for details.
Read Transaction Creation and Execution
The code excerpt in Example 11-3 reads the data that has been previously written into the slave
memory. The Master Test Program first creates a read transaction using the
create_read_transaction() procedure, providing only the start address argument of the
transaction. The optional burst-length argument automatically defaults to a value of zero—
indicating a burst length of a single beat.
The set_id() procedure is then called to set the transaction id field to be 1, and the set_size()
procedure sets the transaction size field to be a single byte (AXI_BYTES_1). The read
transaction is then executed onto the protocol signals with a call to the execute_transaction()
procedure.
Kommentare zu diesen Handbüchern