Train a small machine-learning model, prepare it for a Microchip PolarFire FPGA, and compare the board's answers with a simulator's answers. An FPGA is a chip with configurable circuitry.
The pfkit command-line tool runs the steps. The included agent skills guide
an AI coding assistant through the same workflow and help it report what
was actually tested.
Train → Convert → Check compatibility → Compile → Simulate → Run on the board → Compare
Start with an example on your computer. Board deployment targets the PolarFire SoC Icicle Kit (MPFS250T), with the CoreVectorBlox V250 accelerator. The documented adapters define model support.
These are recorded results for the supported setup, as of 2026-10-13.
| Check | Recorded result |
|---|---|
| Local setup and inspection | Passed on Linux aarch64 and Apple silicon macOS. |
signal-freq and odmr-mlp on the board |
Each completed 64 test inputs. Integer outputs matched the simulator exactly, reported as 0 LSB difference. |
odmr-fcnn on the board |
On 2026-10-13, all 64 inputs completed on both images with NPU error 0. Hardware parity: kit = simulator = INT8 TFLite, 0 LSB. Conversion accuracy: the largest per-sample float-to-INT8 prediction difference was 29.8 µT against a 5.0 µT tolerance. One of 64 samples exceeded it; the mean difference was 2.39 µT. The difference measures float-to-INT8 conversion, not ground-truth error. Overall result: failed. See evidence/2026-10-13-kit-built-image/README.md. |
| Assistant-guided board run | Claude Code completed one full signal-freq run. |
| Toolkit's FPGA build | Built and met timing. On 2026-10-13, the kit-built image was programmed and tested on the kit. Both 64-sample examples passed; their outputs were byte-identical to the case-study-image runs. See evidence/2026-10-13-kit-built-image/README.md. |
The mlp adapter has passing board examples. The conv2d_1k
model had exact hardware parity on both images. Its float-to-INT8 conversion
missed tolerance, so it failed (evidence/2026-10-13-kit-built-image/README.md).
See the validation record, 64-input board results, and release notes for test details.
| What you want to do | Start here |
|---|---|
| Try an example without an FPGA | First local run |
| Ask an AI assistant to guide you | Use an AI coding assistant |
| Run a model on an Icicle Kit | Continue to the board |
| Adapt your own model | Supported model types and data and result formats |
This example generates signal data, trains a small model, converts it to 8-bit integer TFLite, and checks its compatibility with the supported toolchain. The local run ends at compatibility inspection.
You need:
- Python 3.11, including
venvand pip. - Git,
make, and internet access to download packages and source dependencies. - A supported computer: the full local example has been tested on Linux aarch64 and Apple silicon macOS. See the platform details.
You do not need an FPGA, an AI subscription, or an installed Microchip compiler for this first run.
Choose a new folder for the checkout, then run these commands in a terminal:
KIT_ROOT="$HOME/polarfire-agent-skills" git clone https://github.com/jasonphillip/polarfire-agent-skills.git "$KIT_ROOT" make -C "$KIT_ROOT" env "$KIT_ROOT/.venv/bin/python" -m pfkit example run signal-freq \ --until inspect \ --run-dir "$KIT_ROOT/reports/signal-inspect"
Already have a checkout? Set KIT_ROOT to its full path and skip git clone.
For another run, choose a new, empty --run-dir.
make env creates an isolated Python environment in .venv. It installs
the Python dependencies and fetches the pinned source repositories. These
include VectorBlox SDK source for the compatibility table; this does not
install the vendor compiler on your computer.
The command finishes without an error and prints an inspection result with
"blocking_flags": []. Open reports/signal-inspect/ inside your checkout:
| File | What it tells you |
|---|---|
model.tflite |
The converted model, ready for the next stage. |
eval.json |
How the trained model performed on the test data. |
inspect.json |
Compatibility checks and any blocking findings. |
See the step-by-step guide and troubleshooting for more help.
| Example | Task | Start with it when… |
|---|---|---|
signal-freq |
Estimate the frequency of a generated signal. | You want the simplest first run. |
odmr-mlp |
Estimate a magnetic field from simulated quantum-sensing data. | You want to follow the original sensing case study. |
odmr-fcnn |
Run the case study's ODMR FCNN on the odmr-mlp data. |
The board result above records hardware parity and conversion accuracy. See evidence/2026-10-13-kit-built-image/README.md. |
All use generated data. The ODMR examples also need Tk when using Homebrew Python 3.11 on macOS; see installation requirements.
The assistant follows the included instructions and runs pfkit commands.
You still need the environment above and, for remote stages, access to your
tools computer and board.
For Claude Code, load the checkout you prepared above:
claude --plugin-dir "$KIT_ROOT"Then ask:
Use the polarfire-bringup agent instructions to run signal-freq through
inspect. Use a new run directory. Explain the result and show the saved files.
The installation guide covers marketplace installation,
Codex instructions, and client test records. Claude Code has a recorded full
signal-freq board run. Codex has a recorded local inspection run.
The later stages use three machine roles:
| Machine | Its job |
|---|---|
| Your computer | Prepare data, train and convert models, run commands, and read reports. |
| Tools computer | Run the Microchip compiler and VectorBlox simulator. |
| Icicle Kit | Run the compiled model on its V250 accelerator. |
The tested tools computer uses Libero SoC 2025.2 and SmartHLS 2025.2 on x86 Windows, with VectorBlox SDK 2.0.3 in WSL Ubuntu. The board runs Linux with CoreVectorBlox IP 2.0.1 at V250. See the supported setup for exact requirements.
Configure your connections using the pipeline guide.
Build the hw/vbx_run board program and prepare the board using the
hardware guide. Building an FPGA image and programming
the board are separate steps.
Once that setup is ready, the documented example route can run 64 selected test inputs through compilation, simulation, board inference, and comparison. Use the full-run instructions to check the saved results. Optional PID control and watchdog integration are separate from basic inference.
- Model adapters: supported layers and how to add an adapter.
- Data and result formats: input bytes, run identity, and comparison status.
- Compatibility findings: measured compiler and simulator limitations.
- Agent instructions: workflow guidance for coding assistants.
This toolkit integrates the VectorBlox workflow for PolarFire and records evidence at each stage. It builds on the Tychon quantum-sensing case study. Related work includes FINN's end-to-end flow, FINN's verification methods, and the hls4ml Libero contribution.
Copyright 2026 Jason Phillip, Tychon AI. Licensed under Apache-2.0. Microchip tools, Linux images, and precompiled VNNX models are not bundled. See dependency licenses for the source dependencies and their terms.