Example – Altera Mentor Verification IP Altera Edition AMBA AXI4-Lite User Manual
Page 278
Mentor Verification IP AE AXI4-Lite User Guide, V10.3
278
VHDL Slave BFM
set_read_data()
April 2014
Example
-- Get the byte address and number of bytes in the data phase (beat).
get_read_addr(read_trans, 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.
set_read_data
(read_trans, 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, 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 next read data byte for the read_trans transaction.
set_read_data
(read_trans, j, byte_length, addr, data, index,
AXI4_PATH_4, axi4_tr_if_4(index));
end loop;
end if;