Setting Up the Custom Board - 2.0 English

Vitis AI User Guide (UG1414)

Document ID
UG1414
Release Date
2022-01-20
Version
2.0 English

Vitis AI supports the official ZCU102/ZCU104 as well as user-defined boards.

If you want to run Vitis AI on your custom board, follow these steps. Ensure that you complete a step before proceeding to the next step.

  1. Create the platform system of your custom board. For more information, see Vitis Unified Software Platform Documentation: Embedded Software Development (UG1400) and https://github.com/Xilinx/Vitis_Embedded_Platform_Source/tree/master/Xilinx_Official_Platforms.
  2. Integrate the DPU IP. See https://github.com/Xilinx/Vitis-AI/tree/master/dsa/DPU-TRD for more information.
    Note: After this step is completed, an sd_card directory and an sd_card.img image with DPU are created. For known issues, see Known issues.
  3. Install the Vitis AI libraries.

    There are two ways to install the Vitis AI libraries. One is to rebuild the system by configuring PetaLinux and the other is to install the Vitis AI libraries online. After you install the Vitis-AI libraries, the Vitis-AI dependent libraries are installed.

    1. To rebuild the system by configuring PetaLinux:
      If users want to install Vitis AI 2.0 into rootfs when generating system image by PetaLinux, users need to get the Vitis AI 2.0 recipes. The Vitis AI 2.0 recipes folder is located in Vitis-AI/tools/Vitis-AI-Recipes/recipes-vitis-ai.
      1. Copy Vitis AI recipes folder into <petalinux project>/project-spec/meta-user/.
        cp Vitis-AI/tools/Vitis-AI-Recipes/recipes-vitis-ai <petalinux project>/project-spec/meta-user/
      2. Edit <petalinux project>/project-spec/meta-user/conf/user-rootfsconfig, appending the lines:
        CONFIG_vitis-ai-library
        CONFIG_vitis-ai-library-dev
        CONFIG_vitis-ai-library-dbg
      3. Source petalinux tool and run petalinux-config -c rootfs command.
      4. Select user packages --->.
      5. Select [*] vitis-ai-library , save it and exit.
      6. Run petalinux-build.
      Note: If you want to compile the example on the target, select the vitis-ai-library-dev and packagegroup-petalinux-self-hosted and recompile the system.
    2. To install the Vitis AI libraries online, execute dnf install vitis-ai-library command on board directly.
      Note: Before the release of Petalinux VAI2.0 update, the previous version of Vitis AI will be installed. Usually, Petalinux VAI2.0 update will be released approximately 1 month after Vitis 2.0 release.
      Note: If you use this method, ensure that the board is connected to the Internet.

  4. Flash the image to the SD card.

    See Flashing the OS Image to the SD Card to flash the new image to the SD card.

  5. Update the Vitis AI Runtime libraries to the latest, if needed. To upgrade to the latest Vitis AI, update the following library packages.
    • libunilog
    • libxir
    • libtarget-factory
    • libvart
    • libvitis_ai_library

    See Installing Vitis AI Runtime on the Evaluation Board to install the Vitis AI Runtime libraries.

    After you install the Vitis AI Runtime, a vart.conf file is generated in the /etc directory. This contains the location of the dpu.xclbin file, as shown below. The Vitis AI examples fetch the dpu.xclbin file by reading the vart.conf file. If the dpu.xclbin file on your board is not in the same location as the default, change the dpu.xclbin path in the vart.conf file.
    root@xilinx-zcu102-2021_2:~# cat /etc/vart.conf
    firmware: /media/sd-mmcblk0p1/dpu.xclbin
    
    Note: This step generates a system that can run the Vitis AI examples.
  6. Run the Vitis AI examples. See Running Examples to run the Vitis AI examples.