Building and Packaging the System - 2022.2 English

Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393)

Document ID
UG1393
Release Date
2022-12-07
Version
2022.2 English

With the elements of the heterogeneous embedded system design available, you are ready to build the system using the Vitis tools. The v++ --link command is a key part of the system build process, as is the v++ --package command. Both of these commands are shown in the figure below, which highlights the different elements of the system, and how they fit together. At the top of the figure are the extensible platform (.xpfm), the embedded software program (.elf), the PL kernels (.xo), and the AI Engine graph (libadf.a) that are elements of the heterogeneous system. Below those are the linking and packaging commands that build the system.

Figure 1. Building and Packaging the Embedded System Design

System Linking

After the various elements of the embedded system design become available, at least in some initial state, the system can be built using the v++ --link command. The Vitis compiler links the kernel .xo files with the hardware platform and libadf.a to create fixed platform (.xsa) for Versal ACAP devices, or a device executable (.xclbin) for Kria™ SOM, and Zynq MPSoC devices.

As described in Linking the Kernels, the process of linking multiple kernels (.xo), libadf.a, and the extensible platform (.xpfm) starts with a description of the architecture of the system using a configuration file to define the number of kernel instances, or CUs, the memory layout of kernels, and connection of streaming interfaces.

Generation of the device binary or fixed hardware design launches the Vivado synthesis, place, and route tools. The process is broken down into a series of major steps, that can be interrupted to enable customization as explained in Using -to_step and Launching Vivado Interactively, or allows insertion of Tcl scripts as described in Using the -vivado and -advanced Options to help drive the tools to pass timing and deliver the desired results.

Packaging the System

The v++ --package command packages the final product at the end of system linking, and configures the boot system for the device. As stated in Packaging the System, the v++ --package command will also generate the device binary (.xclbin) for Versal platform designs.

The package command controls several aspects of the completed system. For example, in the case of AI Engine designs, the --package.defer_aie_run command indicates that the graph application in the libadf.a should not be started at boot time, and should instead wait until called expressly from a software application. The --package.boot_mode indicates that the system is booted from an SD card, or QSPI/OSPI, and the output produced by the package process is generated accordingly. Refer to --package Options for a complete list of options.

Finally, the --package command lets you define the required files for all platforms to boot and run the embedded system design for software or hardware emulation, or to create an SD card to run your system on hardware. For an embedded system design this process is described in Packaging for Embedded Platforms.

Booting and Running the System

When running the application, you can run software emulation, hardware emulation, or run on the actual physical platform. Running the application on embedded processor platforms is different from running on data center accelerator cards. For more information, refer to Running the Application.
  • When the build target is software or hardware emulation, the QEMU environment models the hardware device. The Vitis compiler generates simulation models of the kernels in the device binary and running the application runs in the QEMU model of the system. As described in Build Targets, emulation targets let you build, run, and iterate the design over relatively quick cycles; debugging the application and evaluating performance.
  • When the build target is the hardware system, the target platform is the physical device. The Vitis compiler generates the .xclbin using the Vivado Design Suite to run synthesis and implementation, and resolve timing. Running the application runs your system on the hardware.