Open main menu

DAVE Developer's Wiki β

Changes

BELK-TN-005: Running PYNQ on Bora

299 bytes added, 11:01, 13 November 2018
Creating and Running a New Custom Overlay: Approach #1
====Creating and Running a New Custom Overlay: Approach #1====
We created a custom overlay associated with the hardware implementation of the FIR filter. This first approach made use of the FIR Compiler tool provided by Vivado.
The fundamental steps required to do this are:
*Opening a new Vivado project, selecting ''RTL project'' and ''Bora SOM'' as the target board
*Creating your block design
**Adding ''FIR compiler'' block (included in Vivado default IP) and setting it up
**Adding ''AXI direct memory access'' block and setting it up
**On ''ZYNQ7 Processing System'' block, enabling a ''High-Performance AXI 32b/64b Slave Ports'' on interface HP0
**Connecting AXIS_DATA bus of AXI and FIR block
**''Runnin Connection Automation'' to complete wiring
*Creating Hierarchy of AXI and FIR block named <code>filter</code>
*Exporting bitstream file running ''Generate Bitstream''
*Exporting block design using Tcl console command <code>write_bd_tcl </path/name>.tcl</code>
*Renaming generated files as <code>overlay_name>.bit</code> and <code><overlay_name>.tcl</code>
*Creating a folder named <code><overlay_name></code> and inserting generated files
*Copying the folder to the target's filesystem in <code>pynq/overlays/</code> direcrtory.
/* instruzioni di setup vivado */*Open a new Vivado project, select "RTL project" and "BORA SOM" as target board*Create your block design**Add "FIR compiler" block (included in Vivado default IP) and setup it.**Add "AXI direct memory access" block and setup it**Enable on "ZYNQ7 Processing System" block an "High Performance AXI 32b/64b Slave Ports" on interface HP0**Connect AXIS_DATA bus of AXI and FIR block**"Run Connection Automation" to complete wiring*create Hierarchy of AXI and FIR block named "filter"*export bitstream file running "Generate Bitstream"*export block design using tcl console command "write_bd_tcl </path/name>.tcl"*rename generated files as "<overlay_name>.bit" and "<overlay_name>.tcl"*create folder <overlay_name> and insert generated files*copy folder in PYNQ target in pynq/overlays/ The overlay is ready to use be used in the PYNQ Python console.
=====Running Custom Overlays with Generic Driver =====
# RUN CUSTOM PYNQ OVERLAY WITH GENERIC DRIVER To access the overlay with the generic driver:*Load <code>Overlay</code> and <code>Xlnx</code> modules from <code>pynq</code> and <code>pynq.lib.dma</ titolo specifico per filtro fir?code>.*Create <code>Overlay</* sezione da approfondire e riscrivere meglio *code> and <code>Xlnk</code> objectsThese steps allows you to communicate directly through a DMA buffer.
*Load Overlay and Xlnx modules from pynq and pynq.lib.dma.
*Create Overlay and Xlnk object
*you can comunicate directly on dma buffer.
/* vedi For more details, please refer to the section [http://www.fpgadeveloper.com/2018/03/how-to-accelerate-a-python-function-with-pynq.html paragrafo "Hardware FIR Implementation" */].
=====Running Custom Overlays with IP-Specific Driver =====
To access the overlay with a specific driver:*Import <code>DefaultHierarchy</code> from <code>pynq</code>* sezione da approfondire e riscrivere meglio */create a new class for FIR filter with a method to communicate directly thorough a DMA buffer/* da testare exportazione con diversi setaggi da vivado per create a <code>checkhierarchy *</code> method to check the IP contained under ''filter'' hierarchy
*import DefaultHierarchy from pynq
*create a new class for fir filter with a method to comunicate directly on dma buffer
*create a checkhierarchy method to check ip contained under "filter" hierarchy
/* vedi For more details, please refer to the section [http://www.fpgadeveloper.com/2018/03/how-to-accelerate-a-python-function-with-pynq.html paragrafo "''Driver for FIR accelerator" */''].
====Creating and Running a New Custom Overlay: Approach #2====
4,650
edits