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
Eye On Intelligence Challenge
  • Challenges & Projects
  • Design Challenges
  • Eye On Intelligence Challenge
  • More
  • Cancel
Eye On Intelligence Challenge
Blog Person Detection with yolo #4 Pynq Virtural Environment
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Eye On Intelligence Challenge to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: fyaocn
  • Date Created: 14 Nov 2024 6:45 AM Date Created
  • Views 485 views
  • Likes 4 likes
  • Comments 1 comment
Related
Recommended

Person Detection with yolo #4 Pynq Virtural Environment

fyaocn
fyaocn
14 Nov 2024

#4 Pynq Virtural Environment 

Table of Contents

  • 1 Pynq is virtual environment
  • 2 Arty Z7 and pynq overlay
  • 3 Pynq setup in Arty Z7
  • 4 iPython and coding
  • 5 Summary

1 Pynq is virtual environment

Pynq is clever designed to support AMD-Xilinx platform without efforts on climbing knowledge cliff for FPGA principles. Pynq is opensourced and support Zynq|Zynq Ultrascale+ platforms likr Ultra96, ZCU104 etc. For Spantan, the resource is limited, for Alveo only in Host OS mode since they are PCI cards. Pynq can be ported to compatible boards.

In most cases, download pynq SD card image to boot the board can start the pynq in jupyter notebook mode. The ipython mode is jupyter lab supported instead of jupyter notebook. The pynq is virtual enviornment. Any python package shall be installed in Pynq, or else it is not accessible. 

According to the develop flow, petalinux build one SD card image and include pynq as one package. After booting, pynq is started and ready to be visit in http callbacks. Pynq provide overlay to import bitstream files to after bootup. DPUs built by vitis AI, is compile into binary file, to be included in pynq overlays.

Try times and times with DPU-Pynq installation, it comes that Pynq-z1 is not supporting DPU, as https://discuss.pynq.io/t/dpu-pynq-now-available-for-zu-and-rfsoc-devices/1251 only applicable to Zynq Ultrascale+ in recent Pynq versions.

2 Arty Z7 and pynq overlay

The reason to used pynq is Arty Z7 is pin to pin compatible with Pynq-z1, the documents can be shared. Pynq-z2 can be used as well if audio is not used. Both Arty Z7, pynq-z1 and pynq-z2 shal Zynq-7020 core, an SOC based on a dual-core ARM® Cortex®-A9 processor (referred to as the Processing System or PS), integrated with FPGA fabric (referred to as Programmable Logic or PL). The PS subsystem includes a number of dedicated peripherals (memory controllers, USB, Uart, IIC, SPI etc) and can be extended with additional hardware IP in a PL Overlay.

image

PYNQ provides a Python interface to allow overlays in the PL to be controlled from Python running in the PS. Base overlay includes,

  • HDMI (Input and Output)
  • Microphone in
  • Audio out
  • User LEDs, Switches, Pushbuttons
  • 2x Pmod PYNQ MicroBlaze
  • Arduino PYNQ MicroBlaze
  • 3x Trace Analyzer (PMODA, PMODB, ARDUINO

image

Besides, there are logictools overlays, for external digital logic circuit. 

Loading overlay is simple in Pynq python

from pynq import Overlay
overlay = Overlay("base.bit")

The overlay is then imported with predefined Interface APIs.

3 Pynq setup in Arty Z7

Download Pynz-z1 image and flash to SD card, insert the SD card into the slot,

Plug RJ-45 cord, connecting ethernet,

Change IP of host computer within 192.168.2.x

Setting Jumpers to select the power source USB or 12V external power adapter

image

Wait a while for booting up.

Visit 192.168.2.99 from host computer, the pynq interface is ready.

image

input password 'xilinx' to enter,

image

The pynq virtual enviornment can be access from serial port

image

4 iPython and coding

Create new terminal, into pynq enviornment,

image

browse for packages installed, eg., library vitis XRT is install for PCI cards

image

There is the script start pynq environment

image

The vart is not installed and quite a lot packages is missing in this version of Pynq,

image

Go back to ipython to run overlays one by one to be familiar with them,

image

Public python packages can be installed as normal python, since this is based on ubuntu jammy , command like apt, apt-get both can be used as package manager.

image

5 Summary

This blog briefs the pynq environment and how to use them. This is not easy to install vitis library instantly. I have tried with older version of Pynq in PYNQ-Z1 board. The dpu is build into binary file dpu.xclib to be imported as overlay. I could not find it in newer version.

Thera are still ways to run the person detection on this boards. And I shall try it on.

  • Sign in to reply
  • DAB
    DAB 9 months ago

    Nice update.

    • 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