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.3.tar.gz
.
File metadata
- Download URL: pyripherals-0.0.3.tar.gz
- Upload date:
- Size: 60.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0355d63ab662c288e8c09468e160601bcb17805e9454efafddbdba7a081dc407 |
|
MD5 | d449cce03542651d7fc020864d8e43ee |
|
BLAKE2b-256 | 08da249cdb61771022c709126ebb5add45e207d53e195b04a7855983a790430d |
File details
Details for the file pyripherals-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: pyripherals-0.0.3-py3-none-any.whl
- Upload date:
- Size: 68.2 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 | 8d8f2dbc3d702570450e105d4ad9965e062c5f0f500bd97addaa1861a0c99225 |
|
MD5 | 26c926a051393004a82faa3c2f9328ec |
|
BLAKE2b-256 | 8c4353d46c56e081227abbc7687693e7e52f81698ca448714d49a9f86694f6a0 |