This wiki page complements the 2016.1 version of the Base TRD. For other versions, refer to the Zynq UltraScale+ MPSoC Base TRD overview page.

Note: The ES1 reference design zip file is no longer available for download. Please update to ES2 or production silicon.

Table of Contents

1 Revision History



Change Log:



2 Overview


The Zynq UltraScale+ MPSoC Base Targeted Reference Design (TRD) is an embedded video processing application running on a combination of APU (SMP Linux), RPU (bare-metal) and PL.

The design consists of the following video data paths:

The TRD demonstrates the value of offloading computation intensive tasks like the 2D-convolution filter from the PS onto PL, thereby freeing APU resources. The APU load is plotted on the GUI to compare a pure software vs hardware accelerated implementation. The RPU is used to monitor the live memory throughput of the design by reading the built-in AXI performance monitors (APM) inside the PS. The data is sent to the APU via the OpenAMP communication framework and plotted on the GUI.

This wiki contains information about:

Additional material that is not hosted on the wiki:

Note: Certain material in this reference design is separately licensed by third parties and may be subject to the GNU General Public License version 2, the GNU Lesser General License version 2.1, or other licenses.



3 Software Tools and System Requirements


3.1 Hardware


Required:

Optional:

3.2 Software Tools


Required:

Optional:

3.3 Licensing


The video Test Pattern Generator IP inside the Vivado project requires a license which can be obtained from here.

Steps to generate the license:
  1. Click on the link mentioned above.
  2. Fill in the login details and proceed.
  3. Click on “Generate Node-Locked License" icon as shown in the picture:
  4. Under system information, give the host details.
  5. Proceed until you get the license agreement and accept it.
  6. The License (.lic file) will be sent to the email-id mentioned in the login details.
  7. Copy the license file locally and give the same path in the SDSOC license manager.

3.4 Compatibility


The reference design has been tested successfully with the following user-supplied components.

DisplayPort Monitor:
Make/ModelNative Resolution
Viewsonic VP2780-4K3840x2160 (30Hz)
LG 27MU67-B3840x2160 (30Hz)
Acer S277HK3840x2160 (30Hz)
Dell U2414H1920x1080 (60Hz)

DisplayPort Cable:



4 Design File Hierarchy


The Zynq UltraScale+ MPSoC Base TRD zip file is released with the source code including PetaLinux BSP, SDSoC and Xilinx SDK projects, and an SD card image that enables the user to run the video demonstration and software application. It also includes the binaries necessary to configure and boot the ZCU102 evaluation board. The top-level directory structure is shown in the figure below.





5 Installation and Operating Instructions


5.1 Board Setup


Required:

Optional:

Jumpers & Switches:



5.2 Run the Application


Tutorial:



6 Tool Flow Tutorials


This wiki page assumes that the user has already downloaded the Zynq UltraScale+ MPSoC Base TRD zip file and extracted its contents. For reference in the following tutorials, we export TRD_HOME as environment variable.
% export TRD_HOME=</path/to/downloaded/zip-file>/zcu102-base-trd-2016-1

The below figure shows an overview of all the projects provided in this package as well as inter-dependencies and generated output products. The following sections show step-by-step instructions for rebuilding all project components. Note that pre-built components are depicted as dashed lines and therefore the corresponding build steps are optional and can be skipped (see [Optional] marking). The Vivado hardware design is packaged as part of the SDSoC platform and shall therefore be built through the SDSoC tool flow only.



6.1 Build the Petalinux BSP


The PetaLinux BSP is pre-configured for this reference design application and includes the following components:

The generated file image.ub contains the Linux kernel, devicetree blob, and rootfs in a single FIT image.

Tutorial:
  1. Change the directory to the PetaLinux board support package (BSP)

    % cd $TRD_HOME/apu/petalinux_bsp


  2. Configure all PetaLinux components

    % petalinux-config --oldconfig


  3. Build all PetaLinux components including u-boot, kernel, device tree blob and rootfs

    % petalinux-build


    • The generated SYSROOT contains all system libraries and headers required to compile and link the video_qt2 application and is located at $TRD_HOME/apu/petalinux_bsp/build/linux/rootfs/stage.
    • The generated Linux image binaries will be placed at $TRD_HOME/apu/petalinux_bsp/images/linux.
  4. [Optional] Copy the generated image.ub, u-boot.elf, and bl31.elf binaries into the SDSoC platform's boot directory $TRD_HOME/apu/zcu102_base_trd/boot.

6.2 Build the APU Video Qt Application


The video Qt application video_app is a Linux application that executes on the APU running in SMP Linux mode. It consists of the following components:

The application controls the video capture and video processing pipelines implemented in the PL as well as the display pipeline inside the PS via a GUI based on the Qt framework. The video processing function can be either run as pure software algorithm on the APU or as hardware accelerator in the PL. The SDSoC tool is used to generate and instantiate the hardware accelerator using high-level synthesis (HLS) as well as the data motion network and accelerator/DMA drivers. The perfapm-client library receives performance data from the RPU-1 core via the remoteproc/RPMsg frameworks.

Prerequisites:
  1. Ensure the steps mentioned in section 6.1 are executed first.
  2. Set the SYSROOT environment variable, add the Qt host tools directory to your PATH variable, and set up the Qt environment:

    % export SYSROOT=$TRD_HOME/apu/petalinux_bsp/build/linux/rootfs/stage
    % export PATH=$PETALINUX/tools/yocto-sdk/sysroots/x86_64-petalinux-linux/usr/bin/qt5:$PATH
    % source $TRD_HOME/apu/video_app/video_qt2/qmake_set_env.sh



Tutorial:
  1. Launch the SDSoC tool from the console

    % cd $TRD_HOME/apu
    % sdsoc -workspace $TRD_HOME/apu/video_app


  2. Close the Welcome screen and create a new SDSoC project under File -> New -> SDSoC Project.
    • Enter filter2d as project-name.
    • In Target Platform section, click on Other. In Select SDSoC platform directory window, browse to $TRD_HOME/apu/zcu102_base_trd and then click OK.
    • Select OS 'Linux'
    • Check Shared Library box
    • Click Next.
  3. In Available Templates section, select 2D-Convolution Filter and click Finish.
  4. In the filter2d SDSoC project tab, under Build Configurations, set the Active Configuration to SDRelease.
    • Make sure the Generate Bitstream and Generate SD Card Image options are checked.
    • Make sure the filter2d_sds function is listed under Hardware Functions and the Clock Frequency is set to 300MHz.
  5. Right-click on filter2d project and under C/C++ Settings ->Settings section, switch to the Build Artifact tab and set Output prefix to 'lib' and click OK.
  6. Build the filter2d project with 2D filter in HW:
    • By default, 2d filter in HW is already selected.
    • Right-click on the filter2d project and select Build Project.
    • The generated SD card image will be placed at $TRD_HOME/apu/video_app/filter2d/SDRelease/sd_card.
    • The below figure shows the resource utilization of the PL design.
  7. [Optional] Build the filter2d project with the 2D filter in SW:
    • From filter2d project, navigate to 'src' -> 'filter2d_sds.cpp' -> 'filter2d_sds(...)' function. Right click on 'filter2d_sds(...)' function, select Toggle HW/SW.
    • Right-click on the filter2d project and select Clean Project.
    • Right-click on the filter2d project and select Build Project.
    • The generated SD card image will be placed at $TRD_HOME/apu/video_app/filter2d/SDRelease/sd_card.
  8. Import the video_app projects:
    • Click File -> Import... -> General -> Existing Projects into Workspace.
    • Navigate to the $TRD_HOME/apu/video_app directory using the Browse button and click OK.
    • Select the perfapm-client, video_lib and video_qt2 projects.
    • Click Finish.
  9. Generate Makefile for video_qt2:
    • Right click on the video_qt2 project, navigate to Make Targets -> Build...
    • In Make Targets window, make sure qmake is selected and click Build.
  10. Build the video_qt2 project:
    • Right click on the video_qt2 project and select Build Project.
    • The video_lib and perfapm-client projects will be built automatically as they are project dependencies of video_qt2.
    • The generated elf file will be placed at $TRD_HOME/apu/video_app/video_qt2/video_qt2.
  11. [Optional] Copy the above binary to the $TRD_HOME/apu/video_app/filter2d/SDRelease/sd_card/bin directory.
  12. IMPORTANT Undefine the MAKEFLAGS environment variable set by the qmake_set_env.sh script at the beginning of this tutorial, otherwise subsequent tutorials will fail

    % unset MAKEFLAGS



6.3 Build the RPU-1 Performance Monitor Server Application


The performance monitor server application perfapm-server is a bare-metal application that executes on RPU-1. The firmware binary is loaded by the APU master at the end of the Linux boot process. RPU-1 and APU establish a communication channel using the OpenAMP framework. RPU-1 gathers performance data like memory throughput from the PS AXI performance monitor (APM) units and sends it across to the APU where the data is received by the perfapm-client library and then visualized on a plotted graph.

Tutorial:
  1. Launch the Xilinx software development kit (XSDK) from the console

    % cd $TRD_HOME/rpu1
    % xsdk -workspace $TRD_HOME/rpu1/perfapm-server


  2. Close the Welcome screen and import the perfapm-server projects.
    • Click File -> Import... -> General -> Existing Projects into Workspace and click Next.
    • Navigate to the $TRD_HOME/rpu1/perfapm-server directory using the Browse button and click OK.
    • Select the perfapm, perfapm-server, perfapm-server_bsp, and zcu102_base_trd_wrapper_hw_platform_0 projects.
    • Click Finish.
  3. Build the imported projects:
    • Right-click on the perfapm-server project and select Build Project.
    • The generated elf file will be placed at $TRD_HOME/rpu1/perfapm-server/perfapm-server/Debug/perfapm-server.elf.
  4. [Optional] Copy the above binary into the PetaLinux BSP at $TRD_HOME/apu/petalinux_bsp/components/apps/perfapm_oa_server_r5_1/data.
    • Follow the steps mentioned in section 6.1 to (re-)generate the PetaLinux components.

6.4 Build the RPU-0 FSBL


The first stage bootloader fsbl is a bare-metal application that executes on RPU-0. It is reponsible for doing basic system initialization and loading (most of) the various processing units with their respective executables as well as the PL bitstream. After the FSBL exits, the remaining processors are released from reset and start executing.

Tutorial:
  1. Launch the Xilinx software development kit (XSDK) from the console

    % cd $TRD_HOME/rpu0
    % xsdk -workspace $TRD_HOME/rpu0/fsbl


  2. Close the Welcome screen and import the fsbl projects.
    • Click File -> Import... -> General -> Existing Projects into Workspace.
    • Navigate to the $TRD_HOME/rpu0/fsbl directory using the Browse button.
    • Select the fsbl_r5_0, fsbl_r5_0_bsp, and zcu102_base_trd_wrapper_hw_platform_0 projects.
    • Click Finish.
  3. Build the imported projects:
    • Right-click on the fsbl_r5_0 project and select Build Project.
    • The generated elf file will be placed at $TRD_HOME/rpu0/fsbl/fsbl_r5_0/Debug/fsbl_r5_0.elf.
  4. [Optional] Copy the above binary into the SDSoC platform at $TRD_HOME/apu/zcu102_base_trd/boot.
    • Follow the steps mentioned in section 6.2 to (re-)generate the SD card image.

6.5 Build the RPU-0 Heartbeat Application


The heartbeat application is a FreeRTOS application that executes on RPU-0 after the FSBL has finished. This application is a simple dual task application that demostrates communication between the two tasks by printing messages to the UART1 console.

Tutorial:
  1. Launch the Xilinx software development kit (XSDK) from the console

    % cd $TRD_HOME/rpu0
    % xsdk -workspace $TRD_HOME/rpu0/heartbeat


  2. Close the Welcome screen and import the hearbeat projects.
    • Click File -> Import... -> General -> Existing Projects into Workspace.
    • Navigate to the $TRD_HOME/rpu0/heartbeat directory using the Browse button.
    • Select the heartbeat, heartbeat_bsp, and zcu102_base_trd_wrapper_hw_platform_0 projects.
    • Click Finish.
  3. Build the imported projects:
    • Right-click on the heartbeat project and select Build Project.
    • The generated elf file will be placed at $TRD_HOME/rpu0/heartbeat/heartbeat/Debug/heartbeat.elf.
  4. [Optional] Copy the above binary into the SDSoC platform at $TRD_HOME/apu/zcu102_base_trd/boot.
    • Follow the steps mentioned in section 6.2 to (re-)generate the SD card image.



7 Other Information


7.1 Known Issues



7.2 Limitations





8 Support


To obtain technical support for this reference design, go to the: