Setting Up the Custom Board - 1.3 English

Vitis AI User Guide (UG1414)

Document ID
UG1414
Release Date
2021-02-03
Version
1.3 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, you need to preform the following steps in order. 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 DPU IP. Refer to https://github.com/Xilinx/Vitis-AI/tree/master/dsa/DPU-TRD to complete the integration of DPU IP.
    Note: After this step is completed, an sd_card directory and an sd_card.img image with DPU are created. For more known issues, see to Known issues.
  3. Install the dependent libraries of Vitis AI.

    There are two ways to install the dependent libraries of Vitis AI. One is to rebuild system through the configuration of PetaLinux, the other is to install the Vitis AI dependent libraries online.

    1. Rebuild the system using PetaLinux configuration by executing the following command:
      petalinux-config -c rootfs
    2. Ensure that packagegroup-petalinux-vitisai is selected, as shown in the following figure:



    3. Execute the following command to recompile the system.
      petalinux-build
    4. You can also install the Vitis AI dependent libraries online by executing dnf install packagegroup-petalinux-vitisai to complete the installation, as shown in the following code:
      root@xilinx-zcu104-2020_1:/media/sd-mmcblk0p1# dnf install packagegroup-petalinux-vitisai
      Last metadata expiration check: 1 day, 18:12:25 ago on Wed Jun 17 09:35:01 2020.
      Package packagegroup-petalinux-vitisai-1.0-r0.noarch is already installed.
      Dependencies resolved.
      Nothing to do.
      Complete!
      Note: If you use this method, you need to ensure that the board is connected to the Internet.
    Note: After this step is completed, the 1.2 version of VART is also installed into the system and the system image for Vitis AI is available.
    Note: If you want to compile the example on the target, select the packagegroup-petalinux-vitisai-dev and packagegroup-petalinux-self-hosted and recompile the system.
  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 VAI1.3, if needed.

    After the custom board boots up with the above system image, the 1.2 version of VART is installed. If you want to update them to the 1.3, you have to update the following five library packages, as shown below.

    • 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 under /etc to indicate the dpu.xclbin file location, as shown below. The Vitis AI examples fetch the dpu.xclbin file by reading 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 vart.conf.

    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.