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

Page 498

Advertising
background image

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

478

VHDL AXI3 and AXI4 Slave BFMs
get_write_addr_data()

September 2013

AXI4 Example

-- Wait for the write data burst to complete for the tr_id transaction.
get_write_data_burst(tr_id, bfm_index, axi4_tr_if_1(bfm_index));

-- Get the burst length of the tr_id transaction.
get_burst_length(burst_length, tr_id, bfm_index,

axi4_tr_if_1(bfm_index));

-- Loop for the length of the data burst.
for i in 0 to burst_length loop

-- Get the address, first data byte and byte length for the
-- data phase (beat)
get_write_addr_data

(tr_id, i, 0, byte_length, addr, data, bfm_index,

axi4_tr_if_1(bfm_index));

-- Store the first data byte in the slave memory using the
-- slave test program do_byte_write procedure
do_byte_write(addr, data);

-- Loop for the number of bytes in the write data phase (beat)
-- given by the byte_length
if byte_length > 1 then

for j in 1 to byte_length-1 loop

-- Get the remaining bytes of the write data phase (beat)
-- and store thenm into the slave memory.
get_write_addr_data

(write_trans, i, j, byte_length, addr, data,

index, axi4_tr_if_1(index));

do_byte_write(addr, data);

end loop;

end if;

end loop;

Advertising