EulerNPU

A tool that makes putting an NPU on FPGA easy — next step: ASIC

Define an NPU in YAML and run it on real FPGA. An inference-first NPU full-stack that validates and synthesizes a small NPU from a single spec and runs it on a Zynq-7000.

3 NPUs validated on a real FPGA (Zynq-7000). With the same compiler, keyword spotting · industrial fault detection · small LLM (FFN-on-NPU) run on a QMTECH XC7Z020 board — real hardware, not simulation.

spec → compile → bitstream → real FPGA, in a single CLI. 138 operators (17 groups), INT4/INT8 quantization, 4 backends (cpu_ref · npu_sim · zynq_ps · zynq_pl_stub), 15 subcommands cover the full cycle in one flow.

3
FPGA-verified NPUs
138
operators (17 groups)
4
backends
15
CLI subcommands

FPGA verification is the pre-stage of ASIC. On Zynq-7000, three NPUs already run on silicon — keyword spotting, industrial fault detection, small LLM inference. The next step is ASIC synthesis from the same EulerNPU compiler output.

Open Source · FPGA-Verified

3 NPUs Running on Real FPGA

Same compiler · same board (QMTECH XC7Z020, Zynq-7000) — three different NPUs synthesized and validated on real hardware

KWS (Keyword Spotting)

DS-CNN + 16-layer GRU + FC quantized to INT8. Full-graph NPU IP (kws_npu_top) synthesized at 90 MHz @ DSP 45% / BRAM 24%.

Accuracy11/11 (CPU↔NPU 100% match)
Speedup8.07× vs CPU (3.17 ms/inference)
Streaming200 frames in 5.166 s · 38.7 inf/s

xsdb 6-stage boot + UART output: 11/11 accuracy, 8.07× speedup, per-keyword confidence.

CWRU Bearing Fault Detection

Vibration FFT → 3×Conv1D + MaxPool + GAP + 2×FC INT8. bearing_npu_top IP at 90 MHz @ DSP 86% / BRAM 12%.

Accuracy40/40 (CPU↔NPU 100% match)
Speedup11.13× vs CPU (~4 ms/inference, 252 inf/s)
Real-time monitor200 windows · 100% recall · 0 false alarms

Demo 1 — Accuracy validation. Per-class classification table over 40 test samples (CPU/NPU cycles, 11.13× speedup).

Demo 2 — Real-time monitor. 200-window stream (fault class, confidence; 100% recall, 0 false alarms).

nanoGPT LLM (FFN-on-NPU)

nanoGPT 10.77M (D=384, 6 layers, TinyShakespeare). Only the FFN (fc1 → gelu → fc2) is offloaded to the NPU; the rest runs on ARM — a hybrid L2 setup that lets an LLM run on XC7Z020.

ValidationCPU↔NPU text 5/5 bit-identical
ResourcesDSP 9% · BRAM 2% · LUT 17% (FFN only)
SignificanceProves partial LLM inference is feasible on a Zynq-7000-class board

Demo 1 — Bit-identical match. 5 prompts × 16 characters generated — verified 5/5 CPU↔NPU text identity.

Demo 2 — Live stream. 50-character ROMEO prompt generation — FFN-on-NPU hybrid live inference.

※ All three projects are real silicon results synthesized directly from the same EulerNPU compiler output (not simulation). Board: QMTECH XC7Z020 CLG484-1 (Zynq-7000), PL clock 90–100 MHz, ARM Cortex-A9 PS. The next step in this same flow is ASIC synthesis.

Proven path

After proving on FPGA, the same flow goes to ASIC

Done · Public
FPGA Verification
KWS · Fault Detection · LLM
Zynq-7000 measured
Long-term
Sovereign NPU
AI inference chip sovereignty
Edge · on-device

Why start with FPGA. Validating the same compiler & spec on a real device before ASIC tape-out lowers cost & risk — EulerNPU supports this entire flow in one CLI toolchain.

Core Features

138 operators, 10 DTypes, from spec.yaml to FPGA inference

138 operators (17 groups, A–Q)

All operations needed for NPU inference organized into 17 groups. Latest architecture coverage including Efficient Attention (FlashAttention · GQA), Vision Encoder, MoE/Sparse, Diffusion, Speculative Decoding.

▶ See all 17 groups
Core MathMatMul, Add, Mul, Div, Sqrt and other basic math ops
ActivationReLU, GELU, SiLU, Sigmoid, Softmax, etc.
NormalizationLayerNorm, RMSNorm, BatchNorm, GroupNorm
Conv/VisionConv2D, DepthwiseConv, Pool, Resize, Patch
Sequence/AttentionScaledDotProduct, MultiHeadAttention, RoPE, ALiBi
Efficient Attention NEWFlashAttention, SlidingWindowAttention, MultiQueryAttention (GQA)
MoE/SparseTopKRouter, ExpertDispatch, LoadBalanceLoss
RecurrentLSTM, GRU, SRU
GraphConcat, Split, Reshape, Transpose, Gather, Scatter
MultimodalCrossAttention, VisionProjection, AudioMel
Vision Encoder NEWPatchEmbed, ClsTokenPrepend, ImageNorm
Diffusion NEWTimestepEmbed, NoiseSample, DDIMStep, CFGScale, FlowMatchStep
Speculative Decoding NEWTokenAcceptance, DraftVerify, PrefixCacheLookup/Store
QuantizationQuantize, Dequantize, FakeQuantize, PackInt4/UnpackInt4
Mamba/SSMSelectiveScan, Discretize, SSMConv
Cache CompressKVCacheCompress, SlidingWindow, H2O
AutonomyPointCloud, BEVProject, TrajectoryPredict

10-DType System

Classified into three tiers by precision and performance requirements.

Tier 0 (required) fp32, int32 — supported by every operator
Tier 1 (recommended) fp16, bf16, int8, uint8 — supported by most operators
Tier 2 (extended) int16, int4, fp8_e4m3, fp8_e5m2 — specific operators

Execution backends (4)

cpu_ref Host NumPy reference (runs instantly, no dependencies)
npu_sim Functional simulation + execution trace + per-operator cycle/MAC/latency estimates
zynq_ps Zynq ARM PS execution
zynq_pl_stub FPGA PL offload analysis/emulation

FPGA board profiles

Zynq-7000 XC7Z020, AXI-Lite MMIO transport
Zynq UltraScale+ ZU3EG, ZU9EG (INT4 / high-performance target)

Design Principles

Deterministic, reproducible, and auditable inference at every step

Declarative Specification

All inference graphs are defined in spec.yaml — human-readable, version-controllable, and diffable. No hidden state or implicit configuration.

Bit-Exact Reproducibility

Simulation results are bit-exact across runs. The same spec.yaml always produces the same .npuart artifact and the same inference outputs.

Hardware-First Validation

Board-smoke tests verify hardware compatibility before deployment. Calibration and profiling ensure real-world performance matches simulation.

Compilation Pipeline

A 4-stage pipeline from spec.yaml to FPGA inference

Pipeline flow

spec.yaml (operator graph definition) | v [1] Validator --- operator/dtype/shape checks, graph integrity | v [2] Compiler --- operator fusion, memory layout, scheduling | v [3] .npuart --- serialized execution artifact (operators + weights + metadata) | v [4] Runtime --- CPU reference or Zynq-7000 / UltraScale+ FPGA execution

FPGA deployment pipeline

Step 1 Write spec.yaml and check it with eulernpu validate
Step 2 Generate the .npuart artifact with eulernpu compile
Step 3 Run a cycle-accurate host simulation with eulernpu sim
Step 4 Verify the FPGA board connection with eulernpu board smoke, then run it with eulernpu run

Additional tools

calibrateCollect quantization calibration data
compress-cacheApply KV-cache compression settings
benchmarkLatency/throughput benchmarks

CLI Reference

Single entry point eulernpu — 15 subcommands cover the entire workflow (--lang ko|en|zh|ja|es supported)

Command Description
eulernpu infoShow platform, supported operators, and dtype information
eulernpu validateValidate the spec.yaml operator graph (JSON-Schema + 23 semantic rules)
eulernpu migrate-spec NEWAuto-migrate specs from 0.4 → 0.5
eulernpu compileCompile spec.yaml into a .npuart artifact
eulernpu runRun a .npuart artifact on the cpu_ref/npu_sim/zynq backends
eulernpu simFunctional simulation + cycle/MAC/latency estimates
eulernpu generate NEWAutoregressive token generation (KV cache)
eulernpu quantize NEWINT8/INT4 weight quantization (--weight-bits 4)
eulernpu profileProfile per-operator execution time and memory usage
eulernpu explainVisualize the PL offload + memory plan and graph schedule
eulernpu board smokeVerify FPGA board connectivity and basic operation
eulernpu calibrateCollect and apply quantization calibration data
eulernpu benchmarkRun latency/throughput benchmarks
eulernpu replayReplay a saved execution trace
eulernpu compress-cacheApply and validate KV-cache compression settings

Tutorials

Step-by-step guides to get started with EulerNPU quickly

Tutorials coming soon.

Installation & Getting Started

Install EulerNPU and compile your first inference graph

Installation

pip install -e ".[dev]"

# Validate and compile
eulernpu validate spec.yaml
eulernpu compile spec.yaml -o model.npuart

Requirements

Python 3.10+, NumPy

Optional: ONNX import, Zynq-7000 / UltraScale+ boards (FPGA target)

Start NPU Inference Development with EulerNPU

From spec.yaml to hardware deployment, in a single CLI.

Get Started on GitHub Contact Us