Simple Python module to access PCIe devices
Project description
pyPCIe: Simple Python Module to access PCIe Endpoint BARs
pyPCIe provides a quick way to read/write registers in PCIe Base Address Register (BAR) regions.
pyPCIe mmaps PCIe device BARs via the resourceX files in
/sys/bus/pci/devices/[bus_id] for read/write and provides functions
for 32 bit read/write requests.
Note: the resourceX files in sysfs are typically only accessible as
root. The python scripts using pyPCIe might need to be run as root.
Example
from pypcie import Device
# Bind to PCI device at "0000:03:00.0"
d = Device("0000:03:00.0")
# Access BAR 0
bar = d.bar[0]
# write 0xdeadbeef to BAR 0, offset 0x1000
bar.write(0x1000, 0xdeadbeef)
# read BAR 0, offset 0x1004
ret = bar.read(0x1004)
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 pypcie-0.1.2.tar.gz.
File metadata
- Download URL: pypcie-0.1.2.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c6294ef403bc844f9601a4264a62b51a0710f072169ce0d982d5140a65c00a0
|
|
| MD5 |
b8731d923b04d4905d0ff5dd27d3eb00
|
|
| BLAKE2b-256 |
d3202f7d834e6ad7f6a07024ed5f9cb3ff9b6c4340eedf8e0fe9924180a3fcc8
|
File details
Details for the file pypcie-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pypcie-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c728bc664110d017ed59047c4c0e85619cecc420e298ab840a04377d16dede15
|
|
| MD5 |
1d841e390f87d6f205887320bba4d371
|
|
| BLAKE2b-256 |
b2abc15b45e2921102d3a17d27d33769653ac963eb4da9dd3d38a7a8b12138fb
|