Axi4 example – Altera Mentor Verification IP Altera Edition AMBA AXI3/4TM User Manual
Page 501

VHDL AXI3 and AXI4 Slave BFMs
get_read_addr()
Mentor VIP AE AXI3/4 User Guide, V10.2b
481
September 2013
AXI4 Example
-- Get the burst length of the read_trans transaction.
get_burst_length(burst_length, read_trans, index, AXI4_PATH_4,
axi4_tr_if_4(index));
-- Loop for the length of the data burst.
for i in 0 to burst_length loop
-- Get the byte address and number of bytes in the data phase (beat).
get_read_addr
(read_trans, i, 0, byte_length, addr, index,
AXI4_PATH_4, axi4_tr_if_4(index));
-- Retrieve the first data byte from the slave memory using the
-- slave test program do_byte_read procedure.
do_byte_read(addr, data);
-- Set the first read data byte for the read_trans transaction_id.
set_read_data(read_trans, i, 0, byte_length, addr, data, index,
AXI4_PATH_4, axi4_tr_if_4(index));
-- Loop for the number of bytes in the data phase (beat)
-- given by the byte_length.
if byte_length > 1 then
for j in 1 to byte_length-1 loop
-- Get the next read data byte address.
get_read_addr
(read_trans, i, j, byte_length, addr, index,
AXI4_PATH_4, axi4_tr_if_4(index));
-- Retrieve the next data byte from the slave memory using the
-- slave test program do_byte_read procedure
do_byte_read(addr, data);
-- Set the read data byte for the read_trans transaction.
set_read_data(read_trans, i, j, byte_length, addr, data,
index, AXI4_PATH_4, axi4_tr_if_4(index));
end loop;
end if;
end loop;