Running Traffic Generators in Python/C++ - 2023.1 English

Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393)

Document ID
UG1393
Release Date
2023-07-17
Version
2023.1 English

After generating an external process binary as shown above using the headers and sources available at $XILINX_VIVADO/data/emulation/ip_utils/xtlm_ipc/xtlm_ipc_v1_0/<supported_language>, you can run the emulation using the following steps:

  1. For C++, set the LD_LIBRARY_PATH as export LD_LIBRARY_PATH=$XILINX_VIVADO/data/emulation/cpp/lib:$LD_LIBRARY_PATH
  2. For Python, set the PYTHONPATH as: export PYTHONPATH=$XILINX_VIVADO/data/emulation/hw_em/lib/python:$XILINX_VIVADO/data/emulation/python/xtlm_ipc/
  3. Launch the AMD Vitis™ emulation or AMD Vivado™ simulation or x86sim/aiesim using the standard process and wait for the simulation to start.
  4. From another terminal, launch the external process such as Python/C++/C. Note that if you are running multiple I/O or traffic generator-based solutions on the same machine, then set XTLM_IPC_SOCK_DIR to be unique to each test case on both the emulation terminal as well as the external process terminal. For example, setenv XTLM_IPC_SOCK_DIR <test_case_dir> (same environment on both emulation process and external process).
    Note: The traffic generator executable and hw_emu/sw_emu or x86sim/aiesim should be run in the same server/machine.
Warning: AMD provides an end_of_simulation() API to terminate emulation from master utilities of memory mapped AXI4 and AXI4-Stream interfaces. However, you are warned not to use this method unless there is no way to terminate emulation from host. In a normal course of emulation, external process is not expected to terminate emulation. Use this in exceptional scenarios.