Before getting into this section, it is expected that you created an AI Engine application in the Vitis IDE and ran AIEsimulation Build and Simulate in the Vitis IDE.
Create a system project manually using the steps mentioned in Port a Command Line Project to the Vitis IDE System Project and download the Vitis IDE exported project (Download Vitis IDE project).
Besides referring to the link provided above to create a system project, make sure to follow the following points to avoid unnecessary issues during the emulation process:
While creating a HW-link project, the Vitis IDE tool, by default, creates a
binary_container_1-link.cfgfile under the{$PROJECT}/system_project/hw_link/directory that contains the connectivity as follows:[connectivity] nk=mm2s:1:mm2s_1 nk=s2mm:2:s2mm_1.s2mm_2 sc=mm2s_1.s:ai_engine_0.inx sc=ai_engine_0.data_shuffle:s2mm_1.s sc=ai_engine_0.upscale_out:s2mm_2.s
If you are porting a command line project to the Vitis IDE environment, make sure to replace the above connectivity statements that start with
nkin yoursystem.cfgfile and add as a source to your HW-Link project.As the AI Engine graph is being loaded by the host PS application, you can defer the running of the graph after the graph has been loaded using the
xrt::graphAPI. By default, the AMD platform management controller (PMC) loads and runs the graph. However, the v++--package.defer_aie_runoption will let you defer the graph run until after the graph has been loaded using thexrt::graphAPI.
Steps to build the system project: Go to the Flow Navigator -> [system_project] component (Section: HARDWARE EMULATION):
a. Select Build Binary Container from
LINK-binary_container_1. Select the checck box to build the components added in the binary container.b. Select Build Package from
PACKAGE.After packaging, everything is set to run emulation. In the Flow Navigator -> [system_project] component -> select Start Emulator -> show waveform -> start :
Select the Run for Time(10us) in the XSIM GUI taskbar, observe the Linux bootup in the Vitis IDE
TASK: EMULATION FOR SYSTEM_PROJECT.
You can stop emulation by clicking In the Flow Navigator -> [system_project] component -> select Stop Emulator.