Skip to content

plysaght/rfsoc_sam

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spectrum Analyser on PYNQ & ZCU111

This repository is compatible with PYNQ image v2.5 for ZCU111.

Alongside the hardware files and Python overlay, two notebooks are included: the first (RFSoC Spectrum Analyser.ipynb) is an explanatory notebook which provides detailed information on the hardware design and Python overlay as well as how these interact. The second notebook (RFSoC Spectrum Analyser-Voila.ipynb) is used to launch the Voila dashboard.

Voila is a tool which transforms Jupyter Notebooks into standalone web applications, making it much easier to control and visualise the Spectrum Analyser without having to scroll up and down a notebook repeatedly.

Currently, this project is in Beta Release. We are working on improving aspects of the hardware design and increasing functionality/programability of the Python overlay.

Key Features

  • Up to 256 MHz bandwidth for inspection
  • Inspect range 0 - 1.024 GHz
  • 3 available ADCs to select from at runtime
  • Adaptive bandwidth control and center frequency selection
  • Reprogrammable windowing
  • Hardware accelerated processing (time domain → frequency domain → power spectrum [dBm/Hz])
  • PYNQ abstracted allowing Python to interface with the hardware
  • Plotly visualisation of spectrum and spectrogram (waterfall)
  • Voila dashboard for more convenient control/visualisation

Quick Start

Open a terminal in Jupyter Lab and run:

pip3 install git+https://github.com/strath-sdr/rfsoc_sam.git

First Time Setup (~40 mins)

Required Hardware

  • Laptop/Computer
  • ZCU111 + breakout card
  • power cable
  • micro usb to usb cable
  • micro SD card
  • ethernet cable
  • one/two antennae (if using)
  • loopback cable
  • ethernet usb adapter (if required)
  • usb wifi dongle (if not doing shared internet over ethernet)

Required Software (host)

  • Web browser (chrome)

Board Setup

One DAC and three ADCs are made available in this design. The table below details how the notebooks will refer to these ADCs and which tile/channel they correspond to. The image illustrates where the SMA connections for the data converters in use are located on the board itself.

Converter Tile Channel Colour
DAC 1 2 Red
ADC0 0 0 Blue
ADC1 0 1 Purple
ADC2 1 0 Orange

If using the loopback cable, ensure it is connected between the DAC and one of the three available ADCs (the image below shows it connected to ADC0). Connect antennae to the remaining ADCs if desired.

Configure PYNQ Image

Obtain a PYNQ 2.5 image

Install Voila and the gridstack template on the ZCU111, then upgrade Jupyter.

Open a terminal in Jupyter Lab and run the following:

pip3 install voila
pip3 install voila-gridstack
pip3 install --upgrade jupyter 

Clone this repository to the board using pip:

pip3 install git+https://github.com/strath-sdr/rfsoc_sam.git

The bitstream was created using Vivado 2019.1 so this throws up some errors on the current 2.5 image.

To fix this edit the file "/usr/local/lib/python3.6/dist-packages/xrfdc/config.py" on the board.

Comment out lines 46,47,60,90,91. These relate to:

_DAC_DDP: FifoEnable, AdderEnable

_ADC_DDP: FifoEnable

Config: MasterADCTile, MasterDACTile

Running the Spectrum Analyser Dashboard

To generate the voila dashboard from the notebook (in JupyterLab terminal):

voila --template=gridstack jupyter_notebooks/spectrum_analyser/RFSoC\ Spectrum\ Analyser-Voila.ipynb --theme=dark

Open a new browser tab or window and go to the address output in the terminal, usually "http://localhost:8866/" - where localhost is the IP of the board.

It will take a minute or so to load as it has to run all the cells including loading the bitstream. The scaling of the dashboard will depend on the screen resolution/aspect ratio. It should scale on the horizontal but you may need to tinker with the vertical by adjusting the zoom on the browser and refreshing the page so the plotly plots re-adjust.

Note: If you desire more control over the layout of the dashboard, you can edit the cell metadata in the dashboard notebook.

To restart the dashboard, shutdown the terminal in which the Voila command was run and open a new terminal. Re-run the Voila command.

License

BSD 3-Clause

About

RFSoC Spectrum Analyser Module on PYNQ

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 82.2%
  • Jupyter Notebook 17.8%