Targeting Hardware - 2023.2 English

Vitis Tutorials: AI Engine (XD100)

Document ID
XD100
Release Date
2024-03-05
Version
2023.2 English

You can easily build for hardware by following the steps below.

Note: Because you already compiled the AI Engine graph and PL kernels for hardware emulation in the previous step, you do not need to re-compile them again for targeting the hardware. However, re-link and re-package for hardware run.

  1. Link AI Engine and PL kernels with the platform:

    make xsa TARGET=hw
    

    or

    v++ -l --platform $PLATFORM_REPO_PATHS/vck190_custom.xpfm s2mm.xo mm2s.xo libadf.a -t hw --save-temps -g --config system.cfg -o   tutorial.xsa
    
  2. Re-run the packaging step with:

    make package TARGET=hw
    

    or

    cd ./sw
    v++ --package -t hw \
       -f $PLATFORM_REPO_PATHS/vck190_custom.xpfm \
       --package.rootfs=$ROOTFS \
       --package.image_format=ext4 \
       --package.boot_mode=sd \
       --package.kernel_image=$IMAGE \
       --package.defer_aie_run \
       --package.sd_file host.exe ../tutorial.xsa ../libadf.a
    cd ..
    

    When you run on hardware, ensure that you have a supported SD card. Format the SD card with the sw/sd_card.img file. Then plug the SD card into the board and power it up.

  3. When a Linux prompt appears, run the following commands:

    dmesg -n 4 && echo "Hide DRM messages..."
    cd /run/media/*1
    export XILINX_XRT=/usr
    ./host.exe a.xclbin
    

    You should see TEST PASSED. You have successfully run your design on hardware.

To read more about the AI Engine flow, see the Versal ACAP AI Engine Programming Environment User Guide (UG1076).