A small python VME integration, that uses an exposed cpp vme library to interact with a FPGA and can act as a user<->server system
Project description
pyVME
This package uses exposed cpp functions using pybind11 to use the VMEbus (Versa Module Eurocard-bus) to interact with FPGAs.
The shared object used for this was compiled on a 64bit Linux machine and supports no other platforms.
It is intended for the use at ELSA (University of Bonn) and can be used for many elegant implementations of different tools.
The main functionality comes from a shared object (.so) that ships as a binary blob within this package.
Table of Contents
Requierements:
This package needs to be run on a Linux 64bit machine with python >= 3.9 installed
Installation
This package is available via pypi and can be simply installed by running:
pip install pyVME
Features
After installation (e.g. pip install pyVME) you can import this package into your projects via import pyVME.
This gives you access to the three classes that come within this package, returns ```
pyVME.fpga(baseaddr): Allows you to instantiate one FPGA that is directly connected to the CPU your python program is running onpyVME.server(int server_port): Allows you to run a server on a remote machine that is connected with one or more FPGAs. It will instantiate for each FPGA defined by the client a new instance.pyVME.remoteFPGA(int baseaddr, string server_ip, int server_port): Allows you to connect to a running server and call functions of the remote FPGA instances.
Every class has the same set of functions that act differently in the background without the user having to change anything.
Functions
The following functions are supported:
readRegisters(int register), returnsstrwriteRegisters(int register, int value), returnsstrload_fpga(string file_path), returnsboolload_fpga_xml(string file_path), returnsboolload_fpga_if_new(string file_path), returnsboolload_fpga_if_new_xml(string file_path), returnsboolload_fpga_from_flash(string file_path), returnsboolasync_load_fpga_from_flash(string file_path), returnsstrswap_bits(int inputbits), returnsstrgetBaseaddress(), returnsintgetModulePCIBaseAdress(), returnsintgetBoardID(), returnsintgetBoardType(), returnsintgetFirmwareVersion(), returnsintgetFirmwareType(), returnsintgetInterfaceVersion(), returnsintgetMezzanineType()s, returnsintgetFPGADone(), returnsintwait_on_fpga_done(), returnsstr
Examples
Server:
import pyVME as vme
server = vme.server(port=5555)
server.run()
remote FPGA:
import pyVME as vme
fpga = vme.remoteFPGA(baseaddr=0xAB000000, server_ip='remote_ip/domain', server_port=5555)
local FPGA:
import pyVME as vme
fpga = vme.fpga(baseaddr=0xAB000000)
Source Code
This project is only partially open source because it comes with a binary blob in form of a shared object (the source code for the .so is accessable for members of the HISKP only on the HISKP Gitlab).
The source code can be found at pyVME.
Building from source
To build this package you need to have the build package installed:
pip install build
No other packages are requiered. You can simply build this package by running:
python3 -m build
in the root directory of this repository.
It will automatically generate a distfolder with the contents pyVME-X.X.X-py3-none-any.whl and pyVME-X.X.X.tar.gz.
You can install the build package by running
pip install ./dist/pyVME-X.X.X-py3-none-any.whl
or
pip install ./dist/pyVME-X.X.X.tar.gz
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyVME-1.0.2.tar.gz.
File metadata
- Download URL: pyVME-1.0.2.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a62cb73ad5fb456363ed803c60052f2c0f4c175580ee8f5dd9d001a52dd9721
|
|
| MD5 |
4a486153bff24248a2ebd69676b478ed
|
|
| BLAKE2b-256 |
b8763bace93f13228416d34d8d7500e033ccb211eb8d61fe52f5af139ff0de82
|
File details
Details for the file pyVME-1.0.2-py3-none-any.whl.
File metadata
- Download URL: pyVME-1.0.2-py3-none-any.whl
- Upload date:
- Size: 2.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
748bf715a6a2a43b9ed61f7a04cc1c71a10b9d0b99d857360f9cf39b13c31103
|
|
| MD5 |
f750900d0e7e6a4819a3120b99470f26
|
|
| BLAKE2b-256 |
3468f55785c9d07233da5a3504f4448444fddb25e5669a6eb0a8cbf859156ec0
|