Section 5: Run Hardware Emulation - 2023.2 English

Vitis Tutorials: AI Engine (XD100)

Document ID
Release Date
2023.2 English

After packaging, everything is set to run emulation or hardware.

  1. To run emulation use the following command.

    make run_emu SHOW_PLOT=True


    cd ./sw
    cd ..

    This will take between 5 and 10 minutes to fully launch QEMU.

    When launched, use the Linux prompt presented to run the design.

  2. Execute the following command when the emulated Linux prompt displays:

    cd /run/media/mmcblk0p1
    export XILINX_XRT=/usr

    This will set up the design to run emulation. Run the design using the following command:

    ./host.exe a.xclbin

    The host and graph are now running waiting for input from the traffic generators. Your QEMU terminal should look as follows:

    Alt Text

  3. In a new terminal execute with the following command.

    export PYTHONPATH="$XILINX_VIVADO/data/emulation/hw_em/lib/python:$XILINX_VIVADO/data/emulation/python/xtlm_ipc:$XILINX_VIVADO/data/emulation/ip_utils/xtlm_ipc/xtlm_ipc_v1_0/python/:${PYTHONPATH}"
    make run_tgen SHOW_PLOT=True

    In the makefile run_tgen task simply executes the python script.

    For 128 samples (the default amount for this tutorial) - this step will take 1 or 2 minutes to run.

    The default settings for this tutorial is only 128 samples which will execute in the hardware emulation environment quite quickly. A matplotlib window will appear that looks as follows:

    Alt Text

    As you can see in the figure, the output of the DSPLib FFT module matches the expected output.

    When this is shown, run the keyboard command: Ctrl+A x to end the QEMU instance.

IMPORTANT: To rerun the application you need to restart QEMU from scratch.