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 Path II Programmable Blog 11 - Project Part 2 - Generating & capturing data with the Ultra96v2 & PYNQ
  • 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: avnrdf
  • Date Created: 10 Jan 2020 3:34 AM Date Created
  • Views 1513 views
  • Likes 5 likes
  • Comments 2 comments
  • ultra96v2
  • path ii programmable
  • winners
Related
Recommended

Path II Programmable Blog 11 - Project Part 2 - Generating & capturing data with the Ultra96v2 & PYNQ

avnrdf
avnrdf
10 Jan 2020

Continuing on from where I left off in Path II Programmable Blog 10 - Project Part 1 - Exploring PYNQ with the Ultra96v2 ...

 

IP to capture waveforms to, and generate waveforms from BRAM:

 

I created a new IP that can capture data from an input interface to BRAM, and transfer data from BRAM to an output interface. I won't go into too many details about how it works on the inside, but it's pretty simple:

  • An AXI-4 Lite slave interface that exposes 3 registers: 3 inputs (PS to IP) and 1 output (a IP to PS status register).
  • 3 FSMs: one main FSM for controlling the state (reset, input or output modes), and one each for the input & output modes. These 2 FSMs go through 3 states: IDLE, ACTIVE (where the counter is running) and DONE.

 

The PS can configure the number of samples to capture/generate to/from BRAM.

imageimage

 

I wrote a testbench that puts the IP in different states to see whether it worked:

image

 

Imported the RTL into the Block Design, connected it to the second BRAM port, and also connected the ILA to help me debug. The 'interface_dxxx' are the input & output interfaces.

 

image

 

With all of this complete, I exported the bitstream and block_design.tcl to my Jupyter notebook. My first attempt at running it did not work, so I tried to use the ILA to debug. However, the PYNQ image wouldn't boot with the JTAG dongle connected, so I exported the hardware wrapper to Xilinx SDK and created a new project. I converted the testbench code into C, and executed the program - launching the program in Xilinx SDK allowed me to simultaneously use the Vivado ILA and fix one or two bugs.

image

With the hardware fixed, I booted up the PYNQ image, imported the bitstream & TCL file and wrote some Python that used the MMIO driver to access the IP.

image

 

I filled the memory-mapped BRAM with some data, put my IP into output mode and triggered it. The Vivado ILA shows a pattern being generated:

image

 

With all of the code added to the Jupyter notebook, here's what it looks like when you trigger a capture: the data is saved to BRAM, read back and plotted using matplotlib.

image

 

This completes my Path II Programmable project!

I don't plan on stopping here - I want to figure out how to get the R5s & A53s to talk, and explore more of the MMIO driver. I've looked at using the AXI DMA IP to transfer data from the BRAM to DDR4 (and vice-versa), so stay tuned for more!

  • Sign in to reply
  • shefali
    shefali over 4 years ago

    Can you please share this project? Thanks.

     

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

    Great little project. Simple yet effective. Thanks avnrdf

    • 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