Setting Up the Custom Board - 1.2 English

Vitis AI User Guide (UG1414)

Document ID
UG1414
Release Date
2020-07-21
Version
1.2 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 follow the steps below. Please perform them in order. Please make sure that each step has been completed and only when you have completed a step can you proceed to the next step.

Note: Vitis AI only supports the custom board for Zynq UltraScale+ MPSoC devices.
  1. Create the platform system of your custom board.

    You can refer to the following link and UG1400.

    https://github.com/Xilinx/Vitis_Embedded_Platform_Source/tree/master/Xilinx_Official_Platforms

  2. Integrate DPU IP.

    Refer to the following link to complete the integration of DPU IP.

    https://github.com/Xilinx/Vitis-AI/tree/master/DPU-TRD
    Note: After this step is completed, you will get sd_card directory and sd_card.img image with DPU.

    For more known issues, see to Known issues.

  3. Install the dependent libraries of Vitis AI.

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

    • Rebuild system through the configuration of petalinux

      Execute the following command:

      petalinux-config -c rootfs

      Then select packagegroup-petalinux-vitisai as shown in the following figure:

      Figure 1. Petalinux Package Groups
      Figure 2. packagegroup-petalinux-vitisai

      Then execute the following command to recompile the system.

      petalinux-build
    • Install the Vitis AI dependent libraries online

      If you use this method, you need to ensure that the board is connected to the internet.

      Execute 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: After this step is completed, you will get the system image available for Vitis AI.
  4. Flash the image to the SD card.

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

  5. Install the Vitis AI Runtime libraries.
    After the custom board boots up with the above system image, there are five library packages in the runtime package that need to be installed, 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 will ba generated under /etc to indicate the dpu.xclbin file location, as shown below. The Vitis AI examples will fetch the dpu.xclbin file by reading vart.conf file. If the dpu.xclbin file on your boad is not in the same location as the default, change the dpu.xclbin path in vart.conf.

    Figure 3. vart.conf file
    Note: After this step, you will get a system that can run the Vitis AI examples.
  6. Run the Vitis AI examples.

    See Running Examples to run the Vitis AI examples.