Compiling PL Kernels - 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

To compile kernels using the Vitis compiler command as described in the Compiling Kernels with Vitis Compiler in the Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393), use the following command syntax:

v++ --compile -t hw_emu --platform xilinx_vck190_base_202120_1 -g \
-k <kernel_name> <kernel>.cpp -o <kernel_name>.xo --save-temps

The v++ command uses the options described in the following table.

Table 1. Vitis Compiler Options
Option Description
--compile Specifies compilation mode.
-t hw_emu Specifies the build target for the compilation process. For more information, see the Build Targets section in Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393).
--platform Specifies the path and name of the target platform. For this example command-line option, it is assumed to have PLATFORM_REPO_PATHS set to the right platform path.
-g Enables the debug features. This is required for emulation modes.
-k Specifies the kernel name. This must match the function name in the specified kernel source file.
-o Specifies the output file name of the compiled Xilinx object file (.xo).
--save-temps Saves the temporary files generated during the compilation process. This is optional.