Axi3 example – Altera Mentor Verification IP Altera Edition AMBA AXI3/4TM User Manual

Page 503

Advertising
background image

VHDL AXI3 and AXI4 Slave BFMs

set_read_data()

Mentor VIP AE AXI3/4 User Guide, V10.2b

483

September 2013

AXI3 Example

-- Wait for the write data burst to complete for the transaction.
get_burst_length(burst_length, read_trans, index, AXI_PATH_4,

axi_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, AXI_PATH_4,

axi_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, i, 0, byte_length, addr, data, index,

AXI_PATH_4, axi_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,

AXI_PATH_4, axi_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, i, j, byte_length, addr, data, index,

AXI_PATH_4, axi_tr_if_4(index));

end loop;

end if;

end loop;

Advertising