You can also generate traffic using the existing test bench written in System Verilog/Verilog with slight modification to your test bench hierarchy as explained below.
Figure 1. Test Bench Hierarchy
As shown in the figure above, the external test bench (on the left) and the Vitis emulation (on the right), both run as separate simulation processes. You need to instantiate SIM_IPC Master/Slave modules to establish communication between two processes using IPC.
Perform the following modifications:
- Add IPC modules in the Vitis emulation design. These are
available as prepackaged XOs and you can insert them using the
v++command line as described in AXI4-Stream I/O Model for Streaming Traffic. - Add SIM IPC modules in your SV/V test bench. Instantiate the
ipc_axis_master_mirrormodule inside the Traffic Generator top and make the pin level connection via an SV interface. Theipc_axis_master_mirrorconverts the pin level AXI transactions togeneric_payloadand sends through the IPC sockets to theipc_axis_mastermodule in the Vitis emulation design. Similarly, there is anipc_axis_slave_mirrormodule that is instantiated in the Traffic Generator top to connect to theipc_axis_slavemodule in the Vitis emulation design.