The following explains the different sub-build steps. Click on each item for more detailed information.
Each step is sequential (in the order listed - by the [project-root]/Makefile
):
make version_check
Checks if the Vivado, Petalinux (Only when
export SW_BUILD_TOOL := petalinux
) and Vitis tools are setup and if the versions are 2024.2.
make vivado_platform
[project-root]/vivado
Directory/file structure:
| Directory/file | Description
| ——————–|————————————————————–
| Makefile | The vivado platform Makefile
| vck190/* | The vivado platform sources for the VCK190
| vek280/* | The vivado platform sources for the VEK280
| vek280_es1/* | The vivado platform sources for the VEK280_ES1
export XPFM_PRE_BUILDS := false
Builds the output file needed for Petalinux/Yocto and Vitis software platform creation ->
[project-root]/vivado/build/xsa_platform/${BOARD_NAME}_thin.xsa
.After this step you could open the platform blockdesign in Vivado for review:
[project-root]/vivado/build/${BOARD_NAME}_thin_vivado
$ vivado${BOARD_NAME}_thin.xpr
export XPFM_PRE_BUILDS := true
Setup the project to use the pre-build xsa
make vitis_platform
[project-root]/vitis/platform
Directory/file structure:
| Directory/file | Description
| ——————–|————————————————————–
| Makefile | The vitis platform Makefile
| src/* | The vitis platform sources
export XPFM_PRE_BUILDS := false
Builds the platform needed for ip and Vitis ->
[project-root]/vitis/platform/build/${BOARD_NAME}_thin/export/${BOARD_NAME}_thin/${BOARD_NAME}_thin.xpfm
Builds the software platform needed for Vitis ->
[project-root]/vitis/platform/build/${BOARD_NAME}_thin/export/${BOARD_NAME}_thin/sw/*
export XPFM_PRE_BUILDS := true
Setup the project to use the xpfm pre-builds
make linux
[project-root]/linux/src
Directory/file structure:
| Directory/file | Description
| ————————————————-|——————————————————————————————-
| recipes-bsp/device-tree/* | Linux-recipe and files needed for some device-tree changes needed for VCK190/VEK280(+es1)
| recipes-bsp/init-ifupdown/* | Linux-recipe and configuration file that needs to be setup for builds with export LINUX_ETH_CONFIG := STATIC
| recipes-core/base-files/* | Linux-recipe needed to automount mmcblk0p1 for builds with export SW_BUILD_TOOL := yocto
| boot_custom.bif | Bif file with <placeholders> needed to have the Vitis packager generating a correct BOOT.BIN
[project-root]/linux/petalinux
Directory/file structure:
| Directory/file | Description
| ——————–|————————————————————–
| Makefile | The Petalinux Makefile
| src/config | A script used to exchange/add Petalinux configuration items
[project-root]/linux/yocto
Directory/file structure:
| Directory/file | Description
| ——————–|————————————————————–
| Makefile | The Yocto Makefile
| src/conf/auto.conf | Yocto Build Configuration File
export LINUX_PRE_BUILDS := false
Builds all required linux (Petalinux or Yocto) images which end up in
[project-root]/linux/${BOARD_NAME}-versal/images/linux
.It also builds a
sysroot
which ends up in[project-root]/linux/sysroot
; needed for[project-root]/ps_apps/linux
builds.
export LINUX_PRE_BUILDS := true
Sets up the project to use the Linux pre-builds
make dtg
[project-root]/linux/dtg
Directory/file structure:
| Directory/file | Description
| —————————————————–|——————————————————————————————-
| Makefile | The device-tree generator Makefile
| src/build_dts.tcl | XSCT-tcl-script used to build the device-tree out of a generated xsa
| src/system-user.dtsi | Additional device-tree settings
Only used when
export XPFM_PRE_BUILDS := false
andexport LINUX_PRE_BUILDS := true
Builds the device-tree out of the generated xsa
make bif
Some necessary Copying of linux image-files to the software platform for a correct Vitis packaging
make vitis_ip
[project-root]/vitis/ip
Directory/file structure:
| Directory/file | Description
| ——————–|————————————————————–
| Makefile | The ip generic Makefile; it automatically searches for sub-projects to build
| aie/* | aie “datamover” kernel Makefile and sources
| counter/* | free-running RTL “counter” kernel Makefile and sources that feeds the aie “datamover” kernel
| subtractor/* | Managed RTL “subtractor” kernel Makefile and sources that measures the delay between the counter-input and the aie-output
| vadd_mm/* | XRT-controlled HLS vadd memory mapped kernel Makefile and sources
| vadd_s/* | XRT-controlled HLS vadd streaming kernel Makefile and sources
| mm2s_vadd_s/* | XRT-controlled HLS memory-to-streaming kernel used with vadd_s Makefile and sources
| s2mm_vadd_s/* | XRT-controlled HLS streaming-to-memory kernel used with vadd_s Makefile and sources
Builds the output files needed for Vitis linker ->
[project-root]/vitis/ip/aie/libadf.a
and[project-root]/vitis/ip/xo_hw/*.xo
Kernel structure/flow:
vadd_mm is a memory mapped kernel
mm2s_vadd_s -> vadd_s -> s2mm_vadd_s
counter -> aie “datamover” -> subtractor
make full_impl
[project-root]/vitis
Directory/file structure:
| Directory/file | Description
| ——————–|———————————————————
| Makefile | The Vitis generic Makefile for linker and packager
| src/system.cfg | Vitis Linker Configuration: kernel-connections, clocks and memory-ports
| src/ila_0_bd.cfg | ILA Vitis connection needed for Vitis linker when export ILA_EN := 1
| src/ila_0_def.tcl | ILA Vitis tcl needed for Vitis linker when export ILA_EN := 1
Runs the Vitis packager
After this step you could open the full blockdesign (platform extended with all kernels) in Vivado for review:
[project-root]/vitis/build_${TARGET}/_x/link/vivado/vpl/prj
$ vivadoprj.xpr
Vitis will connect the memory-ports of the vadd_mm kernel to DDR4 as specified in the
[project-root]/vitis/src/system.cfg
Vitis will connect the memory-ports of the mm2s_vadd_s, vadd_s and s2mm_vadd_s kernels to LPDDR4 as specified in the
[project-root]/vitis/src/system.cfg
make ps_apps
[project-root]/ps_apps/linux
Directory/file structure:
| Directory/file | Description
| ——————–|———————————————————
| Makefile | The ps_apps generic Makefile; it automatically searches for sub-projects to build
| aie_dly_test/* | PS XRT Application - using the native XRT API - Makefile and sources that measures the delay between counter-input and aie-output
| vadd_mm_cpp/* | PS XRT Application - using the native XRT API - Makefile and sources that checks out the vadd_mm kernel
| vadd_mm_ocl/* | PS XRT Application - using the opencl XRT API - Makefile and sources that checks out the vadd_mm kernel
| vadd_s/* | PS XRT Application - using the native XRT API - Makefile and sources that checks out the mm2s_vadd_s -> vadd_s -> s2mm_vadd_s kernels
Builds the output files needed for vitis packager ->
[project-root]/ps_apps/linux/exe/*.exe
make package
[project-root]/vitis
Directory/file structure:
| Directory/file | Description
| ——————–|———————————————————
| Makefile | The Vitis generic Makefile for linker and packager
Runs the Vitis packager
The output of the Vitis packager ends up in
[project-root]/package_linux_${TARGET}