Building the Device Binary

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

Document ID
UG1393
ft:locale
English (United States)
Release Date
2021-12-15
Version
2021.2 English

The kernel code is written in C, C++, OpenCL™ C, or RTL, and is built by compiling the kernel code into a Xilinx® object (XO) file, and linking the XO files into a Xilinx binary (.xclbin) file, as shown in the following figure.

Figure 1. Device Build Process

The process, as outlined above, has two steps:

  1. Build the Xilinx object files from the kernel source code.
    • For C, C++, or OpenCL kernels, the v++ -c command compiles the source code into Xilinx object (XO) files. Multiple kernels are compiled into separate XO files.
    • For RTL kernels, theVivado IP packager command produces the XO file to be used for linking. Refer to RTL Kernels for more information.
    • You can also create kernel object (XO) files working directly in the Vitis™ HLS tool. Refer to Compiling Kernels with Vitis HLS for more information.
  2. After compilation, the v++ -l command links one or multiple kernel objects (XO), together with the hardware platform XSA file, to produce the Xilinx binary .xclbin file.
Tip: The v++ command can be used from the command line, in scripts, or a build system like make, and can also be used through the Vitis IDE as discussed in Using the Vitis IDE.