Python solution for communicating with peripheral ICs
Project description
pyripherals
is a Python package for communicating with peripheral electronic devices. It has a Register
class to keep track of internal registers, but is most useful when used with a FrontPanel compatible Opal Kelly FPGA. With that, pyripherals
makes use of the FrontPanel API for Python and Verilog to communicate more easily on common interfaces such as I2C and SPI.
Quick Start
- Install with pip
Note that not all of pyripherals
will work with Python 3.10
pip install pyripherals
To use an FPGA and peripherals:
-
Download FrontPanel from OpalKelly
-
Download Registers.xlsx from the GitHub
-
Create config.yaml with create_yaml and edit fields as needed
>>> from interfaces.utils import create_yaml
>>> create_yaml()
YAML created at C:/Users/username/.pyripherals
See Installation Guide for more information.
Documentation
Documentation is hosted on Read the Docs.
Acknowledgements
The FPGA code is dervied from many open-source contributions.
-
The Verilog I2C controller is from OpalKelly OpalKelly I2CController (MIT License).
-
The Verilog AD7961 controller is from Analog Devices and is free to use / redistribute as long as its used with Analog Devices parts (which must be the case since it does not work if connected to other parts). The Verilog is available within the EVAL-AD7960 evaluation kit software
-
The Verilog SPI Controller is from OpenCores.org and is authored by Simon Srot (GPL 2.1 or later license).
-
The Verilog wishbone master is written by Dan Gisselquist, Gisselquist Technology LLC. (LGPL, v3)
-
The DDR user interface (ddr_test.v) started with the OpalKelly DDR example provided in the FrontPanel example RAMTester and was significantly modified to support two ports.
The Python code relies on wonderful open source packages such as:
- numpy
- numfi
- matplotlib
- pandas
- openpyxl
- h5py
- pyyaml
- scipy
OpalKelly Module Compatibility.
We have targeted and tested with the XEM7310-A75 module (Xilinx Artix-7). We have not tested but anticipate reasonable portability to other USB 3 OpalKelly modules:
- XEM7310MT
- XEM7320
- XEM7305
- XEM7360
(Approximate) FPGA Block Diagram
This is the block diagram of the top_level_module.bit bitfile
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyripherals-0.0.2.tar.gz
.
File metadata
- Download URL: pyripherals-0.0.2.tar.gz
- Upload date:
- Size: 59.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e48619f325813683255c0c0989e8f1c58e365165a8c6439b3f77982c3036005 |
|
MD5 | 42ee3f3bb4ed8deebdd818189068273d |
|
BLAKE2b-256 | b9b240c40f5cb8c8f4dab4234389a0610ceacdf0536145fc60016d2348c2d6a8 |
File details
Details for the file pyripherals-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: pyripherals-0.0.2-py3-none-any.whl
- Upload date:
- Size: 66.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6a62f5ef9c2c0bea62457bf3d57e3df5bb2dfba77954fb0079430ccffdf3f88 |
|
MD5 | 20f63af645a1fdcb3f50ddf90732f55f |
|
BLAKE2b-256 | 147f458035508029681fd119656599b7700fca6913bcfaa3d58d9c86338d5d67 |