element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • 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
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • 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
FPGA
  • Technologies
  • More
FPGA
Blog Learning Xilinx Zynq: Try to make my own Accelerated OpenCV Function - 2: Vivado Block Design
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
FPGA requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 16 Aug 2021 9:00 AM Date Created
  • Views 1505 views
  • Likes 5 likes
  • Comments 2 comments
  • summer_of_fpgas
  • opencv
  • zynq
  • xilinx
  • vivado
  • summer of fpgas
  • pynq
  • hardware_accelerators
  • vitis
Related
Recommended

Learning Xilinx Zynq: Try to make my own Accelerated OpenCV Function - 2: Vivado Block Design

Jan Cumps
Jan Cumps
16 Aug 2021

Read this for info only. The project done at the time didn't work. I'm leaving the blog here as a testimonial that things have become easier and more streamlined with the 2.7 release of the example.
I
t works, and can easily be repeated, with Vitis HLS and Vivado 2020.2, on PYNQ 2.6 and 2.7.

There is an example project that shows how to run OpenCV functions in FPGA instead of on a processor.

This practice of off-loading heavy processing from software in the processor to hardware designs running inside the FPGA  fabric is called hardware acceleration.

I reviewed it here: Learning Xilinx Zynq: Hardware Accelerated Software.

In this series, I will try to do the same, with the 2020.2 toolchain and sources.

 

Part 2: Take the Vitis HLS IP from Post 1 and configure the Block Design

 

I created a project called accelerate_vision, using the script from Automate Repeatable Steps in Vivado.

That results in a Block Design with a number of the IPs placed and preconfigured.

 

Reconfigure the IPs

 

Zynq PS

 

Enable the two PS - PL interfaces Master AXI GP0 and Slave AXI HP0

image

Leave all other settings like they were created by the TCL script.

 

AXI GPIO

 

Delete it. It's not used in this design.

image

 

Axi Interconnect

 

Add an additional Master interface

image

 

Add new IPs

 

The Vitis HLS Resize Hardware Accelerator

 

This is the block we created in the previous post. Make it available for this project.

In Project Manager -> Settings, go to the IP Repository screen, and click the +.

Add the location of the Vitis HLS project from that previous post.

image

Vivado will tell you that one new IP is available for your design. Your resize_accel.

Navigate to the Block Design screen, click the +, and add the IP to your design.

 

image

 

Here I'm stuck image - the Xilinx example builds an AXI Master interface. The HelloWorld example uses AXI Lite. I have to study ...

 

I have altered the Vision resize example code to adapt use AXI Lite as interface instead of AXI Master. The previous blog is rewritten to reflect that.

When I fully understand the AXI mechanisms, I may revisit this...

 

 

image

 

 

Pynq - Zync - Vivado series
Add Pynq-Z2 board to Vivado
Learning Xilinx Zynq: port a Spartan 6 PWM example to Pynq
Learning Xilinx Zynq: use AXI with a VHDL example in Pynq
VHDL PWM generator with dead time: the design
Learning Xilinx Zynq: use AXI and MMIO with a VHDL example in Pynq
Learning Xilinx Zynq: port Rotary Decoder from Spartan 6 to Vivado and PYNQ
Learning Xilinx Zynq: FPGA based PWM generator with scroll wheel control
Learning Xilinx Zynq: use RAM design for Altera Cyclone on Vivado and PYNQ
Learning Xilinx Zynq: a Quadrature Oscillator - 2 implementations
Learning Xilinx Zynq: a Quadrature Oscillator - variable frequency
Learning Xilinx Zynq: Hardware Accelerated Software
Automate Repeatable Steps in Vivado
Learning Xilinx Zynq: Try to make my own Accelerated OpenCV Function - 1: Vitis HLS
Learning Xilinx Zynq: Try to make my own Accelerated OpenCV Function - 2: Vivado Block Design
Learning Xilinx Zynq: Logic Gates in Vivado
Learning Xilinx Zynq: Interrupt ARM from FPGA fabric
Learning Xilinx Zynq: reuse and combine components to build a multiplexer
PYNQ version 2.7 (Austin) is released
PYNQ and Zynq: the Vitis HLS Accelerator with DMA training - Part 1: Turn C++ code into an FPGA IP
PYNQ and Zynq: the Vitis HLS Accelerator with DMA training - Part 2: Add the Accelerated IP to a Vivado design
PYNQ and Zynq: the Vitis HLS Accelerator with DMA training - Part 3: Use the Hardware Accelerated Code in Software
PYNQ and Zynq: the Vitis HLS Accelerator with DMA training - Deep Dive: the data streams between Accelerator IP and ARM processors
Use the ZYNQ XADC with DMA part 1: bare metal
Use the ZYNQ XADC with DMA part 2: get and show samples in PYNQ
VHDL: Convert a Fixed Module into a Generic Module for Reuse
  • Sign in to reply
  • Jan Cumps
    Jan Cumps over 1 year ago in reply to Jan Cumps

    I got the DMA error resolved.

    No success though. Like others have reported, the accelerated function spins without returning:

     

     

     

    image

     

    Other developers report that the DMA doesn't flag that activity is finished.

    When I break my execution, I can see that it's stuck at that same place:

     

    image

     

    This may be a good time to pause the exercise and watch the support tickets that exist for the current code and tool versions ( at Xilinx related to build errors, at Pynq related to the spinning behaviour).

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 1 year ago

    Current status:

    • both Vitis HLS and Vivado projects build successful.
    • in Jupyter, loading the bitstream and preparing the objects works. During execurtion of the accelerator, I get DMA errors:

    image

    • 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 © 2023 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

  • Facebook
  • Twitter
  • linkedin
  • YouTube