Handle_read, Example 11-36. process_read, Example 11-36 – Altera Mentor Verification IP Altera Edition AMBA AXI3/4TM User Manual
Page 665

VHDL Tutorials
Verifying a Master DUT
Mentor VIP AE AXI3/4 User Guide, V10.2b
645
September 2013
The loop completes and restarts by creating a new slave transaction and blocks for another write
address phase to occur.
Example 11-36. process_read
-- process_read : read address phase through path 3
-- This process keep receiving read address phase and push
-- the transaction into queue through push_transaction_id API.
process
variable read_trans: integer;
begin
set_config(
AXI4_CONFIG_MAX_OUTSTANDING_RD, m_max_outstanding_read_trans,
index, axi4_tr_if_3(index));
wait_on(AXI4_RESET_0_TO_1, index, AXI4_PATH_3,
axi4_tr_if_3(index));
wait_on(AXI4_CLOCK_POSEDGE, index, AXI4_PATH_3,
axi4_tr_if_3(index));
loop
create_slave_transaction(read_trans, index, AXI4_PATH_3,
axi4_tr_if_3(index));
get_read_addr_phase(read_trans, index, AXI4_PATH_3,
axi4_tr_if_3(index));
get_config(AXI4_CONFIG_NUM_OUTSTANDING_RD_PHASE,
tmp_config_num_outstanding_rd_phase, index,
AXI4_PATH_3, axi4_tr_if_3(index));
push_transaction_id(read_trans, AXI4_QUEUE_ID_1, index,
AXI4_PATH_3, axi4_tr_if_3(index));
end loop;
wait;
end process;
handle_read
The handle_read process gets read data from the
as a burst or phase (beat),
depending on the
configuration. It uses unique path and queue identifiers to work
concurrently with other processes.
In a loop, the
procedure call returns the transaction_id from the queue for
the slave BFM, indexed by the index argument, as shown in
below. A
read_trans variable is previously defined to hold the transaction_id. If the queue is empty then
will block until content is available.
The call to
configures the RVALID signal delay for each phase
(beat) of the burst, and
returns the burst_length of the read transaction.
In a loop, the call to the
helper procedure returns the actual address addr for a
particular byte location and the byte_length of the data phase (beat). This byte address is used
to read the data byte from
, and the
helper procedure sets the byte in the read transaction record. If the returned
byte_length>1 then the code performs in the byte_length loop the reading and setting of the read
data from internal memory for the whole of the read data phase (beat).