Metadata-Version: 2.4
Name: finn-plus-driver
Version: 1.5.0
Summary: PYNQ runtime driver for FPGA accelerators generated by finn-plus
Maintainer: Felix Jentzsch
Maintainer-email: felix.jentzsch@upb.de
Requires-Python: >=3.10
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: bitstring (>=4.0)
Requires-Dist: click (>=8.0)
Requires-Dist: finn-dataset-loading (>=0.0.5)
Requires-Dist: grpcio (==1.64.0)
Requires-Dist: h5py (>=3.0)
Requires-Dist: matplotlib (>=3.4)
Requires-Dist: numpy (>=1.21,<2.0.0)
Requires-Dist: pillow (>=9.0)
Requires-Dist: qonnx (>=1.0.0)
Project-URL: EKI Project, https://www.eki-project.tech/
Project-URL: GitHub, https://github.com/eki-project/finn-plus
Description-Content-Type: text/markdown

# finn-plus-driver

Runtime driver for FPGA accelerators generated by
[finn-plus](https://github.com/eki-project/finn-plus) and deployed to ZYNQ/PYNQ boards.

This package contains everything needed to *run* a FINN-generated accelerator and nothing
of the compiler itself. It is installed on the board, while the accelerator-specific
artifacts (bitfile, `settings.json`, runtime weights) are produced by the finn-plus build
flow and copied to the board separately.

## Installation

On a PYNQ board, inside the PYNQ virtual environment:

```bash
sudo pip install finn-plus-driver
```

`pynq` itself is not declared as a dependency: it is part of the board image.

To install the version matching a repository checkout (e.g. in CI):

```bash
sudo pip install ./driver
```

## Usage

The driver is usually invoked through its CLI, which instantiates the driver class named in
`settings.json` and calls one of its member functions:

```bash
finn-plus-driver -b bitfile/finn-accel.bit -s driver/settings.json -f throughput_test
```

It can equally be used as a library:

```python
from finn_plus_driver import FINNDMAOverlay

accel = FINNDMAOverlay("finn-accel.bit", io_shape_dict=io_shape_dict)
output = accel.execute(input_array)
```

## Contents

| Module | Purpose |
| --- | --- |
| `finn_plus_driver.overlays.dma` | `FINNDMAOverlay`, the standard DMA-based accelerator driver |
| `finn_plus_driver.overlays.instrumentation` | `FINNInstrumentationOverlay`, DMA-less instrumentation runs |
| `finn_plus_driver.overlays.live_fifo` | `FINNLiveFIFOOverlay`, live FIFO sizing experiments |
| `finn_plus_driver.overlays.dma_instrumentation` | `FINNDMAInstrumentationOverlay`, combined DMA + instrumentation |
| `finn_plus_driver.packing` | Data packing/unpacking between numpy and the accelerator's bit-level format |
| `finn_plus_driver.validate` | Dataset-specific accuracy validation (MNIST, CIFAR, ImageNet, RadioML, UNSW-NB15) |
| `finn_plus_driver.cli` | Command line interface |

