Example 11-13, Reads the first two data beats – Altera Mentor Verification IP Altera Edition AMBA AXI3/4TM User Manual
Page 639

VHDL Tutorials
Verifying a Slave DUT
Mentor VIP AE AXI3/4 User Guide, V10.2b
619
September 2013
Note
The burst length argument passed to the
procedure is 1 less
than the number of transfers (beats) in the burst. This aligns the burst length argument
value with the value placed on the ARLEN protocol signals.
The read transaction is then executed onto the protocol signals by calling the
procedure. The read data is obtained by calling the
procedure twice to get the data_words transaction field values. The result of the read data is
compared with the expected data—and a message displays the transcript.
Example 11-13. Read Burst Transaction Creation and Execution
create_read_transaction(16, 1, tr_id, index, axi4_tr_if_0(index));
execute_transaction(tr_id, index, axi4_tr_if_0(index));
get_data_words(data_words, 0, tr_id, index, axi4_tr_if_0(index));
if(data_words(31 downto 0) = x"ACE0ACE1") then
report "master_test_program: Read correct data (hACE0ACE1) at
address (16)";
else
hwrite(lp, data_words(31 downto 0));
report "master_test_program: Error: Expected data (hACE0ACE1) at
address (16), but got " & lp.all;
end if;
get_data_words(data_words, 1, tr_id, index, axi4_tr_if_0(index));
if(data_words(31 downto 0) = x"ACE2ACE3") then
report "master_test_program: Read correct data (hACE2ACE3) at
address (20)";
else
hwrite(lp, data_words(31 downto 0));
report "master_test_program: Error: Expected data (hACE2ACE3) at
address (20), but got " & lp.all;
end if;
In the complete Master Test Program, a subsequent read transaction is created and executed in a
similar manner to that shown in
VHDL AXI4 Master BFM Test Program
listing for details.
Outstanding Write Burst Transaction Creation and Execution
The code excerpt in
procedure to create a write burst transaction by providing the start address and burst length
arguments. The actual length of the burst on the protocol wires is 3+1=4.
Note
The burst length argument passed to the
procedure is 1 less
than the number of transfers (beats) in the burst. This aligns the burst length argument
value with the value placed on the ARLEN protocol signals.