element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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 Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • 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
Path II Programmable
  • Challenges & Projects
  • Design Challenges
  • Path II Programmable
  • More
  • Cancel
Path II Programmable
Blog PIIP Project - Port DPU TRD for Ultra96v1 to v2
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: ralphjy
  • Date Created: 26 Nov 2019 4:40 AM Date Created
  • Views 1599 views
  • Likes 5 likes
  • Comments 5 comments
  • ultra96-v2
  • path ii programmable
  • dpu
Related
Recommended

PIIP Project - Port DPU TRD for Ultra96v1 to v2

ralphjy
ralphjy
26 Nov 2019

My project will involve routing a video stream through a neural network element and deriving detection, control and display outputs from the Ultra96v2, so I've been looking for examples that will help me learn how to accomplish this.  Unfortunately there are a lot of examples for the ZCU102 and the Ultra96v1 but it seems only a few specifically for the Ultra96v2.  I found a project on Hackster:  https://www.hackster.io/gaihrekrishna/dpu-trd-for-ultra96-22e426 which used the Ultra96v1.  It led me to the Xilinx Edge-AI-Platform-Tutorials on github:  https://github.com/Xilinx/Edge-AI-Platform-Tutorials/tree/master/docs/DPU-Integration .  This seemed like a very useful example as it uses the Deep Learning Processor (DPU) to do image processing.  The Face Detection program specifically takes a webcam input and places a bounding box around any detected faces and outputs the result through the displayport.  I decided to try to port (convert) this example for the Ultra96v2.

 

Creating the new hardware platform was straightforward using Vivado.  The example provides the DPU IP and a tcl script to interconnect the design.  Just needed to update the script to use 2018.3 and the ultra96v2 and modify UART and memory configurations for the v2.

 

Similarly the petalinux build just required making the changes required for 2018.3 (the original design was done with 2018.2).  The changes are described in the tutorial.

 

The real problem that I had was trying to regenerate the application software using the SDK.  The process is again straightforward but I was having problems with the compiler not finding either include files or library files.  As shown below, it can't find the assert.h file even though it was definitely in the proper location (compile stops on the first fatal error).

image

This problem had me stymied for a while thinking that I had the incorrect path specified for the files.  It finally occurred to me that I might be having a problem because the path was very deep (long path name).  This was a long shot but I tried relocating the directories and it fixed the problem I was having for the resnet50 program.

 

When this example installs it is using the following file tree (dpu_integration_lab is my project directory).  I had this tree installed under /home/training/petalinux/2018_3/PIIPprojects.  I ended up moving the project directory into my home directory.

 

dpu_integration_lab

└── petalinux

    └── images

        └── linux

            └── sdk

                └── sysroots

                    └── aarch64-xilinx-linux

                        └── usr

                            ├── bin

                            ├── games

                            ├── include

                            ├── lib

                            ├── libexec

                            ├── local

                            ├── sbin

                            ├── share

                            └── src

 

 

It doesn't seem like the length of the path should be an issue.  I don't know if this is a side effect of running in a VM on Windows?  Anyway I was able to build a new resnet50.elf.

 

Building the face_detection program was a much larger problem in that there were many files missing from the SDK, all of them associated with 32 bit structures.  E.G. there was a endian-64.h but no endian-32.h in /usr/include/bits.  Have not figured this out yet.  Maybe there is a version mismatch between the SDK files and the source files.  Fortunately there was a face_detection.elf that was provided and I was able to run that using the new hardware files that I had generated.

 

Here is a demo of the face_detection running the output through the displayport onto my HDMI monitor.  Apologies that I couldn't find a better subject, but I got this running late last night.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

I'll need to figure out the issues with the SDK files so that I can start to create my own custom applications but it feels like things are coming together.  My biggest fear is that the tool and IP version mismatches may be hard to fix.  We'll see......

  • Sign in to reply

Top Comments

  • ralphjy
    ralphjy over 5 years ago in reply to theomain +1
    Hi Luke, I'm currently traveling and can't provide you detailed instructions but one of the differences between the V1 and V2 is the DDR4 memory had to be changed on the board (old memory was obsoleted…
  • rscasny
    rscasny over 5 years ago

    Ralph,

     

    Enjoyed your blogs. You did a great job of explaining what you were doing as you were doing it. Very helpful.

     

    Thanks for the project in progress as well.

     

    Randall

    --element14 Team

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • theomain
    theomain over 5 years ago in reply to ralphjy

    Hi Ralph,

     

    I updated those dram settings, re-exported the new hardware description file and rebuilt petalinux. It worked like a charm.


    Thank you very much! image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • ralphjy
    ralphjy over 5 years ago in reply to theomain

    Hi Luke,

     

    I'm currently traveling and can't provide you detailed instructions but one of the differences between the V1 and V2 is the DDR4 memory had to be changed on the board (old memory was obsoleted) and the configuration is different.  This change is incorporated in the new BSP or it can also be manually updated in Vivado.  Here is a link showing the new parameters: https://www.element14.com/community/community/designcenter/zedboardcommunity/ultra96/ultra96-v2/blog/2019/07/13/lpddr4-memory-differences-between-ultra96-v1-and-ultra96-v2.

     

    Ralph

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • theomain
    theomain over 5 years ago

    Hello Ralph, well done on sucessfully porting this tutorial to the ultra96v2.

     

    I have also been trying to do but haven't had any success. Similarly I am using vivado and petalinux 2018.3.  So far i generated the design in vivado and exported without any problems and then followed the instructions to generate the BOOT.BIN and image.ub. At this point I attempted to boot up the petalinux system but it gets stuck initializing (INIT led is red and DONE led never lights up).

     

    In your description you mentioned that you modified the "UART and memory configuation for the v2". The UART modification I performed was to change stdout to uart_1 and did not change any memory parameters, could you elaborate slightly on this please?


    Any help is greatly appreciated. Cheers. Theo

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • aspork42
    aspork42 over 5 years ago

    Nice job! Way to go with all the troubleshooting to get it all working.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
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 © 2025 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