FPGA Design from Scratch · Zynq & PYNQ

Part VII: Hardware Meets Software

The Zynq system-on-chip, the AXI bus, a custom peripheral with registers, and finally Python in a Jupyter notebook driving your own hardware accelerator.

Two halves of one chip

The Zynq on the PYNQ-Z2 is a processor and an FPGA on the same die. The processing system (PS) is a dual-core ARM Cortex-A9 with its DDR memory controller and standard peripherals; it boots Linux and runs Python. The programmable logic (PL) is the fabric you have been designing for since Part II. The two meet at a set of AXI ports: the ARM reaches your registers through the general-purpose (GP) master ports, and your hardware reaches DDR memory through the high-performance (HP) slave ports.

PSARM Cortex-A9 × 2650 MHz · Linux · PythonDDR controller512 MB DDR3peripheralsUSB-UART, Ethernet, SD cardM_AXI_GP0S_AXI_HP0control (AXI-Lite)bulk data (AXI4)PLyour AXI-Lite IPregisters · Ch. 20AXI DMAmemory ⇄ stream · Ch. 21your acceleratorAXI-Stream · Ch. 22stream
The Zynq-7000 seen from Part VII. Control flows from the ARM over M_AXI_GP0 to your AXI-Lite peripheral (Chapter 20); bulk data flows between DDR and your stream IP through S_AXI_HP0 and an AXI DMA (Chapters 21 and 22).

Chapter 19 explains the AXI protocol and its valid/ready handshake. Chapter 20 builds a register-mapped peripheral from scratch. Chapter 21 drives it, and DMA transfers, from a Jupyter notebook with PYNQ. Chapter 22 ends the course with a streaming accelerator and an honest measurement of when hardware beats software — and when it does not.

Chapters in Part VII

Share:XRedditLinkedIn