Running Hardware Emulation - 2022.1 English

Versal ACAP AI Engine Programming Environment User Guide (UG1076)

Document ID
Release Date
2022.1 English

To build the project for hardware emulation confirm that the target option of the V++ link command is target=hw_emu. Next, the v++ --package command generates the script as part of the process for packaging the system. This script launches the emulation environment for the AI Engine application for test and debug purposes. Hardware emulation runs the AI Engine simulator for the graph application, runs the Vivado logic simulator for the PL kernels, and runs QEMU for the PS host application.

Use the following command to launch hardware emulation from the command line.

./ --graphic-xsim
Note: The --graphic-xsim switch is optional and launches the Vivado logic simulator window where you can specify what signals from the design you want to view. It does not include internal AI Engine signals. Here, you must click the Run All button in the window to continue execution.

The script launches QEMU in system mode, and loads and runs the AI Engine application, running the PL kernels in the Vivado simulator. If the emulation flow completes successfully, at the end of the emulation you should see something like the following:

[LAUNCH_EMULATOR] INFO: 09:44:09 : PS-QEMU exited
[LAUNCH_EMULATOR] INFO: 09:44:09 : Simulation exited
pmu_path /scratch/aie_test1/hw_emu_pmu.log
pl-sim_dir /scratch/aie_test1/sim/behav_waveform/xsim
Please refer PS /simulate logs at /scratch/aie_test1 for more details.
INFO: Emulation ran successfully

When launching hardware emulation, you can specify options for the AI Engine simulator that runs the graph application. The options can be specified from the script using the -aie-sim-options as described in Reusing AI Engine Simulator Options.

When the emulation is fully booted and the Linux prompt is up, make sure to set the following environment variables in the QEMU environment.

export XILINX_XRT=/usr
export LD_LIBRARY_PATH=/mnt/sd*1:
export XCL_EMULATION_MODE=hw_emu

This ensures that the host application works. Note that this also must be done when running on hardware.