Skip to main content

Real-Time 1 MSPS PYNQ Oscilloscope

Python Package License: MIT Hardware Overlay Board Support

A high-performance, interactive, dark-mode real-time Oscilloscope software stack running natively on PYNQ Linux platforms.

Combines high-speed FPGA data acquisition (1 MSPS XADC streaming via AXI DMA) with an active analog wave generator (Digilent Analog Discovery 3 via pydwf) into an interactive Plotly + IPywidgets dashboard.


🏛 System Architecture

This software repository operates as a lightweight client. It automatically fetches its compiled hardware overlay binaries (pynq_z2.bit and pynq_z2.hwh) from the pinned release v1.0.2 of the hw-xadc-dma-overlays repository.

 [ Analog Discovery 3 (W1) ] ──(Analog Jumper Wire)──> [ PYNQ-Z2 Header (A0) ]
              │                                                     │
        (pydwf SDK)                                           (AXI DMA 1 MSPS)
              │                                                     │
              ▼                                                     ▼
 [ AD3SignalGenerator ] <──(pynq_oscilloscope)──> [ StreamingXADC DMA Driver ]
                                      │
                                      ▼
                        [ OscilloscopeDashboard ]
                 (Interactive Dark-Mode Plotly UI Canvas)

🔌 Hardware Setup & Prerequisites

Before running the application, make sure your hardware is connected according to these physical specifications:

  1. USB Port Connection:
    • Plug the Analog Discovery 3 USB cable into the large rectangular USB HOST port on the PYNQ-Z2 board (next to the Ethernet port).
  2. USB Cable Quality:
    • Use a high-quality Data + Power USB-C cable. Standard charging-only cables omit data lines.
  3. Power Supply:
    • Power the AD3 with an external 5V auxiliary power supply to prevent board brownouts under load.
  4. Signal Wire:
    • Connect a jumper wire from Wavegen 1 (W1) on the AD3 to Analog Input A0 on the PYNQ-Z2 shield header. Connect AD3 GND to PYNQ GND.

🚀 Quick Start & Installation

1. Clone & Install Python Package

Connect to your PYNQ board via SSH or Jupyter Terminal and run:

git clone https://github.com/SiririComun/sw-pynq-oscilloscope.git
cd sw-pynq-oscilloscope
pip install -e .

2. Copy Example Notebooks to Jupyter Workspace

To copy this project's notebooks into a dedicated subfolder (/home/xilinx/jupyter_notebooks/pynq_oscilloscope/) without touching other installed PYNQ packages, run:

pynq-oscilloscope-get-notebooks

Alternatively, inside a Python or Jupyter session:

from pynq_oscilloscope import copy_notebooks

copy_notebooks()

3. Install Digilent AD3 Drivers

Run the automated environment checker inside Python or Jupyter:

from pynq_oscilloscope import install_ad3_drivers

# Automatically downloads Digilent Adept + WaveForms .deb packages and sets USB permissions
install_ad3_drivers()

For manual driver installation or troubleshooting, refer to docs/AD3_SETUP.md.


📓 Notebook Suite

This repository includes three progressive interactive notebooks inside the notebooks/ directory:

Notebook Description Key Modules Used
01_ad3_getting_started.ipynb Verifies Digilent drivers and generates analog signals (Sine, Square, Triangle) in a background thread. AD3SignalGenerator, check_usb_permissions
02_xadc_getting_started.ipynb Automatically fetches v1.0.2 overlay and captures 1 MSPS analog streams direct to DDR memory. HardwareLoader, StreamingXADC
03_oscilloscope_dashboard.ipynb Main Application: Deploys the complete interactive closed-loop Plotly Oscilloscope with triggers and auto-ranging. OscilloscopeDashboard

💻 Python Package Usage Example

You can deploy the complete Oscilloscope Dashboard in just 3 lines of Python code:

from pynq_oscilloscope import HardwareLoader, OscilloscopeDashboard

# 1. Fetch board overlay (v1.0.2) from GitHub Releases
overlay = HardwareLoader.load_overlay()

# 2. Instantiate and render interactive Oscilloscope
app = OscilloscopeDashboard(overlay=overlay)
app.display()

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for pynq-oscilloscope 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pynq-oscilloscope 1.0.0
File Size Uploaded
pynq_oscilloscope-1.0.0.tar.gz 16.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pynq-oscilloscope 1.0.0
File Interpreter ABI Platform
pynq_oscilloscope-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 36.1 kB

Release files / pynq_oscilloscope-1.0.0.tar.gz

Download URL pynq_oscilloscope-1.0.0.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7f07176b4f684e46bfab8cda2afe2686fd87bf34accd9c9dfa0fa1611ad40fd1
BLAKE2b-256 checksum
How to use checksums
b49a125dcb3d498b245a671345217dd2dccae8c8629249d73a5110df0f844413
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Release files / pynq_oscilloscope-1.0.0-py3-none-any.whl

Download URL pynq_oscilloscope-1.0.0-py3-none-any.whl
Size 19.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
09a4f828cc7857cad01c4d586455647e51b7e043d1d655c468d75ea5797bfcbe
BLAKE2b-256 checksum
How to use checksums
5384c7295107f06a809b7948fc9cd6194a0ae4a74ef58009223357fe6405e3b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Release history Release notifications | RSS feed

1.6.0

2 release files

1.5.0

2 release files

1.4.5

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page