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)
Metadata
Release files for pyPCIe 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pypcie-0.1.2.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pypcie-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.5 kB
Release files / pypcie-0.1.2.tar.gz
| Download URL | pypcie-0.1.2.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7c6294ef403bc844f9601a4264a62b51a0710f072169ce0d982d5140a65c00a0
|
|
BLAKE2b-256 checksum How to use checksums |
d3202f7d834e6ad7f6a07024ed5f9cb3ff9b6c4340eedf8e0fe9924180a3fcc8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / pypcie-0.1.2-py3-none-any.whl
| Download URL | pypcie-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c728bc664110d017ed59047c4c0e85619cecc420e298ab840a04377d16dede15
|
|
BLAKE2b-256 checksum How to use checksums |
b2abc15b45e2921102d3a17d27d33769653ac963eb4da9dd3d38a7a8b12138fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|