Design Overview

This module shows how to add several PL peripherals:
  • Test Pattern Generator (TPG)
  • HDMI Rx
  • MIPI CSI-2 Rx
  • HDMI Tx


Design Components

This module requires the following components:
  • zcu102_base_trd (Vivado)
  • petalinux_bsp
    • zynqmp_fsbl
    • pmufw
    • bl31
    • u-boot
    • kernel
    • device tree (zcu102-base-dm6.dtsi)
    • rootfs
  • video_qt2
    • video_lib
    • gst_lib

Build Flow Tutorials


This tutorial shows how to build the Base TRD Vivado design that implements the TPG capture pipeline, HDMI Rx capture pipeline including VPSS scaler & frame-buffer read configured for 2ppc and HDMI Tx display pipeline including video-mixer configured for 2ppc.

  • Start Vivado
    % mkdir -p $TRD_HOME/vivado
    % cd $TRD_HOME/vivado
    % vivado
  • From the Vivado tcl console run
    % open_dsa ../zcu102_base_trd/hw/zcu102_base_trd.dsa
  • Open the block design and generate a bitstream
  • Copy the generated bitstream to the PetaLinux directory.
    % cp zcu102_base_trd/zcu102_base_trd.runs/impl_1/zcu102_base_trd_wrapper.bit $TRD_HOME/petalinux/bsp/images/linux/system.bit

PetaLinux BSP

This tutorial shows how to build the Linux image and boot image using the PetaLinux build tool. This step assumes you have run through the PetaLinux config in DM1 previously.

  • Select the device-tree matching design module 6 and build all Linux image components. If you have run petalinux-build in a previous module, the build step will be incremental.
    % cd $TRD_HOME/petalinux/bsp/project-spec/meta-user/recipes-bsp/device-tree/files
    % cp zcu102-base-dm6.dtsi system-user.dtsi
    % petalinux-build
  • Create a boot image.
    % cd $TRD_HOME/petalinux/bsp/images/linux
    % petalinux-package --boot --bif=../../project-spec/boot/dm6.bif --force
  • Copy the generated boot image and Linux image to the dm6 SD card directory.
    % mkdir -p $TRD_HOME/sd_card/dm6
    % cp BOOT.BIN image.ub $TRD_HOME/sd_card/dm6

Video Qt Application

There is no need to rebuild the video_qt2 application if you have already built it in module 5, otherwise follow the instructions from module 5.

  • Copy the generated video_qt2 executable to the dm6 SD card directory.
    % cp $TRD_HOME/workspaces/ws_video/video_qt2/video_qt2 $TRD_HOME/sd_card/dm6

Run Flow Tutorial

  • See here for board setup instructions.
  • Copy all the files from the $TRD_HOME/sd_card/dm6 SD card directory to a FAT formatted SD card.
  • Power on the board to boot the images; make sure INIT_B, done and all power rail LEDs are lit green.
  • After ~30 seconds, the display will turn on and the application will start automatically, targeting the max supported resolution of the monitor (one of 3840x2160 or 1920x1080 or 1280x720). The application will detect whether DP Tx or HDMI Tx is connected and output on the corresponding display device.
  • To re-start the TRD application with the max supported resolution, run
  • To re-start the TRD application with a specific supported resolution use the -r switch e.g. for 1920x1080, run
    % -r 1920x1080
  • The user can now control the application from the GUI's control bar (bottom) displayed on the monitor.
  • The user can select from the following video source options:
    • TPG (SW): virtual video device that emulates a USB webcam purely in software
    • USB: USB Webcam using the universal video class (UVC) driver
    • File: Raw video file supplied by user in YUYV format
    • CSI: MIPI camera (LI-IMX274MIPI-FMC module)
    • TPG (PL): Test Pattern Generator implemented in the PL
    • HDMI: HDMI input implemented in the PL
  • The user can select from the following accelerator options:
    • Passthrough (no accelerator)
  • The video info panel (top left) shows essential settings/statistics.
  • The CPU utilization graph (top right) shows CPU load for each of the four A53 cores.

Continue with Design Module 7.
Return to the Design Tutorials Overview.