After compiling the AI Engine graph and PL HLS kernels, you can use the Vitis compiler to link them with the platform to generate an XSA file.
With the Vitis tools you can integrate the AI Engine graph and HLS kernels into an existing extensible platform. This step runs automatically. You select a platform provided by the hardware designer or you can choose an extensible base platform from AMD. The Vitis tools then build the hardware design and integrate the AI Engine and PL kernels into the design.
To test this feature in this tutorial, use the base VCK190 platform to build the design.
Run this command with the default values TARGET=hw_emu, N_FIR_FILTERS=1, N_FIR_TAPS=15, FIR_WINDOW_SIZE=256, and EN_TRACE=0:
make xsa
The expanded command is as follows:
cd build/fir_$(N_FIR_TAPS)_taps/x$(N_FIR_FILTERS)_firs/winSz_$(FIR_WINDOW_SIZE)/x$(N_AIE_PER_FIR)_aie_per_fir/hw_emu
v++ -l \
--platform xilinx_vck190_base_202520_1 \
--save-temps \
--temp_dir build/fir_$(N_FIR_TAPS)_taps/x$(N_FIR_FILTERS)_firs/winSz_$(FIR_WINDOW_SIZE)/x$(N_AIE_PER_FIR)_aie_per_fir/hw_emu/_x \
--verbose \
-g \
--clock.defaultTolerance 0.001 \
--clock.freqHz 300000000:datamover_0 \
--config $(SYSTEM_CONFIGS_REPO)/system.cfg \
-t hw_emu \
-o vck190_aie_fir.hw_emu.xsa \
datamover.hw_emu.xo \
../libadf.a
If EN_TRACE is active, also set these v++ flags:
--profile.trace_memory DDR \
--profile.data datamover:datamover_0:all \
--profile.data ai_engine_0.DataIn \
--profile.data ai_engine_0.DataOut
These flags capture trace data from the specified ports.
Summary of the switches used:
Switch |
Description |
|---|---|
–platform | -f |
Specifies the name of a supported acceleration platform from the |
–save-temps | -s |
Directs the |
–temp_dir |
Manages the location where the tool writes temporary files created during the build process. The Vitis compiler writes the temporary results, and then removes them unless you specify the |
–verbose |
Displays verbose and debug information. |
-g |
Generates code for debugging the kernel during software emulation. Use this option to add features to facilitate debugging the kernel as it compiles. |
–clock.freqHz <freq_in_Hz>:<cu>[.<clk_pin>] |
Specifies a clock frequency in Hz and assigns it to a list of associated compute units (CUs) and optional clock pins on the CU. |
–config <config_file> |
Specifies a configuration file containing |
–target | -t [hw|hw_emu] |
Specifies the build target. |
–output | -o |
Specifies the name of the output file generated by the |
–profile.data [<kernel_name>|all]:[<cu_name>|all]:[<interface_name>|all](:[counters|all]) |
Enables monitoring of data ports through the monitor IPs. Specify this option during linking. Detailed Profiling Options |
–profile.trace_memory <FIFO>:<size>|<MEMORY>[<n>] |
Specifies the type and amount of memory to use for capturing trace data when building the hardware target (-t=hw). Detailed Profiling Options |
Detailed Description of All Vitis Compiler Switches Linking the Kernels in Vitis
Inputs Sources |
Description |
|---|---|
datamover.hw/hw_emu.xo |
The data-mover kernel object file. |
libadf.a |
Compiled AI Engine design graph |
Output Objects |
Description |
|---|---|
vck190_aie_fir.hw_emu.xsa |
Compiled Platform Binary Container |