1. Compiling HLS Kernels using v++ - 2023.2 English

Vitis Tutorials: AI Engine (XD100)

Document ID
Release Date
2023.2 English

To compile the mm2s, and s2mm PL HLS kernels, use the v++ compiler command which takes in an HLS kernel source and produces an .xo file.

To compile the kernels, run the following command:

make kernels


v++ -c -t sw_emu --platform $PLATFORM_REPO_PATHS/xilinx_vek280_es1_base_202320_1/xilinx_vek280_es1_base_202320_1.xpfm --save-temps -k s2mm pl_kernels/s2mm.cpp -o s2mm.xo
v++ -c -t sw_emu --platform $PLATFORM_REPO_PATHS/xilinx_vek280_es1_base_202320_1/xilinx_vek280_es1_base_202320_1.xpfm --save-temps -k mm2s pl_kernels/mm2s.cpp -o mm2s.xo

Looking at the v++ command line, you will notice several options. The following table describes each option.

Switch/flag Description
-c Tells v++ to just compile the kernel.
-t Specifies the compilation target for software emulation.
--platform/-f Specifies the path to an extensible platform.
-k The kernel name. This has to match the function name in the corresponding file defining the kernel. (E.g., For kernel mm2s the function name needs to be mm2s.cpp.
-o The output file must always have the suffix .xo.
--save-temps/-s Saves the generated output process in the _x directory.