element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Ralph Yamamoto's Blog DPU-PYNQ on UltraZed-EV
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: ralphjy
  • Date Created: 3 Oct 2020 8:26 PM Date Created
  • Views 1086 views
  • Likes 0 likes
  • Comments 0 comments
  • ultrazed-ev
  • dpu-pynq
  • yolov3
Related
Recommended

DPU-PYNQ on UltraZed-EV

ralphjy
ralphjy
3 Oct 2020

I encountered a few problems trying to run DPU-PYNQ on the UltraZed-EV during my roadtest a couple of months ago.  Actually, I've tried to run a few variants of UtraZed-EV hardware configuration with PYNQv2.5 with little success.  The UltraZed-EV is not one of the boards currently supported by PYNQ or DPU-PYNQ.  But there is a reasonably well documented process to port PYNQv2.5 to unsupported or custom boards and the ZCU104 board which uses the same ZU7EV MPSoC+ is supported, so it seemed like getting it to work should have been straightforward.  As always, the "devil is in the details" and little things caused me to fail.

 

Here are the configurations that I tried:

Port OOB BSP to PYNQv2.5 - this was successful  Avnet UltraZed-EV Starter Kit Road Test - Port PYNQv2.5

Port VCU TRD BSP to PYNQv2.5 - this was a failure  Avnet UltraZed-EV Starter Kit Road Test - Port PYNQv2.5 continued

Port OOB BSP to DPU-PYNQ - this was initially a failure but I now have this working and that's the subject of this post

 

The configuration that is my end goal:

     Port VCU TRD BSP to DPU-PYNQ - this basically gets the VCU, DPU, Vitis-AI (DNNDK and VART) and PYNQ working together

 

My main issues have been a lack of understanding of how PYNQ and Vitis-AI are configured.  I've been fairly successful with PYNQ and DPU-PYNQ on the Ultra96v2 because that's a supported board and the examples have been vetted by Xilinx and Avnet folk.  Recently Avnet released Vitis Platforms for the UltraZed-EG and UltraZed-EV and Mario Bergeron did some great tutorials on Hackster on Vitis-AI that I tried during the roadtest: Avnet UltraZed-EV Starter Kit Road Test - Vitis AI .  So, it seemed like a good time to go back and see if I could work through the issues that I had earlier.

 

The quick porting process that I've been using utilizes a board agnostic pre-built image of the PYNQv2.5.  It turns out that this process has a problem with the hardware configuration of the Avnet UltraZed-EG and UltraZed-EV boards.  These boards assign /dev/mmcblk1 to the SD card while the default is /dev/mmcblk0.  I discovered this initially because I needed to modify the pynq_bootargs.dtsi file in meta-pynq in order to be able to boot successfully.  What I didn't realize is that the pre-built image also has /dev/mmcblk0 in the resizefs.sh script so that the partition for the rootfs was not getting resized properly.  I also ran into an issue trying to upgrade PYNQv2.5 to PYNQv2.5.1 because the Xilinx Runtime (xrt) is also not included in the pre-built image.  These problems can be fixed by building a custom image using STAGE4 packages.  I just needed to add the xrt package and the resizefs package (with a modified resizefs.sh).  I rebuilt a port to PYNQv2.5 using the OOB BSP and was able to successfully complete the DPU-PYNQ installation.

 

Process to install DPU-PYNQ

1. Upgrade the PYNQv2.5 installation to make it DPU ready (assumes a working PYNQ setup with Internet access)

    From the PYNQ home window start a new terminal which opens as root in the /home/xilinx directory (superuser privileges are required)

    Clone the DPU-PYNQ repository: git clone --recursive --shallow-submodules https://github.com/Xilinx/DPU-PYNQ.git

    Change directory and run make:   cd DPU-PYNQ/upgrade

                                                           make

 

   The upgrade process took about 40 minutes to complete.

    By default, the Makefile will install / update the following packages:

      • pynq: Install pynq 2.5.1 from source distribution.
      • xrt: Xilinx Run Time (XRT) will be upgraded to tag 2019.2_RC2.
      • ubuntu_pkg: Install a couple of packages from Ubuntu repository; remove the old opencv package.
      • opencv: Install opencv 3.4.3.
      • protobuf: Install protobuf 3.6.1.
      • jsonc: Install json-c 0.13.1.
      • dpu_clk: Install a small Python script to control DPU clocks.
      • glog: Install glog 0.4.0.

 

          2. Install example Jupyter Notebooks:  pip3 install pynq-dpu

                                                                        cd $PYNQ_JUPYTER_NOTEBOOKS

                                                                        pynq get-notebooks --ignore_overlays pynq-dpu -p .   (ignore_overlays because the UltraZed-EV is not a supported board, so there are no overlays in the repo)

 

          3. Build dpu hardware overlay.  I'm not going to elaborate this process but you can find the instructions here: https://github.com/Xilinx/DPU-PYNQ/blob/master/boards/README.md

              The process is run on your host machine (I'm running a VM with 2019.2 tools)

              The make process will generate 3 files:

      1. dpu.bit
      2. dpu.hwh
      3. dpu.xclbin

              These files need to be copied to the overlays directory on the UltraZed-EV.  I was initially confused because the overlays are not installed where I normally would put them, i.e. /home/xilinx/pynq/overlays.

              Then I realized that /home/xilinx/pynq is really a link to /usr/local/lib/python3.6/dist-packages/pynq.  The overlays directory for pynq_dpu is /usr/local/lib/python3.6/dist-packages/pynq_dpu/overlays.

 

          4. Build or copy models for example notebooks.  Since the UltraZed-EV uses the same MPSoC+ device as the ZCU104, I got the sample models from here: https://github.com/Xilinx/Vitis-AI/tree/v1.1/mpsoc/vitis_ai_dnndk_samples

      • dpu_inception_v1_0.elf
      • dpu_mnist_classifier_0.elf
      • dpu_resnet50_0.elf
      • dpu_tf_inceptionv1_0.elf
      • dpu_tf_yolov3.elf

               Copy the models to the Jupyter Notebooks directory on the UltraZed-EV

 

 

Run yolov3 example

          I modified the yolov3 example notebook to use a frame capture from the rtsp stream from my driveway IP camera.  It classifies the two vehicles in the image as cars but it is more confident with the side view than the front view.

 

image

image

image

image

image

image

image

image

image

 

Now I need to get this working with the VCU TRD.  I also haven't tried running IP camera video in Jupyter Notebooks.  Maybe I'll try that first.

 

 

 

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube