Building and Running the System - 2021.2 English

Versal ACAP AI Engine Programming Environment User Guide (UG1076)

Document ID
UG1076
ft:locale
English (United States)
Release Date
2021-12-17
Version
2021.2 English
With the top-level system project defined, the AI Engine graph application added, the PL kernels added, the PS application added, and the HW-Link project configured, you are now ready to build and run the system.

The system project supports three different build targets: Emulation-SW, Emulation-HW, and Hardware. You can build the top-level system project using the following steps.

  1. Double-click the <project>.sprj file in the Explorer view to open the system project in the editor area.
  2. Set the Active build configuration in the Project Editor window to either Emulation-SW, Emulation-HW, or Hardware to select a specific build target.
  3. In the Assistant view, select the top-level project and click the Settings command () to display the System Project Settings dialog box and make any needed changes prior to the build.
  4. Click the Build command () in the toolbar menu to start the build process for the active build configuration. The build process in the Vitis IDE is incremental and will only build elements of the project that have been updated and need to be rebuilt after the last build. You can build the individual elements of the system project, such as the AI Engine graph or PL kernels, and the tool recognizes whether these elements need to be rebuilt.
    Note: The build process for hardware takes considerably longer to run than the build for emulation. This is why it is important to debug your design in the emulation build before moving on to the hardware build.
  5. When the build completes, examine the contents of the Emulation-SW, Emulation-HW, or Hardware build folders in the Explorer view. You can select and expand the folders of the build directories. You can see the output files of the Vitis compiler package process (v++ --package) in the output hierarchy. The build process generates the emulation data and boot files needed for the system, and writes them to the sd_card folder.
    Note: Two folders are created under the Hardware folder, package and package_no_aie_debug. The sd_card.img file within the package folder is for hardware debug purposes whereas the sd_card.img file in the package_no_aie_debug folder is for regular application execution.
    Important: In an AI Engine system project you can debug and run the system-level project, or debug and run the AI Engine project. You cannot debug and run the PS or PL projects except as part of the top-level system project.
  6. For software emulation builds, start the QEMU emulation environment by selecting the Xilinx > Start/Stop Emulator command.

    This launches the emulator and then waits until Linux is booted within the QEMU. The Emulation console shows a transcript of the QEMU launch and Linux boot process. You can tell when the process has completed when the progress dialog closes and the qemu% prompt is black. You can examine the transcript for details of this process.

    When launching software emulation, you can specify options for the AI Engine simulator that runs the graph application, as described in Reusing x86 Simulator Options. The options can be specified in the Emulator Arguments field shown in the preceding figure by specifying the following command.

    -aie-sim-options ${FULL_PATH}/x86sim.options
  7. For hardware emulation builds, start the QEMU emulation environment by selecting the Xilinx > Start/Stop Emulator command.

    This launches the emulator and then waits until Linux is booted within the QEMU. The Emulation console shows a transcript of the QEMU launch and Linux boot process. You can tell when the process has completed when the progress dialog closes and the qemu% prompt is black. You can examine the transcript for details of this process.

    When launching hardware emulation, you can specify options for the AI Engine simulator that runs the graph application, as described in Reusing AI Engine Simulator Options. The options can be specified in the Emulator Arguments field shown in the preceding figure by specifying the following command.

    -aie-sim-options ${FULL_PATH}/aiesim_options.txt
  8. From the Run Configurations dialog box, select Run to proceed.