Building and Running the System - 2020.2 English

Versal ACAP AI Engine Programming Environment User Guide (UG1076)

Document ID
UG1076
Release Date
2020-11-24
Version
2020.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 two different build targets: 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 Project Editor window.
  2. Set the Active build configuration in the Project Editor window to either 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 will recognize 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 do your design and debugging in the emulation builds before moving on to the hardware build.
  5. When the build completes, examine the contents of the Emulation-HW build or Hardware build folders in the Explorer view. You can select and expand the folders of the build directories. You will see the output files of the Vitis compiler package process (v++ --package) in the output hierarchy. It generates the emulation data and boot files needed for the system, and writes it to the sd_card folder, or other boot image.
    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 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 Simulator Options for Hardware Emulation, The options can be specified in the Emulator Arguments field shown in the prior figure by specifying the following command:

    -aie-sim-options ../aiesim_options.txt
  7. Select the top-level system project in the Assistant view, and select the Run command () and select the Launch HW Emulator command. This opens the Run Configurations dialog box or launches an existing run configuration.
    Tip: The Run command will prompt you to start the QEMU if you have not already started it.
  8. From the Run Configurations dialog box, select Run to proceed.