How weng20011103/zcu102_pynq works
This repository is not one application; it is a ZCU102 PYNQ course kit. The architecture is a set of independent lesson projects that all use the same board/platform stack: ZCU102, Vivado 2020.2, and PYNQ v2.7.
The core system boundary is the classic Zynq split:
• Processing System (PS): ARM side running PYNQ/Python notebooks and scripts.
• Programmable Logic (PL): FPGA fabric containing RTL, AXI IP, clocking, DMA, and custom logic.
Most lessons demonstrate how the PS controls the PL through PYNQ abstractions such as GPIO, MMIO, and overlay loading. The notebooks are the user-facing control layer; the bitstreams, .hwh/.overlay metadata, and Vivado projects define the hardware layer.
The repo is organized by lesson, and each lesson is effectively a self-contained mini-architecture:
• Lesson 1–3: simplest GPIO-to-LED path, moving from direct GPIO use to XDC pin binding and then PYNQ bitstream loading.
• Lesson 4: PS-controlled GPIO driving an external DAC, showing board-level peripheral control.
• Lesson 5: clock generation and PS/bitstream constraints, including a frequency-divider RTL block and Clocking Wizard usage.
• Lesson 6: DMA-based data movement, focusing on streaming data between PS memory and PL logic.
• Lesson 7: HLS-generated IP integrated into a PYNQ workflow.
• Lesson 8: a custom AXI4-Lite IP block, showing register-mapped control logic.
• Lesson 9: Vivado TCL automation for reproducible hardware builds.
• Lesson 10: direct PYNQ MMIO access to registers, emphasizing low-level software control of PL hardware.
The dataflow patterns repeat across lessons and are important for a diagram:
• Notebook/script → PYNQ runtime on PS → AXI-Lite/MMIO/GPIO → PL registers or simple logic.
• Notebook/script → DMA buffers in memory → AXI DMA / AXI-Stream path → PL accelerator or FIFO.
• Vivado-generated hardware → bitstream + hardware handoff metadata → loaded by PYNQ as an overlay.
Hardware integration is expressed through constraints and pin mapping files:
• .xdc files bind FPGA signals to ZCU102 LEDs, DAC pins, PMOD headers, clocks, etc.
• RTL files (.v) define small blocks like LED logic, clock dividers, or AXI peripherals.
• HLS/IP artifacts and overlay descriptors connect higher-level generated IP to the same AXI infrastructure.
The supporting material is mostly instructional evidence rather than runtime code:
• Jupyter notebooks demonstrate PS-side control and testing.
• CSVs and plotting scripts capture scope measurements and validation data.
• Pictures and PDFs document expected waveforms, hardware behavior, and design notes.
• TCL scripts show automation for Vivado project creation or IP integration.
The main architectural diagram for this repo should therefore center on one ZCU102 board split into PS and PL, with multiple lesson-specific hardware blocks attached to the PL and multiple Python/Jupyter control paths on the PS. There is no single backend service or monolithic app; the repo is a catalog of hardware/software interaction patterns for FPGA development with PYNQ.
Main entry points: hwh Overlay Load · lesson5_clocking_wizard_and_ps Clocking · PYNQ PYNQ v2.7 · lesson1_LED_kirakira_gpio GPIO LED
Components 18
ZCU102 Platform
Board and toolchain baseline shared by all lessons
- ZCU102 · Shared hardware target for every lesson
- Vivado 2020.2 · Hardware design and implementation environment
PS Side
Python and notebook control running on the ARM processing system
- PYNQ v2.7 · PS runtime used to load overlays and access PL resources
PYNQ - Notebooks · User-facing Python/Jupyter control layer across lessons
- MMIO/GPIO · Low-level register and pin access from Python
- Overlay Load · Loads bitstreams and hardware metadata onto the board
PYNQ/hwh
PL Side
FPGA fabric, RTL, IP, clocks, and interfaces
- GPIO LED · Lessons 1-3: basic LED control and pin binding
lesson1_LED_kirakira_gpio - DAC Control · Lesson 4: PS-driven external DAC control
lesson4_dac_control_by_pynq - Clocking · Lesson 5: clock generation and frequency division
lesson5_clocking_wizard_and_ps - DMA Stream · Lesson 6: memory-to-stream data movement
lesson6_dma_demo - HLS IP · Lesson 7: HLS-generated IP integrated through PYNQ
lesson7_hls_demo - AXI4-Lite IP · Lesson 8: register-mapped custom logic block
lesson8_axi_lite_custom_ip - TCL Automation · Lesson 9: scripted Vivado project and IP setup
lesson9_vivado_tcl - PL Registers · Lesson 10: direct register access from PYNQ
lesson10_pynq_mmio - RTL Blocks · Small modules such as LED logic and frequency dividers
lesson2_LED_kirakira_xdc/led.v - XDC Constraints · Board pin and interface binding for LEDs, DAC, PMOD, and clocks
XDC/ZCU102_GPIO_LED
Support Material
Measurements, notes, and build documentation
- Scope Data · CSV traces and plotting scripts used to verify hardware behavior
lesson4_dac_control_by_pynq/data - Lesson Docs · Readmes, PDFs, and notes documenting each lesson workflow
README.md
Connections 24
- ZCU102 → PYNQ v2.7: runs · Board hosts the PYNQ image and runtime
- ZCU102 → Vivado 2020.2: targeted by · Vivado produces hardware for the board
- Notebooks → PYNQ v2.7: uses · Python notebooks execute through the PYNQ runtime
- PYNQ v2.7 → Overlay Load: loads · Overlay flow brings hardware metadata and bitstreams onto the PS
- Overlay Load → GPIO LED: configures · Loads the lesson-specific hardware for GPIO and LEDs
- Overlay Load → DAC Control: configures · Loads DAC control hardware and metadata
- Overlay Load → Clocking: configures · Loads clocking-related hardware
- Overlay Load → DMA Stream: configures · Loads DMA-based design overlays
- Overlay Load → HLS IP: configures · Loads HLS-generated accelerator designs
- Overlay Load → AXI4-Lite IP: configures · Loads custom AXI4-Lite peripherals
- Overlay Load → PL Registers: exposes · Makes register maps available for direct access
- Notebooks → MMIO/GPIO: controls · Notebook code drives pins and registers on the PS side
- MMIO/GPIO → GPIO LED: drives · Direct GPIO path to LEDs and simple peripherals
- MMIO/GPIO → DAC Control: drives · PS-side control of external DAC signals
- MMIO/GPIO → PL Registers: reads/writes · Direct memory-mapped access to PL registers
- GPIO LED → XDC Constraints: binds via · LED and header pins are fixed through XDC files
- DAC Control → XDC Constraints: binds via · DAC interface is mapped through board constraints
- Clocking → RTL Blocks: implements · Frequency divider and related RTL logic
- Clocking → XDC Constraints: binds via · Clock pins and generated outputs are constrained
- DMA Stream → HLS IP: streams to · DMA moves data between memory and accelerator logic
- HLS IP → AXI4-Lite IP: integrates with · Generated IP and custom peripherals share the AXI infrastructure
- AXI4-Lite IP → PL Registers: exposes · Registers are accessed through MMIO semantics
- TCL Automation → Vivado 2020.2: automates · Scripts create and configure Vivado projects
- Scope Data → Lesson Docs: supports · Plots, traces, and notes validate the lessons