The external traffic generators use Python and require non-standard packages to be installed. Perform the following steps to install these packages.
Make sure you are using the latest version of Python 3. This tutorial has been developed with version 3.6.5. Run the following command to check the version:
python3 --version
Install the appropriate packges using
pip
.pip3 install requirements.txt
This file contains the following packages:
numpy multiprocessing struct matplotlib
Validate your environment by running the following command. If errors are reported during import, rerun
pip
and install the packages manually.python3 -c 'import numpy, matplotlib, struct, multiprocessing'
Add the provided packages for external traffic generators to the
PYTHONPATH
. Run the following command:export PYTHONPATH=${XILINX_VIVADO}/data/emulation/hw_em/lib/python/:${XILINX_VIVADO}/data/emulation/ip_utils/xtlm_ipc/xtlm_ipc_v1_0/python/:$XILINX_VIVADO/data/emulation/python/xtlm_ipc:${PYTHONPATH}
IMPORTANT: Before beginning the tutorial make sure you have read and followed the Vitis Software Platform Release Notes (v2022.2) for setting up software and installing the VCK190 base platform.
Before starting this tutorial run the following steps.
Set up your platform by running the
xilinx-versal-common-v2022.2/environment-setup-cortexa72-cortexa53-xilinx-linux
script as provided in the platform download. This script sets up theSYSROOT
andCXX
variables. If the script is not present, you must runxilinx-versal-common-v2022.2/sdk.sh
.Set up your ROOTFS to point to the
xilinx-versal-common-v2022.2/rootfs.ext4
.Set up your IMAGE to point to
xilinx-versal-common-v2022.2/Image
.Set up your
PLATFORM_REPO_PATHS
environment variable based upon where you downloaded the platform.
Before starting this tutorial, run the following steps.
Set up the following paths in the script
env_setup.sh
:
export XILINX_TOOLS_LOCATION=<Path to Vitis Build - Directory>/Vitis/2022.2
export PLATFORM_REPO_PATHS=<YOUR-PLATFORMS-DIRECTORY>
export XILINX_VERSAL_SW=<Path to xilinx-versal-common-v2022.2 - Directory>
export XILINX_XRT=/<user-path>/opt/xilinx/xrt
export PYTHON3_LOCATION=<user-path>
This env_setup.sh sets the necessary paths to run the tutorial:
ROOTFS
,IMAGE
,SYSROOT
,CXX
, andSDKTARGETSYSROOT
for host software compilation.LIBRARY_PATH
to handle external traffic generator handles.PATH
andPYTHONPATH
for the Python-based external traffic generator.
export PYTHON3_LOCATION=<user-path>
Run the
source env_setup.sh
script in the console.