The AXI slave VIP has two agents which are axi_slv_agent and axi_slv_mem_agent . If you want to generate your own traffic, use the axi_slv_agent and get_rd_reactive . The axi_slv_mem_agent has its own method of generating traffic.
The best technique is to place the read response which is shown in the example design simset sim_all_config . The procedure is shown here:
1. In the read driver of the slave agent, use the get_rd_reactive to receive the read command,
2. Fill in the transaction read data information and send it back to the AXI slave VIP interface. Because both the get_rd_reactive and send are blocking, they have to be included in the initial and forever blocks without any blocking events. See the following code example:
//slave VIP agent gets read transaction cmd information, fill in data information and send it back to Slave VIP interface
initial begin
forever begin
slv_agent.rd_driver.get_rd_reactive(rd_reactive);
fill_payload(rd_reactive);
fill_ruser(rd_reactive);
fill_beat_delay(rd_reactive);
slv_agent.rd_driver.send(rd_reactive);
end
end