Overview


This tutorial guides you from inital Starterkit reference design for TE0808 SoM to custom extensible vitis platfom and then shows how to implement and run basic VADD example and Vitis-AI 3.0 dpu_trd example (ResNet50).

Key Features


  • AMD Vitis 2022.2
  • Vitis AI 3.0
  • Vitis custom extensible platform
  • Vector addition
  • ResNet50 on DPU with image input from file
  • Vehicle classification on DPU with video input from USB camera 

Requirements


TypeNameVersionNote
HWTE0808 Module----
HWTEBF0808 Carrier----
Diverse CableUSB, Power...----
Virtual MaschineOracle, VMWare or MS WSL--optional
OSLinuxXilinx Supported OS running on VM or native
Reference DesignTE0808-StarterKit-vivado_2022.2-build_*.zipbuild 1 or higher to match Vivado 2022.2Tutorial was created and tested with:
SWVitis2022.2--
SWVivado2022.2
SWPetalinux2022.2--
SWPutty----
Repo

Vitis-AI

3.0

GitHub - Xilinx/Vitis-AI at 3.0

https://xilinx.github.io/Vitis-AI/3.0/html/index.html


Prepare Development Environment

Virtual Machine


On Win10 Pro PC, you can use:

The presented extendible platform has been created on: Windows 10 Pro, ver. 21H2 OS build 19044.1889, VMware Workstation 16 Player (Version 16.2.4 build-20089737), Ubuntu 20.04 LTS Desktop 64-bit PC (AMD64)
https://linuxconfig.org/Ubuntu-20-04-download  


Vitis/Vivado 2022.2 and creation of the extendible platform from ZIP archive has been also tested on:
Windows 11 Pro PC (upgrade from Windows 10 Pro, ver. 21H2 OS build 19044.1889)
VMware Workstation 16 Player (Version 16.2.4 build-20089737),
Ubuntu 20.04 LTS Desktop 64-bit PC (AMD64).
https://linuxconfig.org/Ubuntu-20-04-download

Linux OS


Only supported OS are selected Linux distributions. You will need either native or virtual PC with Linux distribution.

Create new VM with Linux OS supported by Vitis 2022.2 tools.

Use English as OS language for your Linux System. Keyboard language can be any language.
Other languages may cause errors in PetaLinux build process.

Set Language


In Ubuntu 20.04, open terminal and type command:

$ locale

Language is OK, if the command response starts with:

LANG=en_US.UTF-8

Set Bash as Terminal in Ubuntu


In Ubuntu, set bash as terminal.

$ sudo dpkg-reconfigure dash shell


select:  no

Use of bash shell is required by Xilinx tools.

The Ubuntu 20.04 LTS terminal (selected as default installation) is dash.

 

Install OpenCL Client Drivers


On Ubuntu, install OpenCL Installable Client Driver Loader by executing:

$ sudo apt-get install ocl-icd-libopencl1
$ sudo apt-get install opencl-headers
$ sudo apt-get install ocl-icd-opencl-dev

Software Installation


Vitis 2022.2


Download  Vitis

Download the Vitis Tools installer from the link below https://www.xilinx.com/support/download.html

Install Vitis

If Vitis 2022.2 is not installed, follow installation steps described in:

https://docs.xilinx.com/r/en-US/ug1393-vitis-application-acceleration/Vitis-Software-Platform-Installation

After a successful installation of the Vitis 2022.2 and Vivado 2022.2 in /tools directory, a confirmation message is displayed, with a prompt to run the installLibs.sh script.

Script location:
/tools/Vitis/2022.2/scripts/installLibs.sh

In Ubuntu terminal, change directory to /tools/Vitis/2022.2/script  and run the script using sudo privileges:

$ sudo installLibs.sh

The command installs a number of necessary packages for the Vitis 2021.2 tools based on the actual OS version of your Ubuntu system.

Install License Supporting Vivado

In Ubuntu terminal, source paths to Vivado tools by executing

$ source /tools/Xilinx/Vitis/2022.2/settings64.sh

Execute Vivado License Manager:

$ vlm

From vlm, login to your Xilinx account by an www browser.

In www browser, specify Vitis 2021.2 license. Select Linux target.

Download xilinx license file and copy it into the directory of your choice.
~/License/vitis_2022_2/Xilinx.lic

In vlm, select Load License -> Copy License

Putty


The putty terminal can be used for Ethernet connected terminal. Putty supports keyboard, mouse and forwarding of X11 for Zynq Ultrascale+ applications designed for X11 desktop GUI.

In Ubuntu terminal, execute:

$ sudo apt install putty



To test the installation, execute putty application from Ubuntu terminal by:

$ putty &

Exit from putty.

Petalinux 2022.2


Download  Petalinux

Download the PetaLinux Tools installer from the link below https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools.html

Install Required Libraries

Install Petalinux 2022.2. Follow guideline described in:
PetaLinux KICKstart - Public Docs - Trenz Electronic Wiki (trenz-electronic.de)


Before PetaLinux installation, check UG1144 chapter "PetaLinux Tools Installation Requirements" and install missing tool/libraries with help of script plnx-env-setup.sh attached to the Xilinx Answer Record 73296 - PetaLinux: How to install the required packages for the PetaLinux Build Host?
https://www.xilinx.com/support/answers/73296.html

Use this page to download script: plnx-env-setup.sh

The script detects whether the Host OS is a Ubuntu, RHEL, or CentOS Linux distribution and then automatically installs all of the required packages for the PetaLinux Build Host.

The script requires root privileges. The script does not install the PetaLinux Tools. Command to run the script:

$ sudo ./plnx-env-setup.sh

Perform update of your PetaLinux and additional installation libraries.

$ sudo apt-get update
$ sudo apt-get install iproute2 gawk python3 python build-essential gcc git make net-tools libncurses5-dev tftpd zlib1g-dev libssl-dev flex bison libselinux1 gnupg wget git-core diffstat chrpath socat xterm autoconf libtool tar unzip texinfo zlib1g-dev gcc-multilib automake zlib1g:i386 screen pax gzip cpio python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3 -y
Install Petalinux

and follow the directions in the "Installing the PetaLinux Tool" section of (UG1144).
https://www.xilinx.com/support/documentation/sw_manuals/xilinx2020_1/ug1144-petalinux-tools-reference-guide.pdf

To install petalinux do not start from shared folder, copy installer into your home directory.

$ mkdir -p ~/petalinux/2022.2



Copy  petalinux-v2022.2-final-installer.run into  ~/petalinux/2022.2

$ ./petalinux-v2022.2-final-installer.run

Source environment

$ source ~/petalinux/2022.2/settings.sh

Prepare Reference Design for Extensible Custom Platform


Update Vivado Project for Extensible Platform


Trenz Electronic Scripts allows posibility change some setup via enviroment variables, which depends on the used OS and PC performace.

To improve performance on multicore CPU add global envirment on line 64:
export TE_RUNNING_JOBS=10

to  /etc/bash.bashrc or local to design_basic_settings.sh

In Ubuntu terminal, source paths to Vitis and Vivado tools by

$ source /tools/Xilinx/Vitis/2022.2/settings64.sh

Download TE0808 StarterKit Linux Design file(see Reference Design download link on chapter Requirements) with pre-build files to

 ~/Downloads/TE0808-StarterKit-vivado_2022.2-build_1_20230601094128.zip  

This TE0808 StarterKit ZIP file contains bring-up scripts for creation of Petalinux for range of modules in zipped directory named “StarterKit”.

Unzip the file to directory:
~/work/TE0808_68_240

All supported modules are identified in file: ~/work/TE0808_68_240/StarterKit/board_files/TE0808_board_files.csv

We will select module 68 with name TE0808-05-BBE21-A, with device xczu15eg-ffvc900-1-e on TEBF0808 carrier board. We will use default clock 240 MHz.
That is why we name the package TE0808_68_240 and proposed to unzip the TE0808 StarterKit Linux Design files into the directory:
~/work/TE0808_68_240

In Ubuntu terminal, change directory to the StarterKit directory:

$ cd ~/work/TE0808_68_240/StarterKit

Setup the StarterKit directory files for a Linux host machine.
In Ubuntu terminal, execute:

$ chmod ugo+rwx ./console/base_sh/*.sh
$ chmod ugo+rwx ./_create_linux_setup.sh
$ ./_create_linux_setup.sh

Select option (0) to open Selection Guide and press Enter

Select variant 68 from the selection guide, press enter and agree selection

Create Vivado Project with option 1

Vivado Project will be generated for the selected variant.

Selection Guide automatically modified ./design_basic_settings.sh with correct variant, so other provided bash files to recreate or open Vivado project again can be used later also.

In case of using selection guide, variant can be selected also manually:

Select option (2) to create maximum setup of CMD-Files and exit the script (by typing any key).

It moves main design bash scripts to the top of the StarterKit directory. Set these files as executable, from the Ubuntu terminal:

$ chmod ugo+rwx *.sh

In text editor, open file
~/work/TE0808_68_240/StarterKit/design_basic_settings.sh

On line 63, change
export PARTNUMBER=LAST_ID
to
export PARTNUMBER=68

To improve performance on multicore CPU add on line 64:
export TE_RUNNING_JOBS=10

Vivado will be utilizing up to 10 parallel logical processor cores with this setup
instead of the default of 2 parallel logical processor cores.

Save the modified file.

This modification will guide the Trenz TE0808 StarterKit Linux Design scripts to generate Vivado HW for the module 68 with name TE0808-05-BBE21-A, with device xczu15eg-ffvc900-1-e on TEBF0808 carrier board.

In Ubuntu terminal, change directory to
~/work/TE0808_68_240/StarterKit

The Vivado tool will be opened and Trenz Electronic HW project for the TE0808 StarterKit Linux Design, part 68 will be generated  by running this script:

$ ./vivado_create_project_guimode.sh

The Vivado tool will be opened and Trenz Electronic HW project for the TE0808 StarterKit Linux Design, part 68 will be generated.

In Vivado window Sources, click on zusys_wrapper and next on zusys.bd to open the HW diagram in IP integrator:

It is possible to display diagram in separate window by clicking on float icon in upper right corner of the diagram.

Zynq Ultrascale+ block is configured for the Trenz TE0808 StarterKit Linux Design on the TEBF0808 carrier board.

This is starting point for the standard PetaLinux system supported by Trenz with steps for generation of the PetaLinux system. Parameters of this system and compilation steps are described on Trenz Wiki pages:
https://wiki.trenz-electronic.de/display/PD/TE0808+StarterKit

Follow steps described in these wiki pages if you would like to create fixed, not extensible Vitis platform.

The Extensible Vitis platform generation steps are described in next paragraphs.

Create Extensible Vitis platform


To implement hardware this tutorial offers two alternatives: Fast Track or Manual Track:

  • Choose Fast Track to use TCL script to do the same modifications as in manual track case automatically,
  • Select Manual Track path if you want to see all required hardware modifications required for custom platform.
Fast Track

Block Design of the Vivado project must be opened for this step. Copy following TCL Code to the TCL comand console of Vivado:

TCL Script to prepare Extensible Vitits Platform
#activate extensible platform
set_property platform.extensible true [current_project]
save_bd_design
 
#set_property PFM_NAME "xilinx:te0808_15eg_1e_tebf0808:zusys:0.0" [get_files zusys.bd]
set_property PFM_NAME [string map {part0 zusys} [string map {trenz.biz trenz} [current_board_part]]] [get_files zusys.bd]
set_property platform.design_intent.embedded {true} [current_project]
set_property platform.design_intent.datacenter {false} [current_project]
set_property platform.design_intent.server_managed {false} [current_project]
set_property platform.design_intent.external_host {false} [current_project]
set_property platform.default_output_type {sd_card} [current_project]
set_property platform.uses_pr {false} [current_project]
 
save_bd_design
#set_property pfm_name {xilinx:te0808_15eg_1e_tebf0808:zusys:0.0} [get_files -all {zusys.bd}]
#set_property platform.name {zusys} [current_project]
 
#add clocking wizard
startgroup
create_bd_cell -type ip -vlnv xilinx.com:ip:clk_wiz:6.0 clk_wiz_0
endgroup
 
#clocking wizard config
set_property -dict [list CONFIG.CLKOUT2_USED {true} CONFIG.CLKOUT3_USED {true} CONFIG.CLKOUT4_USED {true} CONFIG.CLKOUT2_REQUESTED_OUT_FREQ {200.000} CONFIG.CLKOUT3_REQUESTED_OUT_FREQ {400.000} CONFIG.CLKOUT4_REQUESTED_OUT_FREQ {240.000} CONFIG.RESET_TYPE {ACTIVE_LOW} CONFIG.MMCM_CLKOUT1_DIVIDE {6} CONFIG.MMCM_CLKOUT2_DIVIDE {3} CONFIG.MMCM_CLKOUT3_DIVIDE {5} CONFIG.NUM_OUT_CLKS {4} CONFIG.RESET_PORT {resetn} CONFIG.CLKOUT2_JITTER {102.086} CONFIG.CLKOUT2_PHASE_ERROR {87.180} CONFIG.CLKOUT3_JITTER {90.074} CONFIG.CLKOUT3_PHASE_ERROR {87.180} CONFIG.CLKOUT4_JITTER {98.767} CONFIG.CLKOUT4_PHASE_ERROR {87.180}] [get_bd_cells clk_wiz_0]
 
#connect clocking wizard inputs
connect_bd_net [get_bd_pins clk_wiz_0/resetn] [get_bd_pins zynq_ultra_ps_e_0/pl_resetn0]
connect_bd_net [get_bd_pins clk_wiz_0/clk_in1] [get_bd_pins zynq_ultra_ps_e_0/pl_clk0]
 
#add reset cores
startgroup
create_bd_cell -type ip -vlnv xilinx.com:ip:proc_sys_reset:5.0 proc_sys_reset_1
create_bd_cell -type ip -vlnv xilinx.com:ip:proc_sys_reset:5.0 proc_sys_reset_2
create_bd_cell -type ip -vlnv xilinx.com:ip:proc_sys_reset:5.0 proc_sys_reset_3
create_bd_cell -type ip -vlnv xilinx.com:ip:proc_sys_reset:5.0 proc_sys_reset_4
endgroup
 
#connect reset cores
connect_bd_net [get_bd_pins clk_wiz_0/clk_out1] [get_bd_pins proc_sys_reset_1/slowest_sync_clk]
connect_bd_net [get_bd_pins clk_wiz_0/clk_out2] [get_bd_pins proc_sys_reset_2/slowest_sync_clk]
connect_bd_net [get_bd_pins clk_wiz_0/clk_out3] [get_bd_pins proc_sys_reset_3/slowest_sync_clk]
connect_bd_net [get_bd_pins clk_wiz_0/clk_out4] [get_bd_pins proc_sys_reset_4/slowest_sync_clk]
connect_bd_net [get_bd_pins clk_wiz_0/locked] [get_bd_pins proc_sys_reset_1/dcm_locked]
connect_bd_net [get_bd_pins clk_wiz_0/locked] [get_bd_pins proc_sys_reset_2/dcm_locked]
connect_bd_net [get_bd_pins proc_sys_reset_3/dcm_locked] [get_bd_pins clk_wiz_0/locked]
connect_bd_net [get_bd_pins proc_sys_reset_4/dcm_locked] [get_bd_pins clk_wiz_0/locked]
connect_bd_net [get_bd_pins proc_sys_reset_1/ext_reset_in] [get_bd_pins zynq_ultra_ps_e_0/pl_resetn0]
connect_bd_net [get_bd_pins proc_sys_reset_2/ext_reset_in] [get_bd_pins zynq_ultra_ps_e_0/pl_resetn0]
connect_bd_net [get_bd_pins proc_sys_reset_3/ext_reset_in] [get_bd_pins zynq_ultra_ps_e_0/pl_resetn0]
connect_bd_net [get_bd_pins proc_sys_reset_4/ext_reset_in] [get_bd_pins zynq_ultra_ps_e_0/pl_resetn0]
 
# add clocks to platform
set_property PFM.CLOCK {clk_out1 {id "1" is_default "false" proc_sys_reset "/proc_sys_reset_1" status "fixed" freq_hz "100000000"} clk_out2 {id "2" is_default "false" proc_sys_reset "/proc_sys_reset_2" status "fixed" freq_hz "200000000"} clk_out3 {id "3" is_default "false" proc_sys_reset "/proc_sys_reset_3" status "fixed" freq_hz "400000000"} clk_out4 {id "4" is_default "true" proc_sys_reset "/proc_sys_reset_4" status "fixed" freq_hz "240000000"}} [get_bd_cells /clk_wiz_0]
 
# prepare LPD interface for 240MHz for interrupt controller
disconnect_bd_net /zynq_ultra_ps_e_0_pl_clk1 [get_bd_pins zynq_ultra_ps_e_0/maxihpm0_lpd_aclk]
connect_bd_net [get_bd_pins clk_wiz_0/clk_out4] [get_bd_pins zynq_ultra_ps_e_0/maxihpm0_lpd_aclk]
 
#add interrupt core
startgroup
create_bd_cell -type ip -vlnv xilinx.com:ip:axi_intc:4.1 axi_intc_0
endgroup
 
#config interrupt core
set_property -dict [list CONFIG.C_IRQ_CONNECTION {1}] [get_bd_cells axi_intc_0]
 
#connect interrupt core
connect_bd_net [get_bd_pins axi_intc_0/s_axi_aclk] [get_bd_pins clk_wiz_0/clk_out4]
connect_bd_net [get_bd_pins axi_intc_0/s_axi_aresetn] [get_bd_pins proc_sys_reset_4/peripheral_aresetn]
 
startgroup
create_bd_cell -type ip -vlnv xilinx.com:ip:axi_interconnect:2.1 axi_interconnect_0
endgroup
set_property -dict [list CONFIG.NUM_MI {1}] [get_bd_cells axi_interconnect_0]
connect_bd_net [get_bd_pins axi_interconnect_0/ACLK] [get_bd_pins clk_wiz_0/clk_out4]
connect_bd_net [get_bd_pins axi_interconnect_0/ARESETN] [get_bd_pins proc_sys_reset_4/peripheral_aresetn]
connect_bd_net [get_bd_pins axi_interconnect_0/S00_ARESETN] [get_bd_pins proc_sys_reset_4/interconnect_aresetn]
connect_bd_net [get_bd_pins axi_interconnect_0/M00_ARESETN] [get_bd_pins proc_sys_reset_4/interconnect_aresetn]
connect_bd_net [get_bd_pins axi_interconnect_0/S00_ACLK] [get_bd_pins clk_wiz_0/clk_out4]
connect_bd_net [get_bd_pins axi_interconnect_0/M00_ACLK] [get_bd_pins clk_wiz_0/clk_out4]
 
connect_bd_intf_net [get_bd_intf_pins zynq_ultra_ps_e_0/M_AXI_HPM0_LPD] -boundary_type upper [get_bd_intf_pins axi_interconnect_0/S00_AXI]
connect_bd_intf_net -boundary_type upper [get_bd_intf_pins axi_interconnect_0/M00_AXI] [get_bd_intf_pins axi_intc_0/s_axi]
 
#rename interconnect
set_property name ps8_0_axi_periph [get_bd_cells axi_interconnect_0]
 
#add zynqUS interrupt inputs and connect intr IP core
startgroup
set_property -dict [list CONFIG.PSU__USE__IRQ0 {1}] [get_bd_cells zynq_ultra_ps_e_0]
endgroup
connect_bd_net [get_bd_pins axi_intc_0/irq] [get_bd_pins zynq_ultra_ps_e_0/pl_ps_irq0]
 
# add interrputs to platform
set_property PFM.IRQ {intr { id 0 range 32 }} [get_bd_cells /axi_intc_0]
 
# add axi buses to platform
set_property PFM.AXI_PORT {M_AXI_HPM0_FPD {memport "M_AXI_GP" sptag "GP0" memory "" is_range "false"} M_AXI_HPM1_FPD {memport "M_AXI_GP" sptag "GP1" memory "" is_range "false"} S_AXI_HPC0_FPD {memport "S_AXI_HP" sptag "HPC0" memory "" is_range "false"} S_AXI_HPC1_FPD {memport "S_AXI_HP" sptag "HPC1" memory "" is_range "false"} S_AXI_HP0_FPD {memport "S_AXI_HP" sptag "HP0" memory "" is_range "false"} S_AXI_HP1_FPD {memport "S_AXI_HP" sptag "HP1" memory "" is_range "false"} S_AXI_HP2_FPD {memport "S_AXI_HP" sptag "HP2" memory "" is_range "false"} S_AXI_HP3_FPD {memport "S_AXI_HP" sptag "HP3" memory "" is_range "false"}} [get_bd_cells /zynq_ultra_ps_e_0]
 
#add interconnect ports to platform
set_property PFM.AXI_PORT {M01_AXI {memport "M_AXI_GP" sptag "" memory "" is_range "false"} M02_AXI {memport "M_AXI_GP" sptag "" memory "" is_range "false"} M03_AXI {memport "M_AXI_GP" sptag "" memory "" is_range "false"} M04_AXI {memport "M_AXI_GP" sptag "" memory "" is_range "false"} M05_AXI {memport "M_AXI_GP" sptag "" memory "" is_range "false"} M06_AXI {memport "M_AXI_GP" sptag "" memory "" is_range "false"} M07_AXI {memport "M_AXI_GP" sptag "" memory "" is_range "false"}} [get_bd_cells /ps8_0_axi_periph]
 
# add addresses to unmapped peripherals
assign_bd_address
 
#save
save_bd_design
 
#save project XPR name
global proj_xpr
set proj_xpr [current_project]
append proj_xpr .xpr
 
#close project
close_project
 
# reopen project
open_project $proj_xpr
 
# open block design
open_bd_design [current_project].srcs/sources_1/bd/zusys/zusys.bd
 
#validate
#validate_bd_design

This script modifies the Initial platform Block design into the Extensible platform Block design and also defines define Platform Setup configuration.

In Vivado, open the design explorer and Platform description.
The fast track result is identical to the manually performed modifications described in next sections. In Vivado, save block design by clicking on icon “Save Block Design”.

Continue the design path with Validate Design.

Manual Track

In Vivado project, click in Flow Navigator on Settings. In opened Settings window, select General in Project Settings, select Project is an extensible Vitis platform. Click on OK.

IP Integrator of project set up as an extensible Vitis platform has an additional Platform Setup window.

Add multiple clocks and processor system reset IPs
In IP Integrator Diagram Window, right click, select Add IP and add Clocking Wizard IP clk_wiz_0. Double-click on the IP to Re-customize IP window.  Select Output Clocks panel. Select four clocks with frequency 100, 200, 400 and 240 MHz.
100 MHz clock will serve as low speed clock.
200 MHz and 400 MHz clock will serve as clock for possible AI engine.
240 MHz clock will serve as the default extensible platform clock. By default, Vitis will compile HW IPs with this default clock. 

Set reset type from the default Active High to Active Low

Clik on OK to close the Re-customize IP window.

Connect input resetn of clk_wiz_0 with output pl_resetn0 of zynq_ultra_ps_e_0.
Connect input clk_in1 of clk_wiz_0 with output pl_clk0 of zynq_ultra_ps_e_0.

Add and connect four Processor System Reset blocks for each generated clock.

Open Platform Setup window of IP Integrator to define Clocks. In Settings, select Clock.

In “Enabled” column select all four defined clocks clk_out1, clk_out2, clk_out3, clk_out4 of clk_wiz_0 block.

In “ID” column keep the default Clock ID: 1, 2, 3, 4

In “Is Default” column, select clk_out4 (with ID=4) as the default clock.  One and only one clock must be selected as default clock.

Disconnect input pin maxihpm0_lpd_aclk of zynq_ultra_ps_e_0 from the 100 MHz clock net. This net is driven by clock output pl_clk0 of zynq_ultra_ps_e_0.

Connect input pin maxihpm0_lpd_aclk of zynq_ultra_ps_e_0 to the 240 MHz clk_out4 of clk_wiz_0 IP block.

These two modifications are made to support the axi-lite interface of an interrupt controller operating at 240 MHz clock, identical with the default extendable platform clock.

Add, customize and connect the AXI Interrupt Controller
Add AXI Interrupt Controller IP axi_intc_0.
Double-click on axi_intc_0 to re-customize it.

In “Processor Interrupt Type and Connection” section select the “Interrupt Output Connection” from “Bus” to “Single”.

Click on OK to accept this change.

PetaLinux automatically creates correct description of the interrupt controller in the device tree.
The Vitis extensible flow generates HW IP blocks with level interrupts.

 

In case of user defined edge interrupts, the corresponding interrupt description will be added in an customised, interrupt controller description section of the user-defined device tree file
~/work/TE0808_68_240/StarterKit/os/petalinux/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi
For the default extensible platform it is not needed.


Connect interrupt controller clock input s_axi_aclk of axi_intc_0 to clock output dlk_out4 of clk_wiz_0. It is the default, 240 MHz clock of the extensible platform.

Connect interrupt controller input s_axi_aresetn of axi_intc_0 to output peripheral_aresetn[0:0] of proc_sys_reset_4 . It is the reset block for default, 240 MHz clock of the extensible platform.

Use the Run Connection Automation wizard to connect the axi lite interface of interrupt controller axi_intc_0 to zynq_ultra_ps_e_0. It is available in green line in top of the Diagram window.

In Run Connection Automaton window, click OK.

New AXI interconnect ps_8_axi_periph is created and related connections are generated.

Vitis extensible design flow will be expanding the AXI interconnect ps_8_axi_periph for interfacing and configuration of registers of generated HW IP blocks with the default extensible platform clock 240 MHz.

Modify the automatically generated reset network of AXI interconnect ps_8_axi_periph IP.

Disconnect input S00_ARESETN of ps_8_axi_periph from the network driven by output peripherial_aresetn[0:0] of proc_sys_reset_4 block.

Connect input S00_ARESETN of ps_8_axi_periph block with output interconnect_aresetn[0:0] of proc_sys_reset_4 block.

Disconnect input M00_ARESETN of ps_8_axi_periph block from the network driven by output peripherial_aresetn[0:0] of proc_sys_reset_4 block.

Connect input M00_ARESETN of ps_8_axi_periph to output interconnect_aresetn[0:0] of proc_sys_reset_4 block.

This modification will make the reset structure of the AXI interconnect ps_8_axi_periph block identical to the future extensions generated by the Vitis extensible design flow.

Double-click on zynq_ultra_ps_e_0 to re-customize it by enabling of an interrupt input pl_ps_irq0[0:0]. Click OK.

Connect the interrupt input pl_ps_irq0[0:0] of zynq_ultra_ps_e_0 block with output irq of axi_intc_0 block.

In Platform Setup, select “Interrupt” and enable intr in the “Enabled” column.

In Platform Setup, select AXI Port for zynq_ultra_ps_e_0:

Select M_AXI_HPM0_FPD and M_AXI_HPM1_FPD in column “Enabled”.

Select S_AXI_HPC0_FPD and S_AXI_HPC1_FPD in column “Enabled”.

For S_AXI_HPC0_FPD, change S_AXI_HPC to S_AXI_HP in column “Memport”.

For S_AXI_HPC1_FPD, change S_AXI_HPC to S_AXI_HP in column “Memport”.

Select S_AXI_HP0_FPD, S_AXI_HP1_FPD, S_AXI_HP2_FPD, S_AXI_HP3_FPD in column “Enabled”.

Type into the “sptag” column the names for these 6 interfaces so that they can be selected by v++ configuration during linking phase. HPC0HPC1HP0HP1HP2HP3

In “Platform Setup”, select AXI Ports for ps8_0_axi_periph:

Select M01_AXI, M02_AXI, M03_AXI, M04_AXI, M05_AXI, M06_AXI and M07_AXI in column “Enabled”.

The modifications of the default design for the extensible platform are completed, now.

In Vivado, save block design by clicking on icon “Save Block Design”.

Continue the design path with Validate Design.

Validate Design


Results of HW creation via Manual Track or Fast Track are identical.

Open diagram by clicking on zusys.bd if not already open.
In Diagram window, validate design by clicking on “Validate Design” icon.

Received Critical Messages window indicates that input intr[0:0] of axi_intc_0 is not connected. This is expected. The Vitis extensible design flow will connect this input to interrupt outputs from generated HW IPs.

 Click OK.

Known Issue: Sometimes an error in validation process may occur reporting create_pfm function is not known. Workaround is to close vivado tool and reopen again to correctly load platform export API.

You can generate pdf of the block diagram by clicking to any place in diagram window and selecting “Save as PDF File”. Use the offered default file name:
~/work/TE0808_68_240/StarterKit/vivado/zusys.pdf

Compile Created HW and Custom SW with Trenz Scripts


In Vivado Tcl Console, type following script and execute it by Enter. It will take some time to compile HW. HW design and to export the corresponding standard XSA package with included bitstream.

TE::hw_build_design -export_prebuilt

An archive is created:
~/work/TE0808_68_240/StarterKit/vivado/StarterKit_15eg_1e_4gb.xsa  

StarterKit_15eg_1e_4gb.xsa will be used for the configuration of the PetaLinux and also for creation of the Vitis Extensible Hardware platform.

Create Standalone Vitis platform:

In Vivado Tcl Console, type the following script and execute it by Enter. It will take some time to compile.

TE::sw_run_vitis -all

After the script controlling SW compilation is finished, the Vitis SDK GUI is opened.

Close the Vitis “Welcome” page.
Compile the two included SW projects.
Standalone custom Vitis platform TE0808-05-BBE21-A has been created and compiled. 

The TE0808-05-BBE21-A Vitis platform includes Trenz Electronic custom first stage boot loader in folder zynqmp_fsbl. It includes SW extension specific for the Trenz module initialisation.

This custom zynqmp_fsbl project has been compiled into executable file fsbl.elf.  It is located in: ~/work/TE0808_68_240/StarterKit/prebuilt/software/15eg_1e_4gb/fsbl.elf

This customised first stage boot loader is needed for the Vitis extensible platform.

Exit the opened Vitis SDK project.

In Vivado top menu select File->Close Project to close project. Click OK.

In Vivado top menu select File->Exit to close Vivado. Click OK.

Copy Created Custom First Stage Boot Loader


Up to now, StarterKit directory has been used for all development.
~/work/TE0808_68_240/StarterKit

Create new folders:
~/work/TE0808_68_240/StarterKit_pfm/pfm/boot
~/work/TE0808_68_240/StarterKit_pfm/pfm/sd_dir

Copy the recently created custom first stage boot loader executable file from
~/work/TE0808_68_240/StarterKit/prebuilt/software/15
eg_1e_4gb/fsbl.elf
to
~/work/TE0808_68_240/StarterKit_pfm/pfm/boot/fsbl.elf

Building Platform OS and SDK


Configuration of the Default Trenz Petalinux for the Vitis Extensible Platform


Change directory to the default Trenz Petalinux folder
~/work/TE0808_68_240/StarterKit/os/petalinux

Source Vitis and Petalinux scripts to set environment for access to Vitis and PetaLinux tools.

$ source /tools/Xilinx/Vitis/2022.2/settings64.sh
$ source ~/petalinux/2022.2/settings.sh

Configure petalinux with the StarterKit_15eg_1e_4gb.xsa for the extensible design flow by executing:

$ petalinux-config --get-hw-description=~/work/TE0808_68_240/StarterKit/vivado

 

Select Exit->Yes to close this window.

Customize Root File System, Kernel, Device Tree and U-boot

Download the Vitis-AI 3.0 repository.
In browser, open page:

https://github.com/Xilinx/Vitis-AI/tree/3.0

Clik on green Code button and download Vitis-AI-3.0.zip file.
Unzip Vitis-AI-3.0.zip file to directory ~/Downloads/Vitis-AI.

Copy ~/Downloads/Vitis-AI to  ~/work/Vitis-AI-3.0 

Delete Vitis-AI-3.0.zip,  clean trash.

The directory ~/work/Vitis-AI-3.0 contains the Vitis-AI 3.0 framework, now.

To install the Vitis-AI 3.0 version of shared libraries into rootfs (when generating system image by PetaLinux) we have to copy recepies recipes-vitis-ai to the Petalinux project :

Copy  
~/work/Vitis-AI-3.0/src/vai_petalinux_recepies/recipes-vitis-ai

to
~/work/TE0808_68_240/StarterKit/os/petalinux/project-spec/meta-user/

Delete file:
~/work/TE0808_68_240/StarterKit/os/petalinux/project-spec/meta-user/recipes-vitis-ai/vart/vart_3.0_vivado.bb
and keep only the unmodified file:
~/work/TE0808_68_240/StarterKit/os/petalinux/project-spec/meta-user/recipes-vitis-ai/vart/vart_3.0.bb
File vart_3.0.bb will create vart libraries for Vitis design flow with dependency on xrt. 

In text editor, modify the user-rootfsconfig file:
~/work/TE0808_68_240/StarterKit/os/petalinux/project-spec/meta-user/conf/user-rootfsconfig

#Note: Mention Each package in individual line
#These packages will get added into rootfs menu entry

CONFIG_startup
CONFIG_webfwu

CONFIG_xrt
CONFIG_xrt-dev
CONFIG_zocl
CONFIG_opencl-clhpp-dev
CONFIG_opencl-headers-dev
CONFIG_packagegroup-petalinux-opencv
CONFIG_packagegroup-petalinux-opencv-dev
CONFIG_dnf
CONFIG_e2fsprogs-resize2fs
CONFIG_parted
CONFIG_resize-part

CONFIG_packagegroup-petalinux-vitisai
CONFIG_packagegroup-petalinux-self-hosted
CONFIG_cmake

CONFIG_packagegroup-petalinux-vitisai-dev
CONFIG_mesa-megadriver
CONFIG_packagegroup-petalinux-x11
CONFIG_packagegroup-petalinux-v4lutils
CONFIG_packagegroup-petalinux-matchbox

CONFIG_packagegroup-petalinux-vitis-acceleration
CONFIG_packagegroup-petalinux-vitis-acceleration-dev

CONFIG_vitis-ai-library
CONFIG_vitis-ai-library-dev
CONFIG_vitis-ai-library-dbg


xrt, xrt-dev and zocl  are required for Vitis acceleration flow.
dnf is for package management.
parted, e2fsprogs-resize2fs and resize-part can be used for ext4 partition resize.

Other included packages serve for natively building Vitis AI applications on target board and for running Vitis-AI demo applications with GUI.

The last three packages will enable use of the Vitis-AI 3.0 recepies for installation of the correspoding Vitis-AI 3.0 libraries into rootfs of PetaLinux.

Enable all required packages in Petalinux configuration, from the Ubuntu terminal with exception of vitis-ai-library-dev and 
vitis-ai-library-dbg:

$ petalinux-config -c rootfs

Select all user packages by typing “y” with exception of vitis-ai-library-dev and 
vitis-ai-library-dbg. All packages will have to have an asterisk. vitis-ai-library-dev and 
vitis-ai-library-dbg will stay indicated as unselected by: [ ].

Still in the RootFS configuration window, go to root directory by select Exit once.

Enable OpenSSH and Disable Dropbear


Dropbear is the default SSH tool in Vitis Base Embedded Platform. If OpenSSH is used to replace Dropbear, the system could achieve faster data transmission speed over ssh. Created Vitis extensible platform applications may use remote display feature. Using of OpenSSH can improve the display experience.

Go to Image Features.
Disable ssh-server-dropbear and enable ssh-server-openssh and click Exit.

Go to Filesystem Packages->misc->packagegroup-core-ssh-dropbear and disable packagegroup-core-ssh-dropbear.

Go to Filesystem Packages level by Exit twice.

Go to console->network->openssh and enable openssh, openssh-sftp-server, openssh-sshd, openssh-scp.

Go to root level by selection of Exit four times.

Enable Package Management


Package management feature can allow the board to install and upgrade software packages on the fly.

In rootfs config go to Image Features and enable package-management and debug_tweaks option
Click OK, Exit twice and select Yes to save the changes.

Disable CPU IDLE in Kernel Config


CPU IDLE would cause processors get into IDLE state (WFI) when the processor is not in use. When JTAG is connected, the hardware server on host machine talks to the processor regularly. If it talks to a processor in IDLE status, the system will hang because of incomplete AXI transactions.

So, it is recommended to disable the CPU IDLE feature during project development phase.

It can be re-enabled after the design has completed to save power in final products.

Launch kernel config:

$ petalinux-config -c kernel

Ensure the following items are TURNED OFF by entering 'n' in the [ ] menu selection:

CPU Power Management->CPU Idle->CPU idle PM support

CPU Power Management->CPU Frequency scaling->CPU Frequency scaling

Exit and Yes to Save changes.

Add EXT4 rootfs Support


Let PetaLinux generate EXT4 rootfs. In terminal, execute:

$ petalinux-config

Go to Image Packaging Configuration.
Enter into Root File System Type

Select Root File System Type  EXT4

Change the “Device node” of SD device from the default value
/dev/mmcblk0p2

to new value required for the TE0808 modules on TEBF0808 carrier:
/dev/mmcblk1p2

Exit and Yes to save changes.

Let Linux Use EXT4 rootfs During Boot


The setting of which rootfs to use during boot is controlled by bootargs. We would change bootargs settings to allow Linux to boot from EXT4 partition.

In terminal, execute:

$ petalinux-config

Change DTG settings->Kernel Bootargs->generate boot args automatically to NO.

Update User Set Kernel Bootargs to:
earlycon console=ttyPS0,115200 clk_ignore_unused root=/dev/mmcblk1p2 rw rootwait cma=512M

Click OK, Exit three times and Save.

Build PetaLinux Image


In terminal, build the PetaLinux project by executing:

$ petalinux-build

The PetaLinux image files will be generated in the directory:
~/work/TE0808_68_240/StarterKit/os/petalinux/images/linux

Generation of PetaLinux takes some time and requires Ethernet connection and sufficient free disk space.

Create Petalinux SDK 


The SDK is used by Vitis tool to cross compile applications for newly created platfom.

In terminal, execute:

$ petalinux-build --sdk

The generated sysroot package sdk.sh will be located in directory
~/work/TE0808_68_240/StarterKit/os/petalinux/images/linux
 
Generation of SDK package takes some time and requires sufficient free disk space.
Time needed for these two steps depends also on number of allocated processor cores.

Copy Files for Extensible Platform


Copy these four files:

FilesFromTo
bl31.elf
pmufw.elf
system.dtb
u-boot-dtb.elf
~/work/TE0808_68_240/StarterKit/os/petalinux/images/linux~/work/TE0808_68_240/StarterKit_pfm/pfm/boot

Rename the copied file u-boot-dtb.elf to u-boot.elf

The directory
~/work/TE0808_68_240/StarterKit_pfm/pfm/boot
contains these five files:

  1. bl31.elf
  2. fsbl.elf
  3. pmufw.elf
  4. system.dtb
  5. u-boot.elf

Copy files:

FilesFrom To
boot.scr
system.dtb
~/work/TE0808_68_240/StarterKit/os/petalinux/images/linux~/work/TE0808_68_240/StarterKit_pfm/pfm/sd_dir

Copy file:

FileFromTo
init.sh~/work/TE0808_68_240/StarterKit/misc/sd~/work/TE0808_68_240/StarterKit_pfm/pfm/sd_dir

 

init.sh is an place-holder for user defined bash code to be executed after the boot:

#!/bin/sh
normal="\e[39m"
lightred="\e[91m"
lightgreen="\e[92m"
green="\e[32m"
yellow="\e[33m"
cyan="\e[36m"
red="\e[31m"
magenta="\e[95m"

echo -ne $lightred
echo Load SD Init Script
echo -ne $cyan
echo User bash Code can be inserted here and put init.sh on SD
echo -ne $normal

Create Extensible Platform zip File


Create new directory tree:
~/work/TE0808_68_240_move/StarterKit/os/petalinux/images
~/work/TE0808_68_240_move/StarterKit/Vivado
~/work/TE0808_68_240_move/StarterKit_pfm/pfm/boot ~/work/TE0808_68_240_move/StarterKit_pfm/pfm/sd_dir

Copy all files from the directory:

FilesSourceDestination
all~/work/TE0808_68_240/StarterKit/os/petalinux/images~/work/TE0808_68_240_move/StarterKit/os/petalinux/images
all~/work/TE0808_68_240/StarterKit_pfm/pfm/boot~/work/TE0808_68_240_move/StarterKit_pfm/pfm/boot
all~/work/TE0808_68_240/StarterKit_pfm/pfm/sd_dir~/work/TE0808_68_240_move/StarterKit_pfm/pfm/sd_dir
StarterKit_4ev_2gb.xsa~/work/TE0808_68_240/StarterKit/Vivado/StarterKit_4ev_2gb.xsa~/work/TE0808_68_240_move/StarterKit/Vivado/StarterKit_4ev_2gb.xsa

Zip the directory
~/work/TE0808_68_240_move
into ZIP archive:
~/work/TE0808_68_240_move.zip

The archive TE0808_68_240_move.zip can be used to create extensible platform on the same or on an another PC with installed Ubuntu 20.04 and Vitis tools, with or without installed Petalinux. The archive includes all needed components, including the Xilinx xrt library and the script sdk.sh serving for generation of the sysroot .

The archive has size approximately 3.6 GB and it is valid only for the initially selected module (68).
This is the TE0808 HW module with xczu15eg-ffvc900-1e device with 4 GB memory.
The extensible Vitis platform will have the default clock 240 MHz.

Move the TE0808_68_240_move.zip file to an PC disk drive.

Delete:
~/work/TE0808_68_240_move
~/work/TE0808_68_240_move.zip
Clean the Ubuntu Trash.

Generation of SYSROOT


This part of development can be direct continuation of the previous Petalinux configuration and compilation steps.

Alternatively, it is also possible to implement all next steps on an Ubuntu 20.04 without installed PetaLinux Only the Ubuntu 20.04 and Vitis/Vivado installation is needed.
All required files created in the PetaLinux for the specific module (68) are present in the archive: TE0808_68_240_move.zip
In this case, unzip the archive to the directory:
~/work/TE0808_68_240_move
and copy all content of directories to
~/work/TE0808_68_240
Delete the TE0808_68_240_move.zip file and the ~/work/TE0808_68_240_move directory to save filesystem space.

In Ubuntu terminal, change the working directory to:
~/work/TE0808_68_240/StarterKit/os/petalinux/images/linux

In Ubuntu terminal, execute script enabling access to Vitis 2022 tools.
Execution of script serving for setting up PetaLinux environment is not necessary:

$ source /tools/Xilinx/Vitis/2022.2/settings64.sh

In Ubuntu terminal, execute script

$ ./sdk.sh -d ~/work/TE0808_68_240/StarterKit_pfm

SYSROOT directories and files for PC and for Zynq Ultrascale+  will be created in:
~/work/TE0808_68_240/StarterKit_pfm/sysroots/x86_64-petalinux-linux
~/work/TE0808_68_240/StarterKit_pfm/sysroots/cortexa72-cortexa53-xilinx-linux

Once created, do not move these sysroot directories (due to some internally created paths).

Generation of Extensible Platform for Vitis


In Ubuntu terminal, change the working directory to:
~/work/TE0808_68_240/StarterKit_pfm

Start the Vitis tool by executing

$ vitis &

In Vitis “Launcher”, set the workspace for the extensible platform compilation:
~/work/TE0808_68_240/StarterKit_pfm

Click on “Launch” to launch Vitis

Close Welcome page.

In Vitis, select in the main menu: File -> New -> Platform Project

Type name of the extensible platform:  TE0808_68_240_pfm. Click Next.

 Choose for hardware specification for the platform file:
 ~/work/TE0808_68_240/StarterKit/vivado/StarterKit_15eg_1e_4gb.xsa

In “Software specification” select: linux
In “Boot Components” unselect Generate boot components
(these components have been already generated by Vivado and PetaLinux design flow)

New window TE0808_68_240_pfm is opened.

Click on linux on psu_cortex53 to open window Domain: linux_domain

In “Description”: write xrt  

In “Bif File” find and select the pre-defied option:  Generate Bif

In “Boot Components Directory” select:
~/work/TE0808_68_240/StarterKit_pfm/pfm/boot

In “FAT32 Partition Directory” select:
~/work/TE0808_68_240/StarterKit_pfm/pfm/sd_dir

In Vitis IDE “Explorer” section, click on TE0808_68_240_pfm to highlight it.

Right-click on the highlighted TE0808_68_240_pfm and select build project in the open submenu. Platform is compiled in few seconds.
Close the Vitis tool by selection: File -> Exit.

Vits extensible platform TE0808_68_240_pfm has been created in the directory:
~/work/TE0808_68_240/StarterKit_pfm/TE0808_68_240_pfm/export/TE0808_68_240_pfm

Platform Usage


Test 1: Read Platform Info


With Vitis environment setup, platforminfo tool can report XPFM platform information.

platforminfo ~/work/TE0808_68_240/StarterKit_pfm/TE0808_68_240_pfm/export/TE0808_68_240_pfm/TE0808_68_240_pfm.xpfm 
Detailed listing from platforminfo utility
==========================
Basic Platform Information
==========================
Platform:           te0808_68_240_pfm
File:               /home/devel/work/TE0808_68_240/StarterKit_pfm/te0808_68_240_pfm/export/te0808_68_240_pfm/te0808_68_240_pfm.xpfm
Description:        
te0808_68_240_pfm
    

=====================================
Hardware Platform (Shell) Information
=====================================
Vendor:                           trenz
Board:                            zusys
Name:                             zusys
Version:                          4.0
Generated Version:                2022.2
Hardware:                         1
Software Emulation:               1
Hardware Emulation:               0
Hardware Emulation Platform:      0
FPGA Family:                      zynquplus
FPGA Device:                      xczu15eg
Board Vendor:                     trenz.biz
Board Name:                       trenz.biz:te0808_15eg_1e_tebf0808:4.0
Board Part:                       xczu15eg-ffvc900-1-e

=================
Clock Information
=================
  Default Clock Index: 4
  Clock Index:         1
    Frequency:         100.000000
  Clock Index:         2
    Frequency:         200.000000
  Clock Index:         3
    Frequency:         400.000000
  Clock Index:         4
    Frequency:         240.000000

==================
Memory Information
==================
  Bus SP Tag: HP0
  Bus SP Tag: HP1
  Bus SP Tag: HP2
  Bus SP Tag: HP3
  Bus SP Tag: HPC0
  Bus SP Tag: HPC1

=============================
Software Platform Information
=============================
Number of Runtimes:            1
Default System Configuration:  te0808_68_240_pfm
System Configurations:
  System Config Name:                      te0808_68_240_pfm
  System Config Description:               te0808_68_240_pfm
  System Config Default Processor Group:   linux_domain
  System Config Default Boot Image:        standard
  System Config Is QEMU Supported:         1
  System Config Processor Groups:
    Processor Group Name:      linux on psu_cortexa53
    Processor Group CPU Type:  cortex-a53
    Processor Group OS Name:   linux
  System Config Boot Images:
    Boot Image Name:           standard
    Boot Image Type:           
    Boot Image BIF:            te0808_68_240_pfm/boot/linux.bif
    Boot Image Data:           te0808_68_240_pfm/linux_domain/image
    Boot Image Boot Mode:      sd
    Boot Image RootFileSystem: 
    Boot Image Mount Path:     /mnt
    Boot Image Read Me:        te0808_68_240_pfm/boot/generic.readme
    Boot Image QEMU Args:      te0808_68_240_pfm/qemu/pmu_args.txt:te0808_68_240_pfm/qemu/qemu_args.txt
    Boot Image QEMU Boot:      
    Boot Image QEMU Dev Tree:  
Supported Runtimes:
  Runtime: OpenCL

Test 2: Run Vector Addition Example


Create new directory StarterKit_test_vadd  to test Vitis extendable flow example “vector addition”
~/work/TE0808_68_240/StarterKit_test_vadd

Current directory structure:
~/work/TE0808_68_240/StarterKit
~/work/TE0808_68_240/StarterKit_pfm
~/work/TE0808_68_240/StarterKit_test_vadd

Change working directory:

$cd ~/work/TE0808_68_240/StarterKit_test_vadd

In Ubuntu terminal, start Vitis by:

$ vitis &

In Vitis IDE Launcher, select your working directory
~/work/TE0808_68_240/StarterKit_test_vadd
Click on Launch to launch Vitis.

Select File -> New -> Application project. Click Next.

Skip welcome page if shown.

Click on “+ Add” icon and select the custom extensible platform TE0808_68_240_pfm[custom] in the directory:
~/work/TE0808_68_240/StarterKit_pfm/TE0808_68_240_pfm/export/TE0808_68_240_pfm

We can see available PL clocks and frequencies.

PL4 with 240 MHz clock is has been set as default in the platform creation process.


 Click Next.
In “Application Project Details” window type into Application project name: test_vadd
Click Next.
In “Domain window” type (or select by browse):
“Sysroot path”:
~/work/TE0808_68_240/StarterKit_pfm/sysroots/cortexa72-cortexa53-xilinx-linux
“Root FS”:
~/work/TE0808_68_240/StarterKit/os/petalinux/images/linux/rootfs.ext4
“Kernel Image”:
~/work/TE0808_68_240/StarterKit/os/petalinux/images/linux/Image
Click Next.

In “Templates window”, if not done before, update “Vitis IDE Examples” and “Vitis IDE Libraries”.

Select Host Examples
In “Find”, type: “vector add” to search for the “Vector Addition” example.

Select: “Vector Addition”
Click Finish
New project template is created.

In test_vadd window menu “Active build configuration” switch from “SW Emulation” to “Hardware”.

In “Explorer” section of Vitis IDE, click on:  test_vadd_system[TE0808_68_240_pfm] to select it.

Right Click on:  test_vadd_system[TE0808_68_240_pfm] and select in the opened sub-menu:
Build project

Vitis will compile:
In test_vadd_kernels subproject, compile the krnl_vadd from C++ SW to HDL HW IP source code
In test_vadd_system_hw_link subproject, compile  the krnl_vadd HDL together with TE0808_68_240_pfm into new, extended HW design with new accelerated (krnl_vadd) will run on the default 240 MHz clock. This step can take some time.
In test_vadd subproject, compile the vadd.cpp application example.

Extended HW


Run Compiled Example Application


The sd_card.img file is output of the compilation and packing by Vitis. It is located in directory:
~/work/TE0808_68_240/StarterKit_test_vadd/test_vadd_system/Hardware/package/sd_card.img

Write the sd card image from the sd_card.img file to SD card.

In Windows 10 (or Windows 11) PC, install program Win32DiskImager  for this task. Win32 Disk Imager can write raw disk image to removable devices.
https://win32diskimager.org/

Insert the SD card to the TEBF0808 carrier board.

Connect PC USB terminal (115200 bps) card to the TEBF0808 carrier board.

Connect USB Keyboard and USB Mouse to the TEBF0808 carrier board.

Connect Ethernet cable to the TEBF0808 carrier board.

Power on the TEBF0808 carrier board.

In PC, find the assigned serial line COM port number for the USB terminal. In case of Win 10 use device manager.

In PC, open serial line terminal with the assigned COM port number. Speed 115200 bps.

Connect Monitor to the Display Port connector of the TEBF0808 carrier board.

On TEBF0808, press button S1 to start the system (press the button for cca. 1 sec. ).
(FMC fan starts to rotate, USB terminal starts to display booting information)

Display Port Monitor indicates text “Please wait: Booting…” (white text, black background).

X11 screen opens on Display port. In case of problems with DisplayPort display, you can identify the resolutions potentially supported  by your display and set resolution.

Terminal commands for change of DisplayPort display resolution:
root@Trenz:~# export DISPLAY=:0.0
root@Trenz:~# xrandr --prop
Screen 0: minimum 320 x 200, current 1280 x 720, maximum 4096 x 4096
DP-1 connected primary 1280x720+0+0 600mm x 340mm
        EDID:
                00ffffffffffff001e6d095b021e0200
                081a0104b53c22789e3035a7554ea326
                0f50542108007140818081c0a9c0d1c0
                8100010101014dd000a0f0703e803020
                650c58542100001a286800a0f0703e80
                0890650c58542100001a000000fd0038
                3d1e8738000a202020202020000000fc
                004c4720556c7472612048440a200177
                02031171449004030123090707830100
                00023a801871382d40582c4500585421
                00001e565e00a0a0a029503020350058
                542100001a0000000000000000000000
                00000000000000000000000000000000
                00000000000000000000000000000000
                00000000000000000000000000000000
                000000000000000000000000000000c8
        bpc: 8BPC
                supported: 6BPC, 8BPC, 10BPC, 12BPC
        sync: 0
                range: (0, 1)
        link-status: Good
                supported: Good, Bad
        non-desktop: 0
                range: (0, 1)
   1920x1080     60.00    59.94
   1600x900      60.00
   1280x1024     60.02
   1280x800      59.81
   1280x720      60.00*   59.94
   1024x768      60.00
   800x600       60.32
   720x480       60.00    59.94
   640x480       60.00    59.94
root@Trenz:~# xrandr --output DP-1 --mode 1280x720
root@Trenz:~# 


If the direct connection to the DisplayPort display fails, you can connect via Ethernet to the X11 terminal running on your PC Ubuntu with PuTTY application.

  • Find Ethernet IP address of your board by ifconfig command in PetaLinux terminal.
  • In PC Ubuntu OS, open PuTTY application.
  • In PuTTY, set  Ethernet IP of your board.
  • In PuTTY, select checkbox SSH->X11->Enable X11 forwarding.
  • PC mouse and keyboard will be used.
  • In PuTTY, open PetaLinux terminal and login as user: root pswd: root.
  • In opened PetaLinux terminal, start X11 desktop x-session-manager by typing:
    root@Trenz:~# x-session-manager & 

In cae of DisplayPort display, mouse and keyboard connected to the TEBF0808 carrier board will be used.

Click on “Terminal” icon (A Unicode capable rxvt)

Terminal opens as an X11 graphic window.

In terminal, use keyboard connected to the TEBF0808 carrier board and type:

root@Trenz:~# cd /run/media/mmcblk1p1/ 
root@Trenz:~# ./test_vadd krnl_vadd.xclbin

The application test_vadd should run with this output:

root@Trenz:~# cd /run/media/mmcblk1p1/ 
root@Trenz:~# ./test_vadd krnl_vadd.xclbin
INFO: Reading krnl_vadd.xclbin
Loading: 'krnl_vadd.xclbin'
Trying to program device[0]: edge
Device[0]: program successful!
TEST PASSED 
root@Trenz:~#

The TEBF0808 carrier with TE0808-05-BBE21-A module is running the PetaLinux OS and drives simple version of an X11 GUI on monitor with Display Port. Application test_vadd has been started from xrvt terminal emulator. 

The Vitis application has been compiled to HW and evaluated on custom system
with extensible custom TE0808_68_240_pfm platform.

Close the rxvt terminal emulator by click ”x” icon (in the upper right corner) or by typing:

root@Trenz:~# exit

In X11, click ”Shutdown” icon to close down safely.

System is halted. Messages relate to halt of the system can be seen on the USB terminal).
The Display Port output is switched off.
The TEBF0808 carrier board can be powered off by pressing on the S1 switch (cca. 1 sec long).
The FMC fan stops.

The SD card can be safely removed from the TEBF0808 carrier board, now.

The TEBF0808 carrier board can be disconnected from power.

Full listing of PC USB petalinux console after following operations are performed:
--------------------------------------------------------------------------------
TE0808 TE_XFsbl_HookPsuInit_Custom
Configure Carrier I2C Switch 0x77
Configure PLL: SI5345-B
Si534x Init Registers Write.
Si534x Init Complete.
Status   0xC:0x0, 0xE:0x0, 0xD:0x0, 0x11:0, 0xF:0 (...waiting for calibration...PLL Status Register   0xC:0x0, 0xE:0x0, 0xD:0x0, 0x11:0, 0xF:0.
USB Reset Complete
PCIe Reset Complete

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Xilinx Zynq MP First Stage Boot Loader (TE modified)
Release 2022.2   Aug 17 2023  -  12:57:17
Device Name: XCZU15EG

--------------------------------------------------------------------------------
TE0808 TE_XFsbl_BoardInit_Custom
Configure Carrier I2C Switch 0x73 for EEPROM access
Configure Carrier I2C Switch 0x77 to avoid conflicts with EEPROM

--------------------------------------------------------------------------------
NOTICE:  BL31: v2.6(release):xlnx_rebase_v2.6_2022.1_update3-18-g0897efd45
NOTICE:  BL31: Built : 03:55:03, Sep  9 2022


U-Boot 2022.01 (Sep 20 2022 - 06:35:33 +0000) TE0808

CPU:   ZynqMP
Silicon: v3
Board: Xilinx ZynqMP
DRAM:  4 GiB
PMUFW:  v1.1
PMUFW no permission to change config object
EL Level:       EL2
Chip ID:        zu15eg
NAND:  0 MiB
MMC:   mmc@ff160000: 0, mmc@ff170000: 1
Loading Environment from nowhere... OK
In:    serial
Out:   serial
Err:   serial
Bootmode: SD_MODE1
Reset reason:   EXTERNAL
Net:   FEC: can't find phy-handle

ZYNQ GEM: ff0e0000, mdio bus ff0e0000, phyaddr 1, interface rgmii-id

Error: ethernet@ff0e0000 address not set.
No ethernet found.

scanning bus for devices...
SATA link 0 timeout.
SATA link 1 timeout.
AHCI 0001.0301 32 slots 2 ports 6 Gbps 0x3 impl SATA mode
flags: 64bit ncq pm clo only pmp fbss pio slum part ccc apst
starting USB...
Bus usb@fe200000: Register 2000440 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus usb@fe200000 for devices... 6 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found U-Boot script /boot.scr
2777 bytes read in 15 ms (180.7 KiB/s)
## Executing script at 20000000
Trying to load boot images from mmc1
21594624 bytes read in 1604 ms (12.8 MiB/s)
41743 bytes read in 17 ms (2.3 MiB/s)
## Flattened Device Tree blob at 00100000
   Booting using the fdt blob at 0x100000
FEC: can't find phy-handle

ZYNQ GEM: ff0e0000, mdio bus ff0e0000, phyaddr 1, interface rgmii-id

Error: ethernet@ff0e0000 address not set.
FEC: can't find phy-handle

ZYNQ GEM: ff0e0000, mdio bus ff0e0000, phyaddr 1, interface rgmii-id

Error: ethernet@ff0e0000 address not set.
   Loading Device Tree to 000000007bbee000, end 000000007bbfb30e ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.15.36-xilinx-v2022.2 (oe-user@oe-host) (aarch64-xilinx-linux-gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37.20210721) #1 SMP Mon Oct 3 07:50:07 UTC 2022
[    0.000000] Machine model: xlnx,zynqmp
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff000000 (options '115200n8')
[    0.000000] printk: bootconsole [cdns0] enabled
[    0.000000] efi: UEFI not found.
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000000000000-0x00000000ffffffff]
[    0.000000]   Normal   [mem 0x0000000100000000-0x000000087fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000007fefffff]
[    0.000000]   node   0: [mem 0x0000000800000000-0x000000087fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000087fffffff]
[    0.000000] On node 0, zone Normal: 256 pages in unavailable ranges
[    0.000000] cma: Reserved 512 MiB at 0x000000005b800000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.2
[    0.000000] percpu: Embedded 18 pages/cpu s34328 r8192 d31208 u73728
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 1031940
[    0.000000] Kernel command line: earlycon console=ttyPS0,115200 clk_ignore_unused root=/dev/mmcblk1p2 rw rootwait cma=512M
[    0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: mapped [mem 0x000000007bf00000-0x000000007ff00000] (64MB)
[    0.000000] Memory: 3500580K/4193280K available (13952K kernel code, 992K rwdata, 3944K rodata, 2112K init, 578K bss, 168412K reserved, 524288K cma-reserved)
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=16 to nr_cpu_ids=4.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] random: get_random_bytes called from start_kernel+0x474/0x6d8 with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 33.33MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x7b00c47c0, max_idle_ns: 440795202120 ns
[    0.000000] sched_clock: 56 bits at 33MHz, resolution 30ns, wraps every 2199023255541ns
[    0.008350] Console: colour dummy device 80x25
[    0.012400] Calibrating delay loop (skipped), value calculated using timer frequency.. 66.66 BogoMIPS (lpj=133333)
[    0.022666] pid_max: default: 32768 minimum: 301
[    0.027482] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.034614] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.043547] rcu: Hierarchical SRCU implementation.
[    0.047416] EFI services will not be available.
[    0.051804] smp: Bringing up secondary CPUs ...
[    0.056557] Detected VIPT I-cache on CPU1
[    0.056600] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.057045] Detected VIPT I-cache on CPU2
[    0.057072] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.057487] Detected VIPT I-cache on CPU3
[    0.057513] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.057562] smp: Brought up 1 node, 4 CPUs
[    0.091605] SMP: Total of 4 processors activated.
[    0.096277] CPU features: detected: 32-bit EL0 Support
[    0.101381] CPU features: detected: CRC32 instructions
[    0.106525] CPU: All CPU(s) started at EL2
[    0.110564] alternatives: patching kernel code
[    0.115975] devtmpfs: initialized
[    0.123928] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.128027] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.147707] pinctrl core: initialized pinctrl subsystem
[    0.148175] DMI not present or invalid.
[    0.151367] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.158098] DMA: preallocated 512 KiB GFP_KERNEL pool for atomic allocations
[    0.164101] DMA: preallocated 512 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.171912] audit: initializing netlink subsys (disabled)
[    0.177322] audit: type=2000 audit(0.120:1): state=initialized audit_enabled=0 res=1
[    0.177744] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.191740] ASID allocator initialised with 65536 entries
[    0.197160] Serial: AMBA PL011 UART driver
[    0.223125] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[    0.224182] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[    0.230855] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.237523] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[    1.466118] cryptd: max_cpu_qlen set to 1000
[    1.493188] DRBG: Continuing without Jitter RNG
[    1.601215] raid6: neonx8   gen()  1859 MB/s
[    1.669274] raid6: neonx8   xor()  1387 MB/s
[    1.737347] raid6: neonx4   gen()  1906 MB/s
[    1.805415] raid6: neonx4   xor()  1360 MB/s
[    1.873497] raid6: neonx2   gen()  1810 MB/s
[    1.941557] raid6: neonx2   xor()  1247 MB/s
[    2.009643] raid6: neonx1   gen()  1542 MB/s
[    2.077710] raid6: neonx1   xor()  1061 MB/s
[    2.145794] raid6: int64x8  gen()  1185 MB/s
[    2.213851] raid6: int64x8  xor()   677 MB/s
[    2.281942] raid6: int64x4  gen()  1397 MB/s
[    2.349995] raid6: int64x4  xor()   743 MB/s
[    2.418081] raid6: int64x2  gen()  1222 MB/s
[    2.486152] raid6: int64x2  xor()   654 MB/s
[    2.554214] raid6: int64x1  gen()   903 MB/s
[    2.622291] raid6: int64x1  xor()   452 MB/s
[    2.622331] raid6: using algorithm neonx4 gen() 1906 MB/s
[    2.626290] raid6: .... xor() 1360 MB/s, rmw enabled
[    2.631220] raid6: using neon recovery algorithm
[    2.636324] iommu: Default domain type: Translated
[    2.640655] iommu: DMA domain TLB invalidation policy: strict mode
[    2.647106] SCSI subsystem initialized
[    2.650746] usbcore: registered new interface driver usbfs
[    2.656075] usbcore: registered new interface driver hub
[    2.661350] usbcore: registered new device driver usb
[    2.666411] mc: Linux media interface: v0.10
[    2.670596] videodev: Linux video capture interface: v2.00
[    2.676065] pps_core: LinuxPPS API ver. 1 registered
[    2.680959] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    2.690049] PTP clock support registered
[    2.693955] EDAC MC: Ver: 3.0.0
[    2.697354] zynqmp-ipi-mbox mailbox@ff990400: Registered ZynqMP IPI mbox with TX/RX channels.
[    2.705732] FPGA manager framework
[    2.709027] Advanced Linux Sound Architecture Driver Initialized.
[    2.715295] Bluetooth: Core ver 2.22
[    2.718514] NET: Registered PF_BLUETOOTH protocol family
[    2.723778] Bluetooth: HCI device and connection manager initialized
[    2.730094] Bluetooth: HCI socket layer initialized
[    2.734937] Bluetooth: L2CAP socket layer initialized
[    2.739958] Bluetooth: SCO socket layer initialized
[    2.745155] clocksource: Switched to clocksource arch_sys_counter
[    2.750996] VFS: Disk quotas dquot_6.6.0
[    2.754783] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    2.766589] NET: Registered PF_INET protocol family
[    2.766766] IP idents hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    2.775558] tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes, linear)
[    2.782298] TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    2.790352] TCP bind hash table entries: 32768 (order: 7, 524288 bytes, linear)
[    2.797818] TCP: Hash tables configured (established 32768 bind 32768)
[    2.803947] UDP hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    2.810617] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    2.817782] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    2.823576] RPC: Registered named UNIX socket transport module.
[    2.829143] RPC: Registered udp transport module.
[    2.833808] RPC: Registered tcp transport module.
[    2.838475] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.844881] PCI: CLS 0 bytes, default 64
[    2.849127] armv8-pmu pmu: hw perfevents: no interrupt-affinity property, guessing.
[    2.856563] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    2.893092] Initialise system trusted keyrings
[    2.893264] workingset: timestamp_bits=46 max_order=20 bucket_order=0
[    2.899068] NFS: Registering the id_resolver key type
[    2.903337] Key type id_resolver registered
[    2.907477] Key type id_legacy registered
[    2.911472] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    2.918121] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    2.925482] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    2.974341] NET: Registered PF_ALG protocol family
[    2.974389] xor: measuring software checksum speed
[    2.983016]    8regs           :  2068 MB/sec
[    2.987077]    32regs          :  2449 MB/sec
[    2.991992]    arm64_neon      :  2019 MB/sec
[    2.992032] xor: using function: 32regs (2449 MB/sec)
[    2.996243] Key type asymmetric registered
[    3.000311] Asymmetric key parser 'x509' registered
[    3.005188] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
[    3.012506] io scheduler mq-deadline registered
[    3.017002] io scheduler kyber registered
[    3.021293] irq-xilinx: mismatch in kind-of-intr param
[    3.026087] irq-xilinx: /amba_pl@0/interrupt-controller@80000000: num_irq=32, sw_irq=0, edge=0x1
[    3.066406] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    3.068319] Serial: AMBA driver
[    3.071174] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    3.081172] brd: module loaded
[    3.085017] loop: module loaded
[    3.086667] mtdoops: mtd device (mtddev=name/number) must be supplied
[    3.092074] tun: Universal TUN/TAP device driver, 1.6
[    3.094044] CAN device driver interface
[    3.098560] usbcore: registered new interface driver asix
[    3.103158] usbcore: registered new interface driver ax88179_178a
[    3.109189] usbcore: registered new interface driver cdc_ether
[    3.114984] usbcore: registered new interface driver net1080
[    3.120606] usbcore: registered new interface driver cdc_subset
[    3.126488] usbcore: registered new interface driver zaurus
[    3.132035] usbcore: registered new interface driver cdc_ncm
[    3.138369] usbcore: registered new interface driver uas
[    3.142939] usbcore: registered new interface driver usb-storage
[    3.149546] rtc_zynqmp ffa60000.rtc: registered as rtc0
[    3.154076] rtc_zynqmp ffa60000.rtc: setting system clock to 2023-08-18T08:57:54 UTC (1692349074)
[    3.162946] i2c_dev: i2c /dev entries driver
[    3.169082] usbcore: registered new interface driver uvcvideo
[    3.173333] Bluetooth: HCI UART driver ver 2.3
[    3.177248] Bluetooth: HCI UART protocol H4 registered
[    3.182348] Bluetooth: HCI UART protocol BCSP registered
[    3.187640] Bluetooth: HCI UART protocol LL registered
[    3.192728] Bluetooth: HCI UART protocol ATH3K registered
[    3.198108] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    3.204357] Bluetooth: HCI UART protocol Intel registered
[    3.209700] Bluetooth: HCI UART protocol QCA registered
[    3.214898] usbcore: registered new interface driver bcm203x
[    3.220523] usbcore: registered new interface driver bpa10x
[    3.226060] usbcore: registered new interface driver bfusb
[    3.231505] usbcore: registered new interface driver btusb
[    3.236969] usbcore: registered new interface driver ath3k
[    3.242467] EDAC MC: ECC not enabled
[    3.246067] EDAC DEVICE0: Giving out device to module edac controller cache_err: DEV edac (POLLED)
[    3.255013] EDAC DEVICE1: Giving out device to module zynqmp-ocm-edac controller zynqmp_ocm: DEV ff960000.memory-controller (INTERRUPT)
[    3.267331] sdhci: Secure Digital Host Controller Interface driver
[    3.273088] sdhci: Copyright(c) Pierre Ossman
[    3.277411] sdhci-pltfm: SDHCI platform and OF driver helper
[    3.283399] ledtrig-cpu: registered to indicate activity on CPUs
[    3.289114] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
[    3.295472] zynqmp_firmware_probe Platform Management API v1.1
[    3.301203] zynqmp_firmware_probe Trustzone version v1.0
[    3.336840] securefw securefw: securefw probed
[    3.336986] zynqmp_aes firmware:zynqmp-firmware:zynqmp-aes: The zynqmp-aes driver shall be deprecated in 2022.2 and removed in 2023.1
[    3.347817] alg: No test for xilinx-zynqmp-aes (zynqmp-aes)
[    3.353236] zynqmp_aes firmware:zynqmp-firmware:zynqmp-aes: AES Successfully Registered
[    3.361298] zynqmp-keccak-384 firmware:zynqmp-firmware:sha384: The zynqmp-sha-deprecated driver shall be deprecated in 2022.2 and removed in 2023.1 release
[    3.375086] alg: No test for xilinx-keccak-384 (zynqmp-keccak-384)
[    3.381366] alg: No test for xilinx-zynqmp-rsa (zynqmp-rsa)
[    3.386854] usbcore: registered new interface driver usbhid
[    3.392226] usbhid: USB HID core driver
[    3.399402] ARM CCI_400_r1 PMU driver probed
[    3.400110] fpga_manager fpga0: Xilinx ZynqMP FPGA Manager registered
[    3.407125] usbcore: registered new interface driver snd-usb-audio
[    3.413710] pktgen: Packet Generator for packet performance testing. Version: 2.75
[    3.421182] Initializing XFRM netlink socket
[    3.424640] NET: Registered PF_INET6 protocol family
[    3.430010] Segment Routing with IPv6
[    3.433162] In-situ OAM (IOAM) with IPv6
[    3.437094] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    3.443279] NET: Registered PF_PACKET protocol family
[    3.447947] NET: Registered PF_KEY protocol family
[    3.452703] can: controller area network core
[    3.457041] NET: Registered PF_CAN protocol family
[    3.461771] can: raw protocol
[    3.464706] can: broadcast manager protocol
[    3.468867] can: netlink gateway - max_hops=1
[    3.473265] Bluetooth: RFCOMM TTY layer initialized
[    3.478041] Bluetooth: RFCOMM socket layer initialized
[    3.483146] Bluetooth: RFCOMM ver 1.11
[    3.486858] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    3.492131] Bluetooth: BNEP filters: protocol multicast
[    3.497322] Bluetooth: BNEP socket layer initialized
[    3.502249] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    3.508135] Bluetooth: HIDP socket layer initialized
[    3.513089] 8021q: 802.1Q VLAN Support v1.8
[    3.517321] 9pnet: Installing 9P2000 support
[    3.521480] Key type dns_resolver registered
[    3.525833] registered taskstats version 1
[    3.529761] Loading compiled-in X.509 certificates
[    3.535709] Btrfs loaded, crc32c=crc32c-generic, zoned=no, fsverity=no
[    3.550602] ff000000.serial: ttyPS0 at MMIO 0xff000000 (irq = 67, base_baud = 6249999) is a xuartps
[    3.559640] printk: console [ttyPS0] enabled
[    3.559640] printk: console [ttyPS0] enabled
[    3.563942] printk: bootconsole [cdns0] disabled
[    3.563942] printk: bootconsole [cdns0] disabled
[    3.573198] of-fpga-region fpga-full: FPGA Region probed
[    3.584326] nwl-pcie fd0e0000.pcie: host bridge /axi/pcie@fd0e0000 ranges:
[    3.591237] nwl-pcie fd0e0000.pcie:      MEM 0x00e0000000..0x00efffffff -> 0x00e0000000
[    3.599247] nwl-pcie fd0e0000.pcie:      MEM 0x0600000000..0x07ffffffff -> 0x0600000000
[    3.607339] nwl-pcie fd0e0000.pcie: Link is DOWN
[    3.612125] nwl-pcie fd0e0000.pcie: PCI host bridge to bus 0000:00
[    3.618304] pci_bus 0000:00: root bus resource [bus 00-ff]
[    3.623786] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    3.630664] pci_bus 0000:00: root bus resource [mem 0x600000000-0x7ffffffff pref]
[    3.638167] pci 0000:00:00.0: [10ee:d021] type 01 class 0x060400
[    3.644235] pci 0000:00:00.0: PME# supported from D0 D1 D2 D3hot
[    3.653115] pci 0000:00:00.0: PCI bridge to [bus 01-0c]
[    3.658693] xilinx-zynqmp-dma fd500000.dma-controller: ZynqMP DMA driver Probe success
[    3.666803] xilinx-zynqmp-dma fd510000.dma-controller: ZynqMP DMA driver Probe success
[    3.674908] xilinx-zynqmp-dma fd520000.dma-controller: ZynqMP DMA driver Probe success
[    3.683015] xilinx-zynqmp-dma fd530000.dma-controller: ZynqMP DMA driver Probe success
[    3.691115] xilinx-zynqmp-dma fd540000.dma-controller: ZynqMP DMA driver Probe success
[    3.699228] xilinx-zynqmp-dma fd550000.dma-controller: ZynqMP DMA driver Probe success
[    3.707333] xilinx-zynqmp-dma fd560000.dma-controller: ZynqMP DMA driver Probe success
[    3.715440] xilinx-zynqmp-dma fd570000.dma-controller: ZynqMP DMA driver Probe success
[    3.723614] xilinx-zynqmp-dma ffa80000.dma-controller: ZynqMP DMA driver Probe success
[    3.731729] xilinx-zynqmp-dma ffa90000.dma-controller: ZynqMP DMA driver Probe success
[    3.739837] xilinx-zynqmp-dma ffaa0000.dma-controller: ZynqMP DMA driver Probe success
[    3.747944] xilinx-zynqmp-dma ffab0000.dma-controller: ZynqMP DMA driver Probe success
[    3.756060] xilinx-zynqmp-dma ffac0000.dma-controller: ZynqMP DMA driver Probe success
[    3.764167] xilinx-zynqmp-dma ffad0000.dma-controller: ZynqMP DMA driver Probe success
[    3.772277] xilinx-zynqmp-dma ffae0000.dma-controller: ZynqMP DMA driver Probe success
[    3.780384] xilinx-zynqmp-dma ffaf0000.dma-controller: ZynqMP DMA driver Probe success
[    3.788745] xilinx-zynqmp-dpdma fd4c0000.dma-controller: Xilinx DPDMA engine is probed
[    3.797659] zynqmp-display fd4a0000.display: vtc bridge property not present
[    3.806639] xilinx-dp-snd-codec fd4a0000.display:zynqmp_dp_snd_codec0: Xilinx DisplayPort Sound Codec probed
[    3.816737] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm0: Xilinx DisplayPort Sound PCM probed
[    3.824830] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm1: Xilinx DisplayPort Sound PCM probed
[    3.833756] xilinx-dp-snd-card fd4a0000.display:zynqmp_dp_snd_card: Xilinx DisplayPort Sound Card probed
[    3.843341] OF: graph: no port node found in /axi/display@fd4a0000
[    3.849929] xlnx-drm xlnx-drm.0: bound fd4a0000.display (ops 0xffff800008e749d8)
[    4.041857] Console: switching to colour frame buffer device 240x67
[    4.064805] zynqmp-display fd4a0000.display: [drm] fb0: xlnxdrmfb frame buffer device
[    4.072883] [drm] Initialized xlnx 1.0.0 20130509 for fd4a0000.display on minor 0
[    4.080395] zynqmp-display fd4a0000.display: ZynqMP DisplayPort Subsystem driver probed
[    4.088696] ahci-ceva fd0c0000.ahci: supply ahci not found, using dummy regulator
[    4.096272] ahci-ceva fd0c0000.ahci: supply phy not found, using dummy regulator
[    4.103701] ahci-ceva fd0c0000.ahci: supply target not found, using dummy regulator
[    4.111505] ahci-ceva fd0c0000.ahci: AHCI 0001.0301 32 slots 2 ports 6 Gbps 0x3 impl platform mode
[    4.120472] ahci-ceva fd0c0000.ahci: flags: 64bit ncq sntf pm clo only pmp fbs pio slum part ccc sds apst
[    4.130971] scsi host0: ahci-ceva
[    4.134604] scsi host1: ahci-ceva
[    4.138049] ata1: SATA max UDMA/133 mmio [mem 0xfd0c0000-0xfd0c1fff] port 0x100 irq 52
[    4.145972] ata2: SATA max UDMA/133 mmio [mem 0xfd0c0000-0xfd0c1fff] port 0x180 irq 52
[    4.154823] spi-nor spi0.0: mt25qu512a (131072 Kbytes)
[    4.159986] 4 fixed-partitions partitions found on MTD device spi0.0
[    4.166351] Creating 4 MTD partitions on "spi0.0":
[    4.171139] 0x000000000000-0x000000a00000 : "qspi-boot"
[    4.177277] 0x000000a00000-0x000002a00000 : "qspi-kernel"
[    4.183496] 0x000002a00000-0x000002a40000 : "qspi-bootenv"
[    4.189785] 0x000002a40000-0x000002ac0000 : "bootscr"
[    4.196341] xilinx_can ff060000.can can0: TDC Offset value not in range
[    4.203526] xilinx-axipmon ffa00000.perf-monitor: Probed Xilinx APM
[    4.210078] xilinx-axipmon fd0b0000.perf-monitor: Probed Xilinx APM
[    4.216613] xilinx-axipmon fd490000.perf-monitor: Probed Xilinx APM
[    4.223140] xilinx-axipmon ffa10000.perf-monitor: Probed Xilinx APM
[    4.250651] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    4.256147] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 1
[    4.263907] xhci-hcd xhci-hcd.1.auto: hcc params 0x0238f625 hci version 0x100 quirks 0x0000000002010890
[    4.273327] xhci-hcd xhci-hcd.1.auto: irq 74, io mem 0xfe200000
[    4.279496] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
[    4.287763] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.294983] usb usb1: Product: xHCI Host Controller
[    4.299858] usb usb1: Manufacturer: Linux 5.15.36-xilinx-v2022.2 xhci-hcd
[    4.306641] usb usb1: SerialNumber: xhci-hcd.1.auto
[    4.311841] hub 1-0:1.0: USB hub found
[    4.315627] hub 1-0:1.0: 1 port detected
[    4.319764] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    4.325262] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 2
[    4.332929] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed
[    4.339616] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.15
[    4.347895] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.355119] usb usb2: Product: xHCI Host Controller
[    4.359997] usb usb2: Manufacturer: Linux 5.15.36-xilinx-v2022.2 xhci-hcd
[    4.366786] usb usb2: SerialNumber: xhci-hcd.1.auto
[    4.371951] hub 2-0:1.0: USB hub found
[    4.375719] hub 2-0:1.0: 1 port detected
[    4.380840] i2c i2c-0: Added multiplexed i2c bus 2
[    4.385784] i2c i2c-0: Added multiplexed i2c bus 3
[    4.390730] i2c i2c-0: Added multiplexed i2c bus 4
[    4.395667] i2c i2c-0: Added multiplexed i2c bus 5
[    4.400612] i2c i2c-0: Added multiplexed i2c bus 6
[    4.405736] at24 7-0050: supply vcc not found, using dummy regulator
[    4.412545] at24 7-0050: 256 byte 24aa025 EEPROM, writable, 1 bytes/write
[    4.419388] i2c i2c-0: Added multiplexed i2c bus 7
[    4.424337] i2c i2c-0: Added multiplexed i2c bus 8
[    4.429289] i2c i2c-0: Added multiplexed i2c bus 9
[    4.434085] pca954x 0-0073: registered 8 multiplexed busses for I2C switch pca9548
[    4.442055] i2c i2c-0: Added multiplexed i2c bus 10
[    4.447074] i2c i2c-0: Added multiplexed i2c bus 11
[    4.452098] i2c i2c-0: Added multiplexed i2c bus 12
[    4.457114] i2c i2c-0: Added multiplexed i2c bus 13
[    4.462142] i2c i2c-0: Added multiplexed i2c bus 14
[    4.467178] i2c i2c-0: Added multiplexed i2c bus 15
[    4.467397] ata1: SATA link down (SStatus 0 SControl 330)
[    4.472207] i2c i2c-0: Added multiplexed i2c bus 16
[    4.477476] ata2: SATA link down (SStatus 0 SControl 330)
[    4.482466] i2c i2c-0: Added multiplexed i2c bus 17
[    4.492580] pca954x 0-0077: registered 8 multiplexed busses for I2C switch pca9548
[    4.500183] cdns-i2c ff020000.i2c: 400 kHz mmio ff020000 irq 41
[    4.506528] cdns-wdt fd4d0000.watchdog: Xilinx Watchdog Timer with timeout 60s
[    4.514017] cdns-wdt ff150000.watchdog: Xilinx Watchdog Timer with timeout 10s
[    4.523162] macb ff0e0000.ethernet: Not enabling partial store and forward
[    4.531980] macb ff0e0000.ethernet eth0: Cadence GEM rev 0x50070106 at 0xff0e0000 irq 39 (68:27:19:ae:48:0a)
[    4.544746] of_cfs_init
[    4.547234] of_cfs_init: OK
[    4.550162] clk: Not disabling unused clocks
[    4.553166] mmc0: SDHCI controller on ff160000.mmc [ff160000.mmc] using ADMA 64-bit
[    4.554685] ALSA device list:
[    4.555819] mmc1: SDHCI controller on ff170000.mmc [ff170000.mmc] using ADMA 64-bit
[    4.572683]   #0: DisplayPort monitor
[    4.576786] Waiting for root device /dev/mmcblk1p2...
[    4.605165] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[    4.617042] random: fast init done
[    4.622675] mmc1: new high speed SDHC card at address 59b4
[    4.628562] mmcblk1: mmc1:59b4 USD00 14.7 GiB
[    4.634568]  mmcblk1: p1 p2
[    4.637709] mmc0: new high speed MMC card at address 0001
[    4.643469] mmcblk0: mmc0:0001 Q2J54A 3.59 GiB
[    4.649711] mmcblk0boot0: mmc0:0001 Q2J54A 16.0 MiB
[    4.655613] mmcblk0boot1: mmc0:0001 Q2J54A 16.0 MiB
[    4.661439] mmcblk0rpmb: mmc0:0001 Q2J54A 512 KiB, chardev (239:0)
[    4.702937] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[    4.712704] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    4.719351] devtmpfs: mounted
[    4.722847] Freeing unused kernel memory: 2112K
[    4.727438] Run /sbin/init as init process
[    4.761502] usb 1-1: New USB device found, idVendor=04b4, idProduct=650a, bcdDevice=50.00
[    4.769701] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    4.819613] hub 1-1:1.0: USB hub found
[    4.823601] hub 1-1:1.0: 4 ports detected
[    4.901197] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
[    4.925415] usb 2-1: New USB device found, idVendor=04b4, idProduct=6508, bcdDevice=50.00
[    4.933610] usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    4.995618] hub 2-1:1.0: USB hub found
[    4.999639] hub 2-1:1.0: 4 ports detected
[    5.168350] systemd[1]: systemd 249.7+ running in system mode (+PAM -AUDIT -SELINUX -APPARMOR +IMA -SMACK +SECCOMP -GCRYPT -GNUTLS -OPENSSL +ACL +BLKID -CURL -ELFUTILS -FIDO2 -IDN2 -IDN -IPTC +KMOD -LIBCRYPTSETUP +LIBFDISK -PCRE2 -PWQUALITY -P11KIT -QRENCODE -BZIP2 -LZ4 -XZ -ZLIB +ZSTD +XKBCOMMON +UTMP +SYSVINIT default-hierarchy=hybrid)
[    5.197396] usb 1-1.4: new high-speed USB device number 3 using xhci-hcd
[    5.198760] systemd[1]: Detected architecture arm64.

Welcome to PetaLinux 2022.2_release_S10071807 (honister)!

[    5.257844] systemd[1]: Hostname set to <Trenz>.
[    5.268764] random: systemd: uninitialized urandom read (16 bytes read)
[    5.275410] systemd[1]: Initializing machine ID from random generator.
[    5.306427] usb 1-1.4: New USB device found, idVendor=05e3, idProduct=0610, bcdDevice=32.98
[    5.314810] usb 1-1.4: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    5.322145] usb 1-1.4: Product: USB2.0 Hub
[    5.363851] hub 1-1.4:1.0: USB hub found
[    5.368102] hub 1-1.4:1.0: 4 ports detected
[    5.382692] systemd-sysv-generator[255]: SysV service '/etc/init.d/halt' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    5.426554] systemd-sysv-generator[255]: SysV service '/etc/init.d/urandom' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    5.456994] systemd-sysv-generator[255]: SysV service '/etc/init.d/reboot' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    5.480801] systemd-sysv-generator[255]: SysV service '/etc/init.d/busybox-httpd' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    5.507511] systemd-sysv-generator[255]: SysV service '/etc/init.d/nfsserver' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    5.531631] systemd-sysv-generator[255]: SysV service '/etc/init.d/sshd' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    5.556302] systemd-sysv-generator[255]: SysV service '/etc/init.d/rng-tools' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    5.581270] systemd-sysv-generator[255]: SysV service '/etc/init.d/umountfs' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    5.605223] systemd-sysv-generator[255]: SysV service '/etc/init.d/single' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    5.630197] systemd-sysv-generator[255]: SysV service '/etc/init.d/watchdog-init' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    5.654595] systemd-sysv-generator[255]: SysV service '/etc/init.d/save-rtc.sh' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    5.680855] systemd-sysv-generator[255]: SysV service '/etc/init.d/nfscommon' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    5.705169] systemd-sysv-generator[255]: SysV service '/etc/init.d/inetd.busybox' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    5.729611] systemd-sysv-generator[255]: SysV service '/etc/init.d/sendsigs' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    5.741161] usb 1-1.4.1: new low-speed USB device number 4 using xhci-hcd
[    5.754456] systemd-sysv-generator[255]: SysV service '/etc/init.d/umountnfs.sh' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    5.889643] usb 1-1.4.1: New USB device found, idVendor=04d9, idProduct=0006, bcdDevice= 1.10
[    5.898195] usb 1-1.4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    5.905676] usb 1-1.4.1: Product: RPI Wired Keyboard 1
[    5.910811] usb 1-1.4.1: Manufacturer:
[    6.015305] input:   RPI Wired Keyboard 1 as /devices/platform/axi/ff9d0000.usb0/fe200000.usb/xhci-hcd.1.auto/usb1/1-1/1-1.4/1-1.4.1/1-1.4.1:1.0/0003:04D9:0006.0001/input/input0
[    6.089484] hid-generic 0003:04D9:0006.0001: input: USB HID v1.11 Keyboard [  RPI Wired Keyboard 1] on usb-xhci-hcd.1.auto-1.4.1/input0
[    6.112040] input:   RPI Wired Keyboard 1 as /devices/platform/axi/ff9d0000.usb0/fe200000.usb/xhci-hcd.1.auto/usb1/1-1/1-1.4/1-1.4.1/1-1.4.1:1.1/0003:04D9:0006.0002/input/input1
[    6.166044] systemd[1]: Queued start job for default target Graphical Interface.
[    6.174477] random: systemd: uninitialized urandom read (16 bytes read)
[    6.185319] hid-generic 0003:04D9:0006.0002: input: USB HID v1.11 Device [  RPI Wired Keyboard 1] on usb-xhci-hcd.1.auto-1.4.1/input1
[    6.220511] systemd[1]: Created slice Slice /system/getty.
[  OK  ] Created slice Slice /system/getty.
[    6.241315] random: systemd: uninitialized urandom read (16 bytes read)
[    6.249423] systemd[1]: Created slice Slice /system/modprobe.
[  OK  ] Created slice Slice /system/modprobe.
[    6.269234] random: systemd: uninitialized urandom read (16 bytes read)
[    6.277170] usb 1-1.4.4: new low-speed USB device number 5 using xhci-hcd
[    6.277270] systemd[1]: Created slice Slice /system/serial-getty.
[  OK  ] Created slice Slice /system/serial-getty.
[    6.305236] random: systemd: uninitialized urandom read (16 bytes read)
[    6.313057] systemd[1]: Created slice User and Session Slice.
[  OK  ] Created slice User and Session Slice.
[    6.333276] random: systemd: uninitialized urandom read (16 bytes read)
[    6.340090] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Started Dispatch Password …ts to Console Directory Watch.
[    6.365395] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Started Forward Password R…uests to Wall Directory Watch.
[    6.384795] usb 1-1.4.4: New USB device found, idVendor=093a, idProduct=2510, bcdDevice= 1.00
[    6.393320] usb 1-1.4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    6.400805] usb 1-1.4.4: Product: USB Optical Mouse
[    6.405678] usb 1-1.4.4: Manufacturer: PixArt
[    6.413481] systemd[1]: Reached target Path Units.
[  OK  ] Reached target Path Units.
[    6.429277] systemd[1]: Reached target Remote File Systems.
[  OK  ] Reached target Remote File Systems.
[    6.449249] systemd[1]: Reached target Slice Units.
[    6.453754] input: PixArt USB Optical Mouse as /devices/platform/axi/ff9d0000.usb0/fe200000.usb/xhci-hcd.1.auto/usb1/1-1/1-1.4/1-1.4.4/1-1.4.4:1.0/0003:093A:2510.0003/input/input2
[    6.470210] hid-generic 0003:093A:2510.0003: input: USB HID v1.11 Mouse [PixArt USB Optical Mouse] on usb-xhci-hcd.1.auto-1.4.4/input0
[  OK  ] Reached target Slice Units.
[    6.493297] systemd[1]: Reached target Swaps.
[  OK  ] Reached target Swaps.
[    6.521707] systemd[1]: Listening on RPCbind Server Activation Socket.
[  OK  ] Listening on RPCbind Server Activation Socket.
[    6.545277] systemd[1]: Reached target RPC Port Mapper.
[  OK  ] Reached target RPC Port Mapper.
[    6.568778] systemd[1]: Listening on Syslog Socket.
[  OK  ] Listening on Syslog Socket.
[    6.585438] systemd[1]: Listening on initctl Compatibility Named Pipe.
[  OK  ] Listening on initctl Compatibility Named Pipe.
[    6.609821] systemd[1]: Listening on Journal Audit Socket.
[  OK  ] Listening on Journal Audit Socket.
[    6.629497] systemd[1]: Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket (/dev/log).
[    6.653594] systemd[1]: Listening on Journal Socket.
[  OK  ] Listening on Journal Socket.
[    6.669811] systemd[1]: Listening on Network Service Netlink Socket.
[  OK  ] Listening on Network Service Netlink Socket.
[    6.693637] systemd[1]: Listening on udev Control Socket.
[  OK  ] Listening on udev Control Socket.
[    6.713484] systemd[1]: Listening on udev Kernel Socket.
[  OK  ] Listening on udev Kernel Socket.
[    6.733523] systemd[1]: Listening on User Database Manager Socket.
[  OK  ] Listening on User Database Manager Socket.
[    6.760212] systemd[1]: Mounting Huge Pages File System...
         Mounting Huge Pages File System...
[    6.780148] systemd[1]: Mounting POSIX Message Queue File System...
         Mounting POSIX Message Queue File System...
[    6.804292] systemd[1]: Mounting Kernel Debug File System...
         Mounting Kernel Debug File System...
[    6.821644] systemd[1]: Condition check resulted in Kernel Trace File System being skipped.
[    6.843840] systemd[1]: Mounting Temporary Directory /tmp...
         Mounting Temporary Directory /tmp...
[    6.862592] systemd[1]: Condition check resulted in Create List of Static Device Nodes being skipped.
[    6.875283] systemd[1]: Starting Load Kernel Module configfs...
         Starting Load Kernel Module configfs...
[    6.896838] systemd[1]: Starting Load Kernel Module drm...
         Starting Load Kernel Module drm...
[    6.916539] systemd[1]: Starting Load Kernel Module fuse...
         Starting Load Kernel Module fuse...
[    6.936664] systemd[1]: Starting RPC Bind...
         Starting RPC Bind...
[    6.953461] systemd[1]: Condition check resulted in File System Check on Root Device being skipped.
[    7.018609] systemd[1]: Condition check resulted in Load Kernel Modules being skipped.
[    7.029358] systemd[1]: Mounting NFSD configuration filesystem...
         Mounting NFSD configuration filesystem...
[    7.048494] systemd[1]: Starting Remount Root and Kernel File Systems...
         Starting Remount Root and Kernel File Systems...
[    7.063985] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null). Quota mode: none.
[    7.076507] systemd[1]: Starting Apply Kernel Variables...
         Starting Apply Kernel Variables...
[    7.100596] systemd[1]: Starting Coldplug All udev Devices...
         Starting Coldplug All udev Devices...
[  OK  ] Started RPC Bind.
[  OK  ] Mounted Huge Pages File System.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted Kernel Debug File System.
[  OK  ] Mounted Temporary Directory /tmp.
[  OK  ] Finished Load Kernel Module configfs.
[  OK  ] Finished Load Kernel Module drm.
[  OK  ] Finished Load Kernel Module fuse.
[    7.271384] systemd[1]: Failed to mount NFSD configuration filesystem.
[FAILED] Failed to mount NFSD configuration filesystem.
See 'systemctl status proc-fs-nfsd.mount' for details.
[DEPEND] Dependency failed for NFS Mount Daemon.
[DEPEND] Dependency failed for NFS server and services.
[  OK  ] Finished Remount Root and Kernel File Systems.
[  OK  ] Finished Apply Kernel Variables.
         Mounting Kernel Configuration File System...
         Starting Create System Users...
[  OK  ] Mounted Kernel Configuration File System.
[  OK  ] Finished Create System Users.
         Starting Create Static Device Nodes in /dev...
[  OK  ] Finished Create Static Device Nodes in /dev.
[  OK  ] Reached target Preparation for Local File Systems.
         Mounting /var/volatile...
[  OK  ] Started Entropy Daemon based on the HAVEGE algorithm.
         Starting Journal Service...
         Starting Rule-based Manage…for Device Events and Files...
[  OK  ] Mounted /var/volatile.
         Starting Load/Save Random Seed...
[  OK  ] Reached target Local File Systems.
         Starting Rebuild Dynamic Linker Cache...
[  OK  ] Finished Coldplug All udev Devices.
         Starting Wait for udev To …plete Device Initialization...
[  OK  ] Started Journal Service.
         Starting Flush Journal to Persistent Storage...
[  OK  ] Finished Flush Journal to Persistent Storage.
         Starting Create Volatile Files and Directories...
[  OK  ] Finished Create Volatile Files and Directories.
         Starting Run pending postinsts...
         Starting Rebuild Journal Catalog...
         Starting Network Time Synchronization...
         Starting Record System Boot/Shutdown in UTMP...
[  OK  ] Finished Record System Boot/Shutdown in UTMP.
[  OK  ] Finished Rebuild Journal Catalog.
[  OK  ] Started Rule-based Manager for Device Events and Files.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Reached target System Time Set.
[  OK  ] Reached target Sound Card.
[    9.050142] zocl-drm amba_pl@0:zyxclmm_drm: IRQ index 32 not found
[  OK  ] Finished Load/Save Random Seed.
[  OK  ] Finished Wait for udev To Complete Device Initialization.
[  OK  ] Created slice Slice /system/systemd-fsck.
[  OK  ] Listening on Load/Save RF …itch Status /dev/rfkill Watch.
[  OK  ] Started Hardware RNG Entropy Gatherer Daemon.
         Starting File System Check on /dev/mmcblk1p1...
[  OK  ] Finished File System Check on /dev/mmcblk1p1.
         Mounting /run/media/mmcblk1p1...
[  OK  ] Mounted /run/media/mmcblk1p1.
[  OK  ] Finished Rebuild Dynamic Linker Cache.
         Starting Update is Completed...
[  OK  ] Finished Update is Completed.
[   13.427455] zocl-drm amba_pl@0:zyxclmm_drm: IRQ index 32 not found
[  OK  ] Finished Run pending postinsts.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target Timer Units.
[  OK  ] Listening on D-Bus System Message Bus Socket.
         Starting sshd.socket...
[  OK  ] Listening on sshd.socket.
[  OK  ] Reached target Socket Units.
[  OK  ] Reached target Basic System.
[  OK  ] Started Kernel Logging Service.
[  OK  ] Started System Logging Service.
[  OK  ] Started D-Bus System Message Bus.
         Starting IPv6 Packet Filtering Framework...
         Starting IPv4 Packet Filtering Framework...
         Starting rng-tools.service...
         Starting Resets System Activity Logs...
         Starting User Login Management...
[  OK  ] Started Xserver startup without a display manager.
         Starting OpenSSH Key Generation...
[  OK  ] Finished IPv6 Packet Filtering Framework.
[  OK  ] Finished IPv4 Packet Filtering Framework.
[  OK  ] Reached target Preparation for Network.
         Starting Network Configuration...
[  OK  ] Started rng-tools.service.
[  OK  ] Finished Resets System Activity Logs.
         Starting LSB: NFS support for both client and server...
[  OK  ] Started LSB: NFS support for both client and server.
         Starting busybox-httpd.service...
         Starting inetd.busybox.service...
         Starting LSB: Kernel NFS server support...
[  OK  ] Started inetd.busybox.service.
[FAILED] Failed to start LSB: Kernel NFS server support.
See 'systemctl status nfsserver.service' for details.
[  OK  ] Started busybox-httpd.service.
[  OK  ] Started User Login Management.
[  OK  ] Started Network Configuration.
         Starting Network Name Resolution...
[  OK  ] Started Network Name Resolution.
[  OK  ] Reached target Network.
[  OK  ] Reached target Host and Network Name Lookups.
[  OK  ] Started NFS status monitor for NFSv2/3 locking..
         Starting Permit User Sessions...
         Starting Target Communication Framework agent...
[  OK  ] Started Xinetd A Powerful Replacement For Inetd.
[  OK  ] Finished Permit User Sessions.
[  OK  ] Started Getty on tty1.
[  OK  ] Started Serial Getty on ttyPS0.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started Target Communication Framework agent.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
         Starting Record Runlevel Change in UTMP...
[  OK  ] Finished Record Runlevel Change in UTMP.

PetaLinux 2022.2_release_S10071807 Trenz ttyPS0

Trenz login: root (automatic login)

root@Trenz:~#

root@Trenz:~#          Stopping Session c1 of User root...
[  OK  ] Removed slice Slice /system/modprobe.
[  OK  ] Stopped target Graphical Interface.
[  OK  ] Stopped target Multi-User System.
[  OK  ] Stopped target Login Prompts.
[  OK  ] Stopped target Host and Network Name Lookups.
[  OK  ] Stopped target Sound Card.
[  OK  ] Stopped target System Time Set.
[  OK  ] Stopped target Timer Units.
[  OK  ] Stopped Daily Cleanup of Temporary Directories.
[  OK  ] Closed Load/Save RF Kill Switch Status /dev/rfkill Watch.
         Stopping busybox-httpd.service...
         Stopping Kernel Logging Service...
         Stopping System Logging Service...
         Stopping Getty on tty1...
         Stopping inetd.busybox.service...
         Stopping Serial Getty on ttyPS0...
[  OK  ] Stopped Resets System Activity Logs.
         Stopping Load/Save Random Seed...
         Stopping Target Communication Framework agent...
         Stopping Xinetd A Powerful Replacement For Inetd...
         Stopping Xserver startup without a display manager...
[  OK  ] Stopped OpenSSH Key Generation.
[  OK  ] Stopped Kernel Logging Service.
[  OK  ] Stopped System Logging Service.
[  OK  ] Stopped Xinetd A Powerful Replacement For Inetd.
[  OK  ] Stopped Target Communication Framework agent.
[  OK  ] Stopped Serial Getty on ttyPS0.
[  OK  ] Stopped Getty on tty1.
[  OK  ] Stopped busybox-httpd.service.
[  OK  ] Stopped inetd.busybox.service.
[  OK  ] Stopped Load/Save Random Seed.
[  OK  ] Stopped Session c1 of User root.
[  OK  ] Removed slice Slice /system/getty.
[  OK  ] Removed slice Slice /system/serial-getty.
         Stopping LSB: NFS support for both client and server...
         Stopping User Login Management...
         Stopping User Manager for UID 0...
[  OK  ] Stopped LSB: NFS support for both client and server.
[  OK  ] Stopped User Manager for UID 0.
[  OK  ] Stopped target RPC Port Mapper.
         Stopping rng-tools.service...
         Stopping User Runtime Directory /run/user/0...
[  OK  ] Unmounted /run/user/0.
[  OK  ] Stopped Hardware RNG Entropy Gatherer Daemon.
[  OK  ] Stopped User Login Management.
[  OK  ] Stopped rng-tools.service.
[  OK  ] Stopped User Runtime Directory /run/user/0.
[  OK  ] Removed slice User Slice of UID 0.
         Stopping D-Bus System Message Bus...
         Stopping Permit User Sessions...
[  OK  ] Stopped D-Bus System Message Bus.
[  OK  ] Stopped Permit User Sessions.
[  OK  ] Stopped target Network.
[  OK  ] Stopped target Remote File Systems.
         Stopping Network Name Resolution...
[  OK  ] Stopped Network Name Resolution.
         Stopping Network Configuration...
[  OK  ] Stopped Network Configuration.
[  OK  ] Stopped target Preparation for Network.
[  OK  ] Stopped IPv6 Packet Filtering Framework.
[  OK  ] Stopped IPv4 Packet Filtering Framework.
[  OK  ] Stopped Xserver startup without a display manager.
[  OK  ] Stopped target Basic System.
[  OK  ] Stopped target Path Units.
[  OK  ] Stopped Dispatch Password …ts to Console Directory Watch.
[  OK  ] Stopped Forward Password R…uests to Wall Directory Watch.
[  OK  ] Stopped target Slice Units.
[  OK  ] Removed slice User and Session Slice.
[  OK  ] Stopped target Socket Units.
[  OK  ] Closed D-Bus System Message Bus Socket.
[  OK  ] Closed sshd.socket.
[  OK  ] Stopped target System Initialization.
[  OK  ] Closed Syslog Socket.
[  OK  ] Closed Network Service Netlink Socket.
[  OK  ] Stopped Apply Kernel Variables.
         Stopping Network Time Synchronization...
[  OK  ] Stopped Update is Completed.
[  OK  ] Stopped Rebuild Dynamic Linker Cache.
[  OK  ] Stopped Rebuild Journal Catalog.
[  OK  ] Stopped Network Time Synchronization.
[  OK  ] Stopped Create Volatile Files and Directories.
[  OK  ] Stopped target Local File Systems.
         Unmounting /run/credentials/systemd-sysusers.service...
         Unmounting /run/media/mmcblk1p1...
         Unmounting Temporary Directory /tmp...
         Unmounting /var/volatile...
[  OK  ] Unmounted /run/credentials/systemd-sysusers.service.
[  OK  ] Unmounted /run/media/mmcblk1p1.
[  OK  ] Unmounted Temporary Directory /tmp.
[  OK  ] Unmounted /var/volatile.
[  OK  ] Stopped target Swaps.
[  OK  ] Reached target Unmount All Filesystems.
[  OK  ] Stopped File System Check on /dev/mmcblk1p1.
[  OK  ] Removed slice Slice /system/systemd-fsck.
[  OK  ] Stopped target Preparation for Local File Systems.
[  OK  ] Stopped Create Static Device Nodes in /dev.
[  OK  ] Stopped Create System Users.
[  OK  ] Stopped Remount Root and Kernel File Systems.
[  OK  ] Reached target System Shutdown.
[  OK  ] Reached target Late Shutdown Services.
[  OK  ] Finished System Power Off.
[  OK  ] Reached target System Power Off.
[  380.654665] unregister bridge display which is owned by other component
[  380.661312] unregister bridge display which is owned by other component
[  380.692736] reboot: Power down

  1. Petalinux boot,
  2. ifconfig to find assigned Ethernet address,
  3. test_vadd example executed to test the kernel execution,
  4. halt to proper terminate OS.

Test 3: Vitis-AI-3.0 Demo


This test implements simple AI 3.0 demo to verify DPU integration to our custom extensible platform. This tutorial follows Xilix Vitis Tutorial for zcu104 with necessary fixes and customizations required for our case.

We have to install correct Vitis project with the DPU instance from this repository:

https://github.com/Xilinx/Vitis-AI/tree/3.0/dpu

Page contains a table with supported targets. Find the row of the table dedicated to DPUCZDX8G DPU for MPSoC and Kria K26 devices.

It contains link for download of the programmable logic based DPU, targeting general purpose CNN inference with full support for the Vitis AI ModelZoo. 
Supports either the Vitis or Vivado flows on 16nm Zynq® UltraScale+™ platforms.

Click on the Download link in the column: Reference Design

This will result in download of file:

~/Downloads/DPUCZDX8V_VAI_v3.0.tar.gz

It contains directory
~/Downloads/DPUCZDX8V_VAI_v3.0

Copy this directory to the directory:
~/work/DPUCZDX8V_VAI_v3.0

It contains HDL code for the DPU and also source files and project files to test the DPU with AI resnet50 inference example. 

Create and Build Vitis Design


Create new directory StarterKit_dpu_trd  to test Vitis extendable flow example “dpu trd”
~/work/TE0808_68_240/StarterKit_dpu_trd

Current directory structure:
~/work/TE0808_68_240/StarterKit
~/work/TE0808_68_240/StarterKit_pfm
~/work/TE0808_68_240/StarterKit_test_vadd
~/work/TE0808_68_240/StarterKit_dpu_trd

Change working directory:

$cd ~/work/TE0808_68_240/StarterKit_dpu_trd

In Ubuntu terminal, start Vitis by:

$ vitis &

In Vitis IDE Launcher, select your working directory
~/work/TE0808_68_240/StarterKit_dpu_trd
Click on Launch to start Vitis.

Add Vitis-AI Repository to Vitis

Open menu Window → Preferences

Go to Library Repository tab

Add Vitis-AI by clicking Add button and fill the form as shown below, use absolute path to your home folder in field "Location":

Click Apply and Close.

Field "Location" says that the Vitis-AI repository from github has been cloned into ~/work/DPUCZDX8V_VAI_v3.0 folder, already in the stage of Petalinux configuration. Use the absolute path to your home directory. It depends on the user name. The user name in the figure is "devel". Replace it by your user name.

Correctly added library appears in Libraries:

Open menu Xilinx → Libraries...

You can find there just added Vitis-AI library marked as "Installed".

Create a Vitis-AI Design for our TE0808_68_240 custom platform

Select File -> New -> Application project. Click Next.

Skip welcome page if it is shown.

Click on “+ Add” icon and select the custom extensible platform TE0808_68_240_pfm[custom] in the directory:
~/work/TE0808_68_240/StarterKit_pfm/TE0808_68_240_pfm/export/TE0808_68_240_pfm

We can see available PL clocks and frequencies.

PL4 with 240 MHz clock is has been set as default in the platform creation process.


Click Next.
In “Application Project Details” window type into Application project name: dpu_trd
Click Next.
In “Domain window” type (or select by browse):
“Sysroot path”:
~/work/TE0808_68_240/StarterKit_pfm/sysroots/cortexa72-cortexa53-xilinx-linux
“Root FS”:
~/work/TE0808_68_240/StarterKit/os/petalinux/images/linux/rootfs.ext4
“Kernel Image”:
~/work/TE0808_68_240/StarterKit/os/petalinux/images/linux/Image
Click Next.

In “Templates window”, if not done before, update “Vitis IDE Examples” and “Vitis IDE Libraries”.

In “Find”, type: “dpu” to search for the “DPU Kernel (RTL Kernel)” example.

Select: “DPU Kernel (RTL Kernel)

 Click Finish
New project template is created.

In dpu_trd window menu “Active build configuration” switch from “SW Emulation” to “Hardware”.

File dpu_conf.vh located at dpu_trd_kernels/src/prj/Vitis directory contains DPU configuration.

Open file dpu_conf.vh and change in line 37:

`define URAM_DISABLE 

to 

`define URAM_ENABLE 

and save modified file.

This modification is necessary for successful implementation of the DPU on the zcu04-ev module with internal memories implemented in URAMs.

Go to dpu_trd_system_hw_link and double click on dpu_trd_system_hw_link.prj.

Remove sfm_xrt_top kernel from binary container by right clicking on it and choosing remove.

Reduce number of DPU kernels to one.

Configure connection of DPU kernels

On the same tab right click on dpu and choose Edit V++ Options 

Click "..." button on the line of V++ Configuration Settings and modify configuration as follows:

[clock]
freqHz=200000000:DPUCZDX8G_1.aclk
freqHz=400000000:DPUCZDX8G_1.ap_clk_2

[connectivity]
sp=DPUCZDX8G_1.M_AXI_GP0:HPC0
sp=DPUCZDX8G_1.M_AXI_HP0:HP0
sp=DPUCZDX8G_1.M_AXI_HP2:HP1
Update packaging to add dependencies into SD Card

Create a new folder img in your project in dpu_trd/src/app

Download image from provided link and place it to newly created folder dpu_trd/src/app/img.

Double click dpu_trd_system.sprj

Click "..." button on Packaging options

Enter "--package.sd_dir=../../test_dpu_trd/src/app"

Click OK.


Build DPU_TRD application

In “Explorer” section of Vitis IDE, click on:  dpu_trd_system[TE0808_68_240_pfm] to select it.

Right Click on:  dpu_trd_system[TE0808_68_240_pfm] and select in the opened sub-menu:
Build project.

Created extended HW with DPU:


Run DPU_TRD on Board

Write sd_card.img to SD card using SD card reader.

The sd_card.img file is output of the compilation and packing by Vitis. It is located in directory:
~/work/TE0808_68_240/StarterKit_dpu_trd/dpu_trd_system/Hardware/package/

In Windows 10 (or Windows 11) PC, inst all program Win32DiskImager  for this task. Win32 Disk Imager can write raw disk image to removable devices.
https://win32diskimager.org/

Boot the board and open terminal on the board either by connecting serial console connection, or by opening ethernet connection to ssh server on the board, or by opening terminal directly using window manager on board. Continue using the embedded board terminal.

Detailed guide how to run embedded board and connect to it can be found in Run Compiled Example Application for Vector Addition.

Check ext4 partition size by:

root@Trenz:~# cd / 
root@Trenz:~# df .
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root               564048    398340    122364  77% /

Resize partition

root@Trenz:~# resize-part /dev/mmcblk1p2
/dev/mmcblk1p2
Warning: Partition /dev/mmcblk1p2 is being used. Are you sure you want to continue?
parted: invalid token: 100%
Yes/No? yes
End?  [2147MB]? 100%
Information: You may need to update /etc/fstab.

resize2fs 1.45.3 (14-Jul-2019)
Filesystem at /dev/mmcblk1p2 is mounted on /media/sd-mmcblk1p2; o[   72.751329] EXT4-fs (mmcblk1p2): resizing filesystem from 154804 to 1695488 blocks
n-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
[   75.325525] EXT4-fs (mmcblk1p2): resized filesystem to 1695488
The filesystem on /dev/mmcblk1p2 is now 1695488 (4k) blocks long.

Check ext4 partition size again, you should see:

root@Trenz:~# df . -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 6.1G    390.8M      5.4G   7% /

Next figures present:

  • Extension of ext4 disk size on X11 terminal.
  • ARM mc commander application - initial file structure
  • ARM mc commander applications - file structure after copy of files
  • PC winSCP application is used for secure Ethernet copy of tested image bellpeppe-994958.JPEG from PC to ARM.  


The available size would be different according to your SD card size.

Copy dependencies to home folder:

# Libraries
root@Trenz:~# cp -r /run/media/mmcblk1p1/app/samples/ ~
# Model
root@Trenz:~# cp /run/media/mmcblk1p1/app/model/resnet50.xmodel ~
# Host app
root@Trenz:~# cp /run/media/mmcblk1p1/dpu_trd ~
# Images to test
root@Trenz:~# cp /run/media/mmcblk1p1/app/img/*.JPEG ~

Run the application resnet50 from /home/root folder and you can observe that "bell pepper" receives highest score.

root@Trenz:~# env XLNX_VART_FIRMWARE=/run/media/mmcblk1p1/dpu.xclbin samples/bin/resnet50 bellpeppe-994958.JPEG
score[945]  =  0.992235     text: bell pepper,
score[941]  =  0.00315807   text: acorn squash,
score[943]  =  0.00191546   text: cucumber, cuke,
score[939]  =  0.000904801  text: zucchini, courgette,
score[949]  =  0.00054879   text: strawberry,

The TEBF0808 carrier with TE0808-05-BBE21-A module is running the PetaLinux OS and drives simple version of an X11 GUI on monitor with Display Port. Application dpu_trd is computing the HW accelerated AI inference on ResNet50 network on the DPU.

The resnet50 is trained for recognition of 1000 different objects in figures. 

The test board application reads the input figure and call the DPU.  The DPU implements the ResNet50 network.

The "bell pepper" object is recognised with high probability.

On board compilation of Vitis AI 3.0 demo

The application dpu_trd can be also recompiled directly on the test board.

root@Trenz:~#cd samples
root@Trenz:~#./build.sh
Opencv4                   OpenCV - Open Source Computer Vision Library
root@Trenz:~#cd ..
 
root@Trenz:~# env XLNX_VART_FIRMWARE=/run/media/mmcblk1p1/dpu.xclbin samples/a.out bellpeppe-994958.JPEG
score[945]  =  0.992235     text: bell pepper,
score[941]  =  0.00315807   text: acorn squash,
score[943]  =  0.00191546   text: cucumber, cuke,
score[939]  =  0.000904801  text: zucchini, courgette,
score[949]  =  0.00054879   text: strawberry,
The result of on compilation on test board is aplication a.out.

It provides identical results to the application resnet50 from test_dpu_trd project compiled in Vitis in the PC Ubuntu Vitis AI 3.0 environment.

Only the C++ SW part of the application can be compiled on the test board. The HW acceleration part (the dpu kernel)
has to be compiled in the Vitis AI 3.0 framework on Ubuntu PC.

The bellpeppe-994958.JPEG figure is displayed from file located in Ubuntu PC together with the PetaLinux terminal forwarded to X11 via PuTTY. Terminal demonstrates execution of resnet50 application cross-compiled in test_dpu_trd project, first. Next, the resnet50 application is recompiled locally on the target board to a.out binary application and tested. It provides identical results to the original resnet50 binary. 

Additional Vitis extensible flow demos

Additional Vitis extensible flow demo can be compiled on the test board and executed on the test board.

Starting point for exploration of Vitis acceleration flow is Vitis Accel Examples' Repository (project templates are already downloaded in Vitis):
GitHub - Xilinx/Vitis_Accel_Examples at 2022.2

Additional Vitis AI 3.0 demos

Additional demos from the Vitis AI 3.0 library can be compiled on the test board and executed on the test board with the identical DPU HW.

Starting point for exploration of these Vitis AI 3.0 examples is this Xilinx www page.

https://xilinx.github.io/Vitis-AI/3.0/html/index.html

Vitis AI 3.0 demos work in several modes:

  • From a image stored in a file with output in form of text to console or image displayed on the X11 desktop.
  • From sequence of image stored in several files with output in form of text to console or images displayed on the X11 desktop.
  • From USB 2/3 www camera input  video with output in form video displayed on the X11 remote desktop.

Support image and video file archives

Download the AI 3.0 support archive archive with images:

https://www.xilinx.com/bin/public/openDownload?filename=vitis_ai_library_r3.0.0_images.tar.gz

Download the AI 3.0 support archive with videos:

https://www.xilinx.com/bin/public/openDownload?filename=vitis_ai_library_r3.0.0_video.tar.gz

Unzip and untar content to directory if your choice. For example to directories (size 2.3 GB, 872.9 MB, 54.3 MB):
~/Downloads/apps  
~/Downloads/samples
~/Downloads/samples_onnx

These large packages provide support material for AI 3.0 examples. Next section of this tutorial will demonstrate use of AI 3.0 examples on vehicleclassification example. The vehicleclassification example will be downloaded to the evaluation board, compiled on the evaluation board and executed with image input from file or video input from USB camera.

Vehicleclassification example

Copy  support material for AI 3.0 vehicleclassification example from

 ~/Downloads/samples/vehicleclassification
to
~/work/Vitis-AI-3.0/examples/vai_library/samples/vehicleclassification

Zip the directory into file

~/work/Vitis-AI-3.0/examples/vai_library/samples/vehicleclassification.zip

Copy vehicleclassification.zip to the target board SD card home directory:

~/vehicleclassification.zip

Download models for vehicleclassification example DPU 

The vehicleclassification example will require precompiled models for the DPU.

The link to the archive with these precompiled model files vehicleclassification of make of the car can be found in the model.yaml file located in:

~/work/Vitis-AI-3.0/model-zoo/model-list/pt_vehicle-make-classification_VMMR_224_224_3.64G_3.0/model.yaml

Link from the make related model.yaml:

 https://www.xilinx.com/bin/public/openDownload?filename=vehicle_make_resnet18_pt-zcu102_zcu104_kv260-r3.0.0.tar.gz

The link to the archive with these precompiled model files vehicleclassification of type of the car can be found in the model.yaml file located in:

~/work/Vitis-AI-3.0/model-zoo/model-list/pt_vehicle-type-classification_CarBodyStyle_224_224_3.64G_3.0/model.yaml

Link from the type related model.yaml:

 https://www.xilinx.com/bin/public/openDownload?filename=vehicle_make_resnet18_pt-zcu102_zcu104_kv260-r3.0.0.tar.gz

Copy both models for the AI 3.0 vehicleclassification example from th PC Ubuntu directory

 ~/Downloads/samples/vehicleclassification
to the board directory
~/

On the board, unzip file

~/vehicleclassification.zip
to get directory with project files:
~/vehicleclassification

On the board, unzip and untar both model archives to create these model directories

~/vehicle_make_resnet18_pt
~/vehicle_make_resnet18_pt_acc
~/vehicle_type_resnet18_pt
~/vehicle_type_resnet18_pt_acc

On the board, copy make of the car related model files:
~/vehicle_make_resnet18_pt/vehicle_make_resnet18_pt.prototxt
~/vehicle_make_resnet18_pt/vehicle_make_resnet18_pt.xmodel
to
 ~/Downloads/samples/vehicleclassification/vehicle_make_resnet18_pt.prototxt
~/Downloads/samples/vehicleclassification/vehicle_make_resnet18_pt.xmodel

On the board, copy type of the car related model files:
~/vehicle_type_resnet18_pt/vehicle_type_resnet18_pt.prototxt
~/vehicle_type_resnet18_pt/vehicle_type_resnet18_pt.xmodel
to
 ~/Downloads/samples/vehicleclassification/vehicle_make_resnet18_pt.prototxt
~/Downloads/samples/vehicleclassification/vehicle_make_resnet18_pt.xmodel

The midnight commander utility mc can be used to perform these tasks.

Compile vehicleclassification example

On the board,  change directory to: 

~/vehicleclassification

Compile vehicleclassification examples by:

root@Trenz:~# chmod 777 build.sh
root@Trenz:~# ./build.sh

The compilation on the target board will take some time to finish. These executable binaries are created:

~/vehicleclassification/test_jpeg_vehicleclassification
~/vehicleclassification/test_performance_vehicleclassification
~/vehicleclassification/test_video_vehicleclassification
~/vehicleclassification/test_accuracy_vehicleclassification

Execute test_jpeg_vehicleclassification for detection of the make of the car by command:

root@Trenz:~# env XLNX_VART_FIRMWARE=/run/media/mmcblk1p1/dpu.xclbin ./test_jpeg_vehicleclassification vehicle_make_resnet18_pt.xmodel sample_vehicleclassification.jpg  

Execute test_jpeg_vehicleclassification for detection of the type of the car by command:

root@Trenz:~# env XLNX_VART_FIRMWARE=/run/media/mmcblk1p1/dpu.xclbin ./test_jpeg_vehicleclassification vehicle_type_resnet18_pt.xmodel sample_vehicleclassification.jpg  

Execute test_performance_vehicleclassification for detection of the make of the car by command:

root@Trenz:~# env XLNX_VART_FIRMWARE=/run/media/mmcblk1p1/dpu.xclbin ./test_performance_vehicleclassification vehicle_make_resnet18_pt.xmodel ./test_performance_vehicleclassification.list -s 60 -t 2  

Execute test_performance_vehicleclassification for detection of the type of the car by command:

root@Trenz:~# env XLNX_VART_FIRMWARE=/run/media/mmcblk1p1/dpu.xclbin ./test_performance_vehicleclassification vehicle_type_resnet18_pt.xmodel ./test_performance_vehicleclassification.list -s 60 -t 2

Connec USB cammera to the board.

Execute test_video_vehicleclassification for detection of the make of the car from video input by command:

root@Trenz:~# env XLNX_VART_FIRMWARE=/run/media/mmcblk1p1/dpu.xclbin ./test_video_vehicleclassification vehicle_make_resnet18_pt.xmodel 0 -t 1 

Execute test_video_vehicleclassification for detection of the type of the car from video input by command:

root@Trenz:~# env XLNX_VART_FIRMWARE=/run/media/mmcblk1p1/dpu.xclbin ./test_video_vehicleclassification vehicle_type_resnet18_pt.xmodel 0 -t 1 

Parameter -s 60 is request to perform performance test for 60 sec. 
Parameter 0 is indicating USB camera 0
Parameter -t 1 is requesting to execute the application as a single thread. 


This figure documents the test_video_vehicleclassification with DPU model vehicle_make_resnet18_pt . USB camera video input is processed with 20 FPS. The make of the car is displayed on X11 desktop together with the input video and assigned probability of the make of the car.

The performance example test_performance_vehicleclassification results in the range of 167 FPS.

Overview of existing models in the Vitis AI Model Zoo is in:

Vitis AI Model Zoo — Vitis™ AI 3.0 documentation (xilinx.github.io)

This page also includes link to downloadable spreadsheet and an online table that incorporates key data about the Model Zoo models. The spreadsheet and tables include comprehensive information about all models, including links to the original papers and datasets, source framework, input size, computational cost (GOPs), and float and quantized accuracy.


Table of contents





App. A: Change History and Legal Notices


Document Change History

To get content of older revision go to "Change History" of this page and select older document revision number.

DateDocument Revision

Authors

Description

Error rendering macro 'page-info'

Ambiguous method overloading for method jdk.proxy241.$Proxy3496#hasContentLevelPermission. Cannot resolve which method to invoke for [null, class java.lang.String, class com.atlassian.confluence.pages.Page] due to overlapping prototypes between: [interface com.atlassian.confluence.user.ConfluenceUser, class java.lang.String, class com.atlassian.confluence.core.ContentEntityObject] [interface com.atlassian.user.User, class java.lang.String, class com.atlassian.confluence.core.ContentEntityObject]

Error rendering macro 'page-info'

Ambiguous method overloading for method jdk.proxy241.$Proxy3496#hasContentLevelPermission. Cannot resolve which method to invoke for [null, class java.lang.String, class com.atlassian.confluence.pages.Page] due to overlapping prototypes between: [interface com.atlassian.confluence.user.ConfluenceUser, class java.lang.String, class com.atlassian.confluence.core.ContentEntityObject] [interface com.atlassian.user.User, class java.lang.String, class com.atlassian.confluence.core.ContentEntityObject]

Error rendering macro 'page-info'

Ambiguous method overloading for method jdk.proxy241.$Proxy3496#hasContentLevelPermission. Cannot resolve which method to invoke for [null, class java.lang.String, class com.atlassian.confluence.pages.Page] due to overlapping prototypes between: [interface com.atlassian.confluence.user.ConfluenceUser, class java.lang.String, class com.atlassian.confluence.core.ContentEntityObject] [interface com.atlassian.user.User, class java.lang.String, class com.atlassian.confluence.core.ContentEntityObject]

  • Modified selection of packages sentence to:
    Enable all required packages in Petalinux configuration, from the Ubuntu terminal with exception of
    vitis-ai-library-dev and vitis-ai-library-dbg:
  • Modified selection of packages explanation text to:
    Select all user packages by typing “y” with exception of vitis-ai-library-dev and vitis-ai-library-dbg.
    All packages will have to have an asterisk.
    vitis-ai-library-dev and vitis-ai-library-dbg will stay indicated as unselected by: [ ].
  • Added text:
    Delete file:
    ~/work/TE0808_68_240/StarterKit/os/petalinux/project-spec/meta-user/recipes-vitis-ai/vart/vart_vivado_3.0.bb
    and keep only the unmodified file: 
    ~/work/TE0808_68_240/StarterKit/os/petalinux/project-spec/meta-user/recipes-vitis-ai/vart/vart_3.0.bb
    File vart_3.0.bb will create vart libraries for Vitis design flow with dependency on xrt.
  • Corrected:
    "--package.sd_dir=../../dpu_trd/src/app" to
    "-- package.sd_dir=../../test_dpu_trd/src/app"
  • deleted figures: 
    vitis_2022_2_15eg_fig46.png
    vitis_2022_2_15eg_fig47.png
    vitis_2022_2_15eg_fig49.png
  • Delete this section of text (no need to copy libraries):

    Copy libraries from test_dpu_trd project to the default petalinux path:

    # Libraries
    root@Trenz:~# cp -r ~/samples/lib/* /usr/lib

    We have replaced the precompiled AI 3.0 libraries provided by PetaLinux with libraries provided by the test_dpu.trd design.

  • update change history

2023-08-22

v.59

John Hartfiel

  • change page name
  • update change history

2023-08-21

v.56

UTIA

  • initial release
--all

Error rendering macro 'page-info'

Ambiguous method overloading for method jdk.proxy241.$Proxy3496#hasContentLevelPermission. Cannot resolve which method to invoke for [null, class java.lang.String, class com.atlassian.confluence.pages.Page] due to overlapping prototypes between: [interface com.atlassian.confluence.user.ConfluenceUser, class java.lang.String, class com.atlassian.confluence.core.ContentEntityObject] [interface com.atlassian.user.User, class java.lang.String, class com.atlassian.confluence.core.ContentEntityObject]

--
Document change history.

  • No labels