Today,You can use python to develop FPGA,it is PYNQ.
The brief specification of PYNQ Z2 is as follows, with some parameters I am concerned about bolded:
ZYNQ XC7Z020-1CLG400C • 650MHz dual-core Cortex-A9 processor • DDR3 memory controller with 8 DMA channels and 4 High Performance AXI3 Slave ports • High-bandwidth peripheral controllers: 1G Ethernet, USB 2.0, SDIO • Low-bandwidth peripheral controller: SPI, UART, CAN, I2C • Programmable from JTAG, Quad-SPI flash, and MicroSD card • Programmable logic equivalent to Artix-7 FPGA • 13,300 logic slices, each with four 6-input LUTs and 8 flip-flops • 630 KB of fast block RAM • 4 clock management tiles, each with a phase locked loop (PLL) and mixed-mode clock manager (MMCM) • 220 DSP slices • On-chip analog-to-digital converter (XADC) Memory • 512MB DDR3 with 16-bit bus @ 1050Mbps • 16MB Quad-SPI Flash with factory programmed 48-bit globally unique EUI-48/64™ compatible identifier • MicroSD slot Power • Powered from USB or 7V-15V external power source | USB and Ethernet • Gigabit Ethernet PHY • Micro USB-JTAG Programming circuitry • Micro USB-UART bridge • USB 2.0 OTG PHY (supports host only) Audio and Video • HDMI sink port (input) • HDMI source port (output) • I2S interface with 24bit DAC with 3.5mm TRRS jack • Line-in with 3.5mm jack Switches, Push-buttons and LEDs • 4 push-buttons • 2 slide switches • 4 LEDs • 2 RGB LEDs Expansion Connectors • Two standard Pmod ports • 16 Total FPGA I/O (8 shared pins with Raspberry Pi connector) • Arduino Shield connector • 24 Total FPGA I/O • 6 Single-ended 0-3.3V Analog inputs to XADC • Raspberry Pi connector • 28 Total FPGA I/O (8 shared pins with Pmod A port) |
About ZYNQ and PYNQ ,you can refer to this"http://www.zynqbook.com/"
Now,i will introduce PYNQ,you can find the official website and documentation of the project can be found at" http://www.pynq.io/".you can use the Jupyter notebooks to develop PYNQ.
- PYNQ provides a Python interface that allows you to control overlays in PL through Python running in PS.
- FPGA design is a professional task that requires hardware engineering knowledge and professional knowledge.
- PYNQ's Overlay layer is created by hardware designers and is included in this PYNQ Python API.
- Software developers can then use Python interfaces to program and control proprietary hardware overlays without having to design their own.
- This paper briefly introduces the principle of Tiny YOLO target detection algorithm, and finally records the experimental results.
started
(1)According to the official guide, first set the jump cap on the board, burn and write the TF card image
(2)Power on
(3)Connect PYNQ to the LAN
(4)PYNQ hostname:PYNQ,you can input the http://PYNQ ,you can use Jupyter notebook
(5)you can refer to the docment,https://pynq.readthedocs.io
(6)download QNN-PYNQ :https://github.com/Xilinx/QNN-MO-PYNQ
(7)install QNN;
The first method:sudo pip3 install git+http://github.com/Xilinx/QNN-MO-PYNQ.git
The Second method:
https://github.com/Xilinx/QNN-MO-PYNQ,Then,Create a Shared folder,Copy the *.zip to the qnn folder.
python setup.py build and python setup.py install.
(8)open tiny-yolo-image-loop.ipynb,you can see the code:
(9)test
the result :
More refer to:
人工智能
BNN:
https://github.com/Xilinx/BNN-PYNQ/
QNN:
https://github.com/Xilinx/QNN-MO-PYNQ
LSTM:
https://github.com/tukl-msd/LSTM-PYNQ
CNN:
https://github.com/awai54st/PYNQ-Classification
ZIPML:
https://github.com/fpgasystems/ZipML-PYNQ
iSmart:
https://github.com/onioncc/iSmartDNN
spooNN:
https://github.com/fpgasystems/spooNN
accelerator:
https://mp.weixin.qq.com/s/ic2OcbAto_daylAVh7-0HQ
物联网
PYNQ-BOT:
https://github.com/Xilinx/PYNQ-BOT
SPYN-IIOT:
https://github.com/Xilinx/IIoT-SPYN
机器视觉
部分可重配:
https://github.com/AEW2015/PYNQ_PR_Overlay
软GPU:
https://github.com/malkadi/FGPU_IPython/
Video Processing:
https://github.com/Pieter-Berteloot/PYNQ_Projects
板卡移植
参考资料:
Zynq-7000移植指南:
https://gist.github.com/PeterOgden/9a5054a06408d2bd711d6de563281930
Zedboard移植参考:
https://superuser.blog/pynq-linux-on-zedboard/
官方文档:
https://pynq.readthedocs.io/en/latest/pynq_sd_card.html#retargeting-to-a-different-board
Minized移植参考:
https://github.com/ticktronaut/PYNQ
UltraZed移植参考:
https://github.com/tchoyt/pynq_dev
Pynq部分补充教程
HLS filter example:
https://github.com/drichmond/PYNQ-HLS/blob/master/tutorial/notebooks/stream/0-How-To-HLS.ipynb
Custom HLS adder IP:
http://www.fpgadeveloper.com/2018/03/create-a-custom-pynq-overlay-for-pynq-z1.html
Accelerate FIR software function:
http://www.fpgadeveloper.com/2018/03/how-to-accelerate-a-python-function-with-pynq.html
Add existing IP to a PYNQ overlay:
https://www.youtube.com/watch?v=UBsCNPWudww
Control custom IP using GPIO:
https://www.youtube.com/watch?v=LomArt-hi4M
the source code:updating.