Running the system depends on the build target. The process of running the hardware emulation build is different from running the hardware build.
For the hardware build, copy the contents of the sd_card
folder produced by the package process to an actual SD card.
That device becomes the boot device for your system. Boot your system and launch
your application as designed. To capture event trace data when running the hardware,
see Performance Analysis of AI Engine Graph Application. To debug the running hardware, see Debugging the AI Engine Application.
For hardware emulation the --package
command generates the launch_hw_emu.sh script as part of the process of packaging the
system. You can use this script to launch 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 (XSIM) for the PL kernels, and runs QEMU for the PS host
application.
Use the following command to launch hardware emulation from the command line:
./launch_hw_emu.sh -graphic-xsim
-graphic-xsim
launches the XSIM 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 press the
Run All button in the window to
continue execution.The launch_hw_emu.sh 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 : PMU/PMC-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.
DONE!
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 launch_hw_emu.sh script using the -aie-sim-options
as described in Simulator Options for Hardware Emulation.
When the emulation is fully booted and the Linux prompt is up, make sure to set the following environment variable:
export XILINX_XRT=/usr
This will ensure that the host application will work. Note that this also must be done when running on hardware.