7. Integrate 2D Filter Kernels in the Platform

7.1. Prerequisites

  • Reference Design zip file

  • Vitis Unified Software Platform 2020.2

  • Xilinx Runtime (XRT) 2020.2

7.2. Build Flow Tutorial

Tip

You can skip this tutorial and move straight to the next tutorial if desired. Pre-built Vitis acceleration output products are located inside the PetaLinux BSP file located at: $working_dir/vmk180_trd_platform1/petalinux/xilinx-vmk180-trd-2020.2.bsp

Download Reference Design Files:

Skip the following steps if the design zip file has already been downloaded and extracted to a working directory

  1. Download the VMK180 Targeted Reference Design ZIP file

  2. Unzip Contents

The directory structure is described in the Introduction Section

  1. To set up the XRT environment, follow the installation instructions provided here: https://xilinx.github.io/XRT/2020.2/html/build.html

Implement platform design with filter2d PL:

  1. To create the platform design with accelerators integrated, run the following Makefile:

    cd $working_dir/vmk180_trd_platform1_2020.2/accelerators/examples/filter2d_PL
    make PLATFORM=$working_dir/vmk180_trd_platform1_2020.2/platform/ws/vmk180_trd_platform1/export/vmk180_trd_platform1/vmk180_trd_platform1.xpfm
    

    Note

    The PLATFORM variable needs to use an absolute path, otherwise the make step will error out.

    The Makefile implements the following:

    • Builds the filter2d PL kernel. Output is filter2d_pl_accel.xo file.

    • Integrates the above kernels into the vmk180_trd_platform1 design using the Vitis linker. Generates binary_container_1.xclbin which contains meta data describing the kernels and platform. Generates a new XSA that includes the updated PDI.

  2. The following is a list of important output products:

    • Vivado project with integrated kernels: $working_dir/vmk180_trd_platform1_2020.2/accelerators/examples/filter2d_pl/_x/link/vivado/vpl/prj/prj.xpr

    • XSA required for building the Petalinux BSP: $working_dir/vmk180_trd_platform1_2020.2/accelerators/examples/filter2d_PL/binary_container_1.xsa The XSA contains the updated PDI with the accelerators added into the platform design. The PDI is required to build the BOOT.BIN

    • The xclbin that contains the platform and kernel meta data needed by XRT: $working_dir/vmk180_trd_platform1_2020.2/accelerators/examples/filter2d_pl/binary_container_1.xclbin