Read burst transaction creation and execution, Example 6-13 – Altera Mentor Verification IP Altera Edition AMBA AXI3/4TM User Manual
Page 168

Mentor VIP AE AXI3/4 User Guide, V10.2b
150
SystemVerilog Tutorials
Verifying a Slave DUT
September 2013
The call to set_write_data_mode(AXI4_DATA_WITH_ADDRESS) function configures the write
burst transaction to allow the write address phase and write data burst to start simultaneously
when executed. The write transaction is then executed onto the protocol signals.
Example 6-13. Write Burst Transaction Creation and Execution
// Write data burst length of 7 to start address 16.
trans = bfm.create_write_transaction(16, 7);
trans.set_size(AXI4_BYTES_4);
trans.set_data_words('hACE0ACE1, 0);
trans.set_data_words('hACE2ACE3, 1);
trans.set_data_words('hACE4ACE5, 2);
trans.set_data_words('hACE6ACE7, 3);
trans.set_data_words('hACE8ACE9, 4);
trans.set_data_words('hACEAACEB, 5);
trans.set_data_words('hACECACED, 6);
trans.set_data_words('hACEEACEF, 7);
for(int i=0; i<8; i++)
trans.set_write_strobes(4'b1111, i);
trans.set_write_data_mode(AXI4_DATA_WITH_ADDRESS);
$display ( "@ %t, master_test_program: Writing data burst of length 7 to
start address 16", $time);
bfm.execute_transaction(trans);
In the complete Master Test Program, a subsequent write data burst transaction has lane 0 of the
first data beat of the burst configured to be invalid, by setting the least significant bit of the
write_strobes[0] field to zero.
trans.set_write_strobes(4'b1110, 0);
See
SystemVerilog AXI4 Master BFM Test Program
listing for details.
Read Burst Transaction Creation and Execution
The code excerpt in
reads the first two data beats from the data burst that has
been previously written into the slave memory. The call to
function
creates the read burst transaction trans by providing the start address and burst length
arguments. The actual length of the burst on the protocol signals is 1+1=2.
Note
The burst length argument passed to the
the number of transfers (beats) in the burst. This aligns the burst length argument value
with the value placed on the ARLEN protocol signals.