
SystemVerilog Tutorials
Verifying a Master DUT
Mentor VIP AE AXI3/4 User Guide, V10.2b
177
September 2013
In the fork-join_none block, the read_trans record is passed into the handle_read() function via
the variable t.
Example 6-43. process_read()
// Task : process_read
// This method keep receiving read address phase and calls another
// method to process received transaction.
task process_read;
forever
begin
axi4_transaction read_trans;
read_trans = bfm.create_slave_transaction();
bfm.get_read_addr_phase(read_trans);
fork
begin
automatic axi4_transaction t = read_trans;
handle_read(t);
end
join_none
#0;
end
endtask
handle_read()
The handle_read() task gets the data from the Internal Memory as a burst or a phase (beat),
depending on the slave_mode configuration. The read_trans argument contains the record of
the read transaction up to the point of this task call, namely the content of the read address
phase.
The call to set_read_data_valid_delay() configures the RVALID signal delay for each phase
(beat).
In a loop the call to the get_read_addr() helper function returns the actual address addr for a
particular byte location. This byte address is used to read the data byte from Internal Memory
with the call to the do_byte_read() function, assigning the local mem_data variable with read
data do_byte_read(). The call to the set_read_data() helper function sets the byte with in the
read transaction record. The loop continues reading and setting the read data from internal
memory for the whole of the read data phase (beat).
If the slave_mode configuration is set to the default of AXI4_TRANSACTION_SLAVE then the
loop continues until the read data has been set for the whole burst. Otherwise the individual read
data phase is executed over the protocol signals by calling the execute_read_data_phase().
Commentaires sur ces manuels