Please note that there is a more recent version of this project:
Vitis-AI 1.4 Flow for Avnet VITIS Platforms
IntroductionThis guide provides detailed instructions for targeting the VART based examples and the Vitis-AI-Library from the Xilinx Vitis-AI 1.1 flow to the following Avnet Vitis 2019.2 platforms:
- Ultra96-V2 Development Board
- UltraZed-EV SOM (7EV) + FMC Carrier Card
- UltraZed-EG SOM (3EG) + IO Carrier Card
- UltraZed-EG SOM (3EG) + PCIEC Carrier Card
In Part 1, we were able to target the DNNDK API based application examples to the Avnet Vitis platforms:
https://www.hackster.io/AlbertaBeef/vitis-ai-1-1-flow-for-avnet-vitis-platforms-part-1-007b0e
Part 2 will cover how to modify the Avnet Vitis platforms in order to target the Vitis-AI 1.1 VART and Vitis-AI-Library examples.
This time, including the modification of the Avnet Vitis platform(s), we have six (6) main steps to targeting an AI applications to one of the Avnet platforms:
- 0 - Modify the Avnet Vitis platform(s)
- 1 - Build the Hardware Design
- 2 - Compile the Model from the Xilinx AI Model Zoo
- 3 - Build the AI applications
- 4 - Create the SD card content
- 5 - Execute the AI applications on hardware
The recommended flow for this guide, is to download the pre-built SD card images, then run through steps 4 and 5 to see the final result. Then, circle back to steps 0, 1, 2, and 3, in order to rebuild all the components yourself.
IMPORTANT NOTE : The Ultra96-V2 Development Board requires a PMIC firmware update. See section "Known Issues - Ultra96-V2 PMIC firmware update" below for more details.
Setup - Install the Xilinx Tools
Please refer to Part 1 of this guide for instructions on installing the Xilinx tools:
https://www.hackster.io/AlbertaBeef/vitis-ai-1-1-flow-for-avnet-vitis-platforms-part-1-007b0e
Clone v1.1 of the the Vitis-AI git repository.
1. Clone Xilinx’s Vitis-AI github repository:
$ git clone https://github.com/Xilinx/Vitis-AI
$ cd Vitis-AI
$ git checkout v1.1-ultra96v2
$ export VITIS_AI_HOME="$PWD"
Since the first “v1.1” release of Vitis-AI 1.1 release, with “v1.1” tag, there have been several bug fixes, including:
- updated source code for DNNDK version of pose detection application
- updated VART runtime package
- updated source code for AI-Library version of yolov3 application
By taking the more recent “v1.1-ultra96v2” tag, the necessary bug fixes will be in effect. Despite the “ultra96v2” in the tag name, the tag still applies to all other platforms.
Step 0 – Install the Avnet Vitis platforms
In Part 1, we used the pre-built Avnet Vitis platforms.
In Part 2, a different approach will be taken:
- rebuild the Avnet Vitis platform(s) from source
- modify the platform(s) for our custom use
This approach is very representative of what real users will encounter, and can be adopted for any kind of customization for the Avnet hardware platforms, such as:
- adding support for an FMC module
- adding support for a MIPI camera
For the purpose of this guide, the following modifications will be made specifically for use with Vitis-AI 1.1.
- use the Weston/Wayland desktop, instead of the X11/Matchbox
- add support for package management (apt, dpkg, …)
- add support for embedded build tools (cmake,...)
- add various other recipes & packages for AI
For the rest of this document, the platform denoted will be denoted by {platform}.
Replace all instances of “{platform}” with the appropriate platform name, such as “ULTRA96V2”.
Step 0.1 – Rebuild the Avnet Vitis platforms
The first step consists of rebuilding the Avnet Vitis platforms from source.
2. Clone the Avnet bdf / hdl / petalinux, and vitis repositories, using the “2019.2” tag:
$ mkdir Avnet
$ cd Avnet
$ git clone https://github.com/Avnet/bdf
$ git clone -b 2019.2 https://github.com/Avnet/hdl
$ git clone -b 2019.2 https://github.com/Avnet/petalinux
$ git clone https://github.com/Avnet/vitis
$ cd vitis
3. Build the Vitis platform for one of the hardware platforms
a. For the ULTRA96V2 platform:
$ make ultra96v2_oob
b. For the UZ7EV_EVCC platform:
$ make UZ7EV_EVCC
c. For the UZ7EV_EVCC platform:
$ make UZ3EG_IOCC
d. For the UZ7EV_EVCC platform:
$ make UZ3EG_PCIEC
This will build the following components:
- Hardware design, located in one of the following directories:
hdl/Projects/ultra96v2_oob/ULTRA96V2
hdl/Projects/uz_petalinux/UZ7EV_EVCC
hdl/Projects/uz_petalinux/UZ3EG_IOCC
hdl/Projects/uz_petalinux/UZ3EG_PCIEC
- Petalinux project, located in one of the following directories:
petalinux/project/ultra96v2_oob_2019_2
petalinux/project/uz7ev_evcc_2019_2
petalinux/project/uz3eg_iocc_2019_2
petalinux/project/uz3eg_pciec_2019_2
- Vitis platform, located in one of the following directories:
vitis/platform_repo/ULTRA96V2
vitis/platform_repo/UZ7EV_EVCC
vitis/platform_repo/UZ3EG_IOCC
vitis/platform_repo/UZ3EG_PCIEC
Step 0.2 - Modify the Avnet Vitis platforms
In this guide, we will not be modifying the hardware project. If we did want to modify the hardware project, we would simpy need to re-export the XSA file after our modifications are complete.
As previously mentioned, we want to update the petalinux project(s) with the following modifications:
- use the Weston/Wayland desktop, instead of the X11/Matchbox
- add support for package management (apt, dpkg, …)
- add support for embedded build tools (cmake,...)
- add various other recipes & packages for AI
We will use Xilinx’s “zcu102_dpu” platform as a reference to making these modifications.
4. Navigate to the petalinux projects directory:
$ cd ..
$ cd petalinux/projects
5. Create a new petalinux project or one of the hardware platforms
a. For the ULTRA96V2 platform:
$ petalinux-create -t project -s ultra96v2_oob_2019_2.bsp -n ultra96v2_oob_2019_2_ai
$ cd ultra96v2_oob_2019_2_ai
b. For the UZ7EV_EVCC platform:
$ petalinux-create -t project -s uz7ev_evcc_2019_2.bsp -n uz7ev_evcc_2019_2_ai
$ cd uz7ev_evcc_2019_2_ai
c. For the UZ3EG_IOCC platform:
$ petalinux-create -t project -s uz3eg_iocc_2019_2.bsp -n uz3eg_iocc_2019_2_ai
$ cd uz3eg_iocc_2019_2_ai
d. For the UZ3EG_PCIEC platform:
$ petalinux-create -t project -s uz3eg_pciec_2019_2.bsp -n uz3eg_pciec_2019_2_ai
$ cd uz3eg_pciec_2019_2_ai
6. Remove the “recipes-apps/sds-lib” recipe, which is obsolete, and not used by Vitis
project-spec/meta-user/recipes-apps/sds-lib
7. Remove the “recipes-support/opencv” recipe, which will be replaced by an equivalent recipe (ie. recipes-ai/opencv). Note that this recipe adds the ability to read video file to the opencv library.
project-spec/meta-user/recipes-support/opencv
8. Add the “recipes-xrt” directory from the zcu102_dpu platform to our custom project. These recipes contain explicit version of the ocl_icd / opencl-clhpp / opencl-headers / xrt / zocl packages (instead of taking the default version from the petalinux flow)
project-spec/meta-user/recipes-xrt/*
9. Add the “recipes-ai” directory from the zcu102_dpu platform to our custom project. These recipes perform various configurations, and install various tools for Vitis-AI 1.1.
project-spec/meta-user/recipes-ai/*
10. Add the “recipes-apps/mnt-sd” directory from the zcu102_dpu platform to our custom project.
project-spec/meta-user/recipes-apps/mnt-sd/*
For the ULTRA96V2 platform, keep this file “as is”.
For the UZ7EV_EVCC, UZ3EG_IOCC, and UZ3EG_PCIEC platforms, modify the following file
project-spec/meta-user/recipes-apps/mnt-sd/files/mnt-sd.sh
and change the location of the SD card from /dev/mmcblk0p1 to /dev/mmcblk1p1.
#!/bin/sh
mount /dev/mmcblk1p1 /mnt || mount /dev/mmcblk1 /mnt > /dev/null 2>&1
if [ -x /mnt/init.sh ]
then
echo "attempting to run /mnt/init.sh"
source /mnt/init.sh
fi
11. Add the “recipes-core/packagegroups” directory from the zcu102_dpu platform to our custom project. These recipes will add all of the packages required for Vitis-AI 1.1, including build tools (cmake, …) and package management utilities (dpkg, …)
project-spec/meta-user/recipes-core/packagegroups/*
12. Modify the following petalinuxbsp.conf file:
project-spec/meta-user/conf/petalinuxbsp.conf
Add the following two lines at the end of the file:
MALI_BACKEND_DEFAULT = " wayland"
PACKAGE_CLASSES = " package_deb"
13. Modify the following user-rootfsconfig file:
project-spec/meta-user/conf/user-rootfsconfig
Remove the following line:
CONFIG_sds-lib
Add the following lines at the end of the file:
# Vitis-AI
CONFIG_mnt-sd
CONFIG_packagegroup-petalinux-xlnx-ai
14. Modify the following rootfs_config file (either manually, or via “petalinux-config -c rootfs”):
project-spec/configs/rootfs_config
Delete the following:
CONFIG_sds-lib
Modify the following selections:
CONFIG_packagegroup-core-ssh-dropbear => unselect
CONFIG_packagegroup-petalinux-self-hosted => select
CONFIG_packagegroup-petalinux-matchbox => unselect
CONFIG_packagegroup-petalinux-x11 => unselect
CONFIG_imagefeature-ssh-server-dropbear => unselect
CONFIG_imagefeature-ssh-server-openssh => select
CONFIG_imagefeature-package-management => select
CONFIG_imagefeature-debug-tweaks => select
Add/select the following:
CONFIG_mnt-sd => add/select
CONFIG_packagegroup-petalinux-xlnx-ai => add/select
15. Modify the following config file:
project-spec/configs/config
Modify the CONFIG_SUBSYSTEM_HOSTNAME and CONFIG_SUBSYSTEM_PRODUCT fields, and add a “-ai” suffix to the existing string values.
#
# Firmware Version Configuration
#
CONFIG_SUBSYSTEM_HOSTNAME="ultra96v2-oob-2019-2-ai"
CONFIG_SUBSYSTEM_PRODUCT="ultra96v2_oob_2019_2-ai"
For the UZ7EV_EVCC, UZ3EG_IOCC, and UZ3EG_PCIEC platforms,
Make the following changes to use an external root file system
#
# Image Packaging Configuration
#
# CONFIG_SUBSYSTEM_ROOTFS_INITRAMFSis not set
...
CONFIG_SUBSYSTEM_ROOTFS_EXT=y
...
CONFIG_SUBSYSTEM_SDROOT_DEV="/dev/mmcblk1p2"
16. Configure the petalinux-project:
$ petalinux-config --silentconfig
17. Build the petalinux-project:
$ petalinux-build
NOTE : During first build, I often get a build error for the webkitgtk package … when this happens, I perform a second “petalinux-build” which succeeds … not certain what is causing this, but invoking “petalinux-build” twice has been working for me …
18. After the petalinux project builds successfully, the following files will be of interest, and can be copied into the Vitis platform.
images/linux/image.ub
images/linux/rootfs.tar.gz
The following links provide the new petalinux BSPs, which were augmented with the modifications described previously for Vitis-AI 1.1:
- ULTRA96V2 : http://avnet.me/Avnet-ULTRA96V2-Vitis-AI-1-1-petalinux (MD5SUM = 09d03a1df4dd30cd9edf0bb6c4382e83)
- UZ7EV_EVCC : http://avnet.me/Avnet-UZ7EV_EVCC-Vitis-AI-1-1-petalinux (MD5SUM = 7d2f8c4b74dbb51c69888cde4ccf6960)
- UZ3EG_IOCC : http://avnet.me/Avnet-UZ3EG_IOCC-Vitis-AI-1-1-petalinux (MD5SUM = b7a82b1bcb4c8d55de8d01180dea7362)
- UZ3EG_PCIEC : http://avnet.me/Avnet-UZ3EG_PCIEC-Vitis-AI-1-1-petalinux (MD5SUM = b36d604227823e615a1fdf270c0cb324)
NOTE : the image.ub and rootfs.tar.gz files are located in the pre-built/linux/images directory for each petalinux BSP.
Step 1 - Build the Hardware ProjectThe hardware project(s) that we built in Part 1 does(do) not need to be rebuilt, since we have not changed the base hardware project (XSA).
Recall that the hardware designs that we built in Part 1 had the following DPU configurations:
- UZ7EV_EVCC : B2304 (high RAM usage, high DSP48 usage), 200MHz/400MHz
- ULTRA96-V2 : B2304 (low RAM usage, low DSP48 usage), 200MHz/400MHz
- UZ3EG_IOCC : B2304 (low RAM usage, low DSP48 usage), 150MHz/300MHz
- UZ3EG_PCIEC : B2304 (low RAM usage, low DSP48 usage), 150MHz/300MHz
Recall also that we have two distinct DPU configurations, requiring models to be built for these distinct configurations:
- B2304_lr : B2304 DPU with low RAM usage
- B4096_hr : B4096 DPU with high RAM usage
Pre-built SD card images have been provided (at the end of this guide) that include the hardware designs from Part 1, combined with the modified petalinux images from the previous step. More specifically, the image.ub and rootfs.tar.gz were updated.
Step 2 - Compile the Models from the Xilinx Model ZooThe Xilinx Model Zoo is a repository of free pre-trained deep learning models, optimized for inference deployment on Xilinx™ platforms.
These models need to be compiled for deployment (inference) on a specific DPU configuration. In our case, we have two (2) distinct DPU configurations in our designs:
- B2304_lr : B2304 DPU with low RAM usage
- B4096_hr : B4096 DPU with high RAM usage
VART
The VART examples make use of the following models:
Since this is a subset of the models we built for the DNNDK examples in Part 1, we can reuse these models for the VART examples.
Vitis-AI-Library
For the Vitis-AI-Library, Xilinx has created a new AI Model package for the Ultra96-V2 platform, corresponding to the “B2304_lr” configuration. This AI Model package can be used for the UZ3EG_IOCC and UZ3EG_PCIEC platforms, which also have the same “B2304_lr” configuration.
- http://avnet.me/vitis_ai_model_ULTRA96V2_2019.2-r1.1.1.deb (MD5SUM = 368069d3af37c218768121073c9b25de)
For the UZ7EV_EVCC platform, we will use the ZCU104’s AI Model package, since it has been compiled for the “B4096_hr” configuration.
Step 3 - Compile the AI ApplicationsThe Vitis-AI 1.1 provides several different APIs, the DNNDK API, and the VART API.
The DNNDK API is the low-level API used to communicate with the AI engine (DPU). This API is the recommended API for users that will be creating their own custom neural networks, targeted to the Xilinx devices.
The Vitis-AI RunTime (VART) API, and Vitis-AI-Library, provide a higher level of abstraction that simplifies development of AI applications. This API is recommended for users wishing to leverage the existing pre-trained models from the Xilinx Model Zoo in their custom applications.
Step 3.2 - Compile the VART based AI ApplicationsIn order to build the VART based examples, refer to the REAME.md in the following repository:
https://github.com/Xilinx/Vitis-AI/tree/v1.1-ultra96v2/VART
For the “Setting up the Target / Installing the Board Image” section, use one of the SD card images provided at the end of this guide.
Step 3.3 - Compile the Vitis-AI-Library ApplicationsIn order to build the VART based examples, refer to the REAME.md in the following repository:
https://github.com/Xilinx/Vitis-AI/tree/v1.1-ultra96v2/Vitis-AI-Library
For the “Setting up the Target / Installing the Board Image” section, use one of the SD card images provided at the end of this guide.
For the “Setting up the Target / Installing the AI Model Package” section, use the following:
- ULTRA96V2 => use the ULTRA96V2 AI model package
- UZ7EV_EVCC => use the ZCU104 AI model package
- UZ3EG_IOCC => use the ULTRA96V2 AI model package
- UZ3EG_PCIEC => use the ULTRA96V2 AI model package
NOTE : The ULTRA96V2 AI model package is provided in the previous section.
Step 4 - Create the SD cardIn this (Part 2) guide, pre-built SD card images have been provided.
You will need to download one of the board specific archives, as well as the common solution archive, from the “Solution - Pre-built SD Card images” section.
Each board specific SD card image contains the hardware design (BOOT.BIN, dpu.xclbin), as well as the petalinux images (image.ub, rootfs.tar.gz). It is provided in image (IMG) format, and contains two partitions:
- BOOT – partition of type FAT (size=4GB)
- ROOTFS – partition of type EXT4
The first BOOT partition was created with a size of 4GB. The reason is to allow for Windows only users to test drive the SD card images. This BOOT partition is large enough to unzip the COMMON solution archive.
The second ROOTFS partition will automatically be resized to the remaining size of the SD card at boot time, after the first boot.
19. Program the board specific SD card image to a 16GB micro SD card (preferred) or 8GB micro SD card
a. On a Windows machine, use Balena Etcher or Win32DiskImager (free opensource software)
b. On a linux machine, use the dd utility
$ sudo dd bs=4M if=Avnet-{platform}-Vitis-AI-1-1-2020-05-15.img of=/dev/sd{X} status=progress conv=fsync
Where {X} is a smaller case letter specify the device of your SD card. You can use “df -h” to determine which device corresponds to your SD card
20. Extract the COMMON solution archive to the BOOT partition
Step 5 - Execute the AI applications on hardwareSome of the configuration steps only need to be performed once (after the first boot), including the following:
21. Boot the target board with the micro SD card that was create in the previous section
22. After the first boot, perform the following configuration for the Wayland desktop
$ cd /mnt/runtime/WAYLAND
$ dpkg -i libdrm-tests_2.4.94-r0_arm64.deb
Add the following lines to the end of the /etc/xdg/weston/weston.ini:
[output]
name=DP=1
mode=1920x1080@60
This configuration allows the resolution of the Wayland desktop to be changed, and was taken from the following Xilinx forum post:
How-to-change-dispaly-resolution-with-V3-1-petalinux-image-files
To change the resolution of the Wayland desktop, use any of the following provided scripts.
As an example, for 1280x720 resolution:
$ source /mnt/runtime/WAYLAND/change_resolution_1280x720.sh
23. After the first boot, install the Vitis-AI runtime packages
$ cd /mnt/runtime/VART
$ tar -xzvf glog-0.4.0-Linux.tar.gz --strip-components=1 -C /usr
$ dpkg -i --force-all vitis-ai-runtime-1.1.2/unilog/aarch64/libunilog-1.1.0-Linux-build46.deb
$ dpkg -i vitis-ai-runtime-1.1.2/XIR/aarch64/libxir-1.1.0-Linux-build46.deb
$ dpkg -i vitis-ai-runtime-1.1.2/VART/aarch64/libvart-1.1.0-Linux-build48.deb
$ dpkg -i vitis-ai-runtime-1.1.2/Vitis-AI-Library/aarch64/libvitis_ai_library-1.1.0-Linux-build46.deb
24. After the first boot, install one of the following AI model packages
a. For the ULTRA96V2, UZ3EG_IOCC, and UZ3EG_PCIEC platforms, install the “B2304_lr” version of the AI model package:
$ cd /mnt/runtime
$ dpkg -i vitis_ai_model_ULTRA96V2_2019.2-r1.1.1.deb
b. For the UZ7EV_EVCC platform, install the “B4096_hr” version of the AI model package”
$ cd /mnt/runtime
$ dpkg -i vitis_ai_model_ZCU104_2019.2-r1.1.0.deb
25. After the first boot, and after the VART runtime, modify the /etc/vart.conf file, which specifies the default location of the dpu.xclbin
firmware: /run/media/mmcblk0p1/dpu.xclbin
a. For the ULTRA96V2, this is valid and does not require any change.
b. For the UZ7EV_EVCC, UZ3EG_IOCC, and UZ3EG_PCIEC platforms, this is invalid and needs to be changed to the following valid location:
firmware: /run/media/mmcblk1p1/dpu.xclbin
26. Validate the Vitis-AI runtime with the dexplorer utility
$ dexplorer --whoami
[DPU IP Spec]
IP Timestamp : 2020-03-26 13:30:00
DPU Core Count : 1
[DPU Core Configuration List]
DPU Core : #0
DPU Enabled : Yes
DPU Arch : B2304
DPU Target Version : v1.4.1
DPU Freqency : 300 MHz
Ram Usage : Low
DepthwiseConv : Enabled
DepthwiseConv+Relu6 : Enabled
Conv+Leakyrelu : Enabled
Conv+Relu6 : Enabled
Channel Augmentation : Enabled
Average Pool : Enabled
NOTE : Even if you have built the design for frequencies other than 150MHz/300MHz for the DPU, the dexplorer utility will still report 300MHz.
After the above one-time configuration is complete, the VART and Vitis-AI-Library application examples can be executed.
27. Change the resolution of the DP monitor to a lower resolution, such as 1280x720
$ source /mnt/runtime/WAYLAND/change_resolution_1280x720.sh
28. Define the DISPLAY environment variable
$ export DISPLAY=:0.0
29. Launch the VART based sample applications
a. Launch the adas_detection application
$ cd /mnt/VART/samples/adas_detection
$ ./adas_detection ./video/adas.avi ./model_dir_for_{config}
Where {config} is either B2304_lr or B4096_hr, depending on your platform.
b. Launch the pose_detection application
$ cd /mnt/VART/samples/pose_detection
$ ./pose_detection ./video/pose.mp4 ./model_dir_for_{config}
Where {config} is either B2304_lr or B4096_hr, depending on your platform.
c. Launch the caffe version of the resnet50 application
$ cd /mnt/VART/samples/resnet50
$ ./resnet50 ./model_dir_for_{config}
d. Launch the segmentation application
$ cd /mnt/VART/samples/segmentation
$ ./segmentation ./video/traffic.mp4 ./model_dir_for_{config}
Where {config} is either B2304_lr or B4096_hr, depending on your platform.
e. Launch the video_analysis application
$ cd /mnt/VART/samples/video_analysis
$ ./video_analysis ./video/structure.mp4 ./model_dir_for_{config}
Where {config} is either B2304_lr or B4096_hr, depending on your platform.
For the Vitis-AI-Library applications, refer to each sample directory’s “readme” file for details on how to execute the applications.
30. Launch the Vitis-AI-Library based sample applications
a. Launch the face_detect application with both variants of the densebox model (specify “0” as second argument, to specify the USB camera)
$ cd /mnt/Vitis-AI-Library/overview/samples/facedetect
$ ./test_video_facedetect densebox_640_360 0
$ ./test_video_facedetect densebox_320_320 0
b. Compare the performance of each variant of the densebox models
$ ./test_performance_facedetect densebox_640_360 ./test_performance_facedetect.list
$ ./test_performance_facedetect densebox_320_320 ./test_performance_facedetect.list
Experiment with the other models, as well as the multi-model examples in the “/mnt/Vitis-AI-Library/overview/demo” directory.
You may have noticed that there is an icon on the Wayland desktop that looks like a camera.
This icon is defined in the /usr/xdf/weston/weston.ini configuration file as follows:
[launcher]
icon=/usr/share/icons/Adwaita/24x24/devices/camera-web.png
path=/bin/bash -c `/usr/bin/ai-camera`
The contents of the ai-camera script (which was imported to our petalinux project in the recipes-ai directory) contains an invalid directory:
/usr/share/XILINX_AI_SDK/samples/facedetect/test_video_face_detect_dense_box_640x360 0 >/dev/null 2>&1 &
Edit this ai-camera script with valid content, for example:
/mnt/Vitis-AI-Library/overview/samples/facedetect/test_video_facedetect densebox_640_360 0 >/dev/null 2>&1 &
Clicking on this icon will now launch the face detection application. Once started, there is no way of stopping it (to my knowledge).
Solution – Pre-built SD card imagesFor convenience, the following links provide the SD card images, in IMG format:
- ULTRA96V2 : http://avnet.me/avnet-ultra96v2-vitis-ai-1.1-image (MD5SUM = 7f54ceed152a0c704f5da18c4738b3fc)
- UZ7EV_EVCC : http://avnet.me/avnet-uz7ev-evcc-vitis-ai-1.1-image (MD5SUM = e4cd20cd9e565629676f897334baf469)
- UZ3EG_IOCC : http://avnet.me/avnet-uz3eg-iocc-vitis-ai-1.1-image (MD5SUM = 3f3dfa71cd826cccfce81527b20f4b33)
- UZ3EG_PCIEC : http://avnet.me/avnet-uz3eg-pciec-vitis-ai-1.1-image (MD5SUM = 3779b5bd5719c4493149c8dcb79faa56)
The following link provides the common solution archive for all platforms:
- COMMON : http://avnet.me/Avnet-COMMON-Vitis-AI-1-1-image (MD5SUM = 464ecc94368d1cb7deb184b653e740a1)
For the case of the Ultra96-V2 Development Board, an important PMIC firmware update is required to run all of the AI applications.
Without the PMIC firmware update, the following AI applications will cause periodic peak current that exceeds the default 4A fault threshold, causing the power on reset to assert, and thus the board to reboot.
- adas_detection
- inception_v1_mt
- resnet50_mt
- segmentation
- video_analysis
The PMIC firmware update increases this fault threshold, and prevents the reboot from occurring.
In order to update the PMIC firmware of your Ultra96-V2 development board, refer to the following instructions:
If you are unable to update the PMIC firmware on your Ultra96-V2, but still want to run all of the AI applications, you can make use of the following script (from Xilinx) to reduce the frequency of the DPU:
This script will reduce the frequency of the PL_CLK0 (100MHz) clock source that feeds the Clock Wizard that generates the multiple clock frequencies, available for Vitis.
The recommended setting for the Ultra96-V2 without PMIC firmware update is to reduce the DPU frequencies down to 125MHz/250MHz.
If you have built the design for 150MHz/300MHz, you should use a value of 83%.
If you have built the design for 200MHz/400MHz (ie. pre-built solution), you should use a value of 65%.
31. Execute the following commands after boot:
$ dpu_clk
Real PL0_CLK 100000000
DPU Performance 100.0%
$ dpu_clk 65
$ dpu_clk
Real PL0_CLK 65217391
DPU Performance 65.2%
This will set the PL_CLK0 frequency to 65MHz, and thus the DPU frequencies to 65% of their original values.
Comments