In this step, you use the Vitis compiler to compile any kernels (RTL or HLS C) in the PL region of the target platform xilinx_vck190_base_202520_1 into their respective XO files.
Run the following commands to compile kernels (default TARGET=hw_emu, N_FIR_FILTERS=1, N_FIR_TAPS=15, EN_TRACE=0):
make kernels
The expanded command sequence is:
mkdir -p build/fir_$(N_FIR_TAPS)_taps/x$(N_FIR_FILTERS)_firs/hw_emu
cd build/fir_$(N_FIR_TAPS)_taps/x$(N_FIR_FILTERS)_firs/hw_emu
v++ --target hw_emu \
--hls.pre_tcl design/directives/hls_pre.tcl \
--hls.clock 500000000:fir_hls \
-D N_FIR_FILTERS=$(N_FIR_FILTERS) \
-D N_FIR_TAPS=$(N_FIR_TAPS) \
--platform xilinx_vck190_base_202520_1 \
--include design/pl_src \
--save-temps \
--temp_dir build/fir_$(N_FIR_TAPS)_taps/x$(N_FIR_FILTERS)_firs/hw_emu/_x \
--verbose \
-g -c \
-k fir_hls \
design/pl_src/fir_hls.cpp \
-o fir_hls.hw_emu.xo
v++ --target hw_emu \
--hls.clock 300000000:datamover \
-D N_FIR_FILTERS=$(N_FIR_FILTERS) \
-D N_FIR_TAPS=$(N_FIR_TAPS) \
--platform xilinx_vck190_base_202520_1 \
--include design/pl_src \
--save-temps \
--temp_dir build/fir_$(N_FIR_TAPS)_taps/x$(N_FIR_FILTERS)_firs/hw_emu/_x \
--verbose \
-g -c \
-k datamover \
design/pl_src/datamover.cpp \
-o datamover.hw_emu.xo
Summary of the switches used:
Switch |
Description |
|---|---|
–target | -t [hw|hw_emu] |
Specifies the build target. |
–hls.clock |
Sets kernel compile frequency in Hz for Vitis HLS. |
–platform | -f |
Specifies acceleration platform from |
–save-temps | -s |
Directs the Vitis compiler command to save intermediate files and directories created during compilation and linking. Use |
–temp_dir |
Manages the location where the tool writes temporary files created during the build process. The Vitis compiler removes them unless you specify |
–verbose |
Displays verbose and debug information. |
-g |
Generates code with debugging features for software emulation. |
–compile | -c |
Generates XO files from kernel sources. |
–kernel <arg>|-k <arg> |
Compiles only the specified kernel from input file. |
–output | -o |
Specifies the name of the output file generated by the V++ command. The compilation process output name must end with the XO file suffix. |
Detailed Description of All Vitis Compiler Switches
Input |
Description |
|---|---|
fir_hls.cpp |
The FIR filter chain PL kernel source code. |
datamover.cpp |
The data-mover PL kernel source code. |
Output |
Description |
|---|---|
fir_hls.hw/hw_emu.xo |
The FIR filter chain PL kernel object file. |
datamover.hw/hw_emu.xo |
The stream-to-memory-mapped data-mover kernel object file. |