Home > EulerNPU > Tutorials > 01. eulernpu Overview

01. eulernpu Overview

eulernpu is a full-stack NPU project that can be realistically proven on an on-board FPGA. Spec definition → validator → compiler → runtime → simulator → RTL/FPGA → CLI line up in a single chain, and at the end of that chain is a number measured on real silicon.

Identity — what it is and isn't

eulernpu is not a sub-model of eulergpu. eulergpu is a reference-only asset; eulernpu has its own product, codebase, and documentation.

4-Layer Spec

Every feature is defined in spec first, implemented second. The spec splits into four layers.

LayerWhatWhere
1. operator145 ops in 18 groups (A–R)docs/specs/operator_set.md
2. component14 hardware component typesdocs/specs/spec_schema.md
3. backend/board capability6 board profiles × 145 ops matrixdocs/specs/capability_matrix.md
4. compile/deploymentoutput format, optimization, targetdocs/specs/spec_schema.md

A one-line spec change touches validator + valid/invalid fixtures + tests + docs + implementation — six places at once is normal. "Added a spec key, implementation pending" is not done.

4 Backends

backendRole
cpu_refGolden reference, deterministic
npu_simCycle / memory model simulation, profile/trace
zynq_psGraph execution on ARM Cortex-A9
fpga_boardReal silicon (PL HLS IP + bare-metal C)

PL offload decisions are not made without measurement. npu_sim profile → silicon measurement comparison is always the gate.

Single CLI Entrypoint

Only one:

eulernpu <command> [args...]

Hyphen-joined commands like eulernpu-info, eulernpu-compile are banned. All features are subcommands of the single eulernpu entrypoint.

All errors follow a 3-line format:

<Category>: <what>
Fix: <one line>
See: <doc path>

The global --lang ko|en|zh|ja|es option fixes help/log/error language. Default is ko. Command/option/JSON key/op names are not translated.

Silicon-validated Assets

What this codebase has actually proven on real boards:

ProjectBoardPatternResult
06 L2 (KWS, single-op offload)QMTECH XC7Z020matmul_systolic IP11/11 MATCH, locks the cycle model
06 L3 (KWS, full-graph NPU)QMTECH XC7Z020kws_npu_top IP8.07× speedup, Apple-ANE pattern
07 (Bearing, deeper full graph)QMTECH XC7Z020bearing_npu_top IP11.13× speedup, CWRU 4-class
08 (LLM, L2 hybrid)QMTECH XC7Z020llm_ffn_npu_top IP + ARM KVhonest measurement on nanoGPT 10.77M

All three stages reuse the same eulernpu/hls/kernels/ templates, the same Vivado BD pattern, and the same xsdb harness.

Detailed silicon results:

Where to Start

GoalNext step
Want to see what a spec looks like02. validate
Want to run a small model on cpu_ref03. compile_run
Trace cycles/memory in simulation04. npu_sim
INT8 quantization05. quantize
Model example catalog06. models
General FPGA / Zynq flow07. fpga_overview
The KWS-on-silicon case study08. kws_silicon
Bearing fault detection silicon09. bearing_silicon
LLM L2 hybrid silicon + honest BENCHMARK10. llm_silicon_hybrid

Core Philosophy

  1. Inference-first — small-model inference acceleration
  2. Operator-first — models are op compositions, not monoliths
  3. Spec-first — define in spec before implementing
  4. Validation-first — fail early, before compile/run
  5. Host-first — get it right on CPU first
  6. Board-realistic — always conscious of XC7Z020 constraints
  7. Deterministic — reproducible across backends
  8. Measured design — no offload without measurement
  9. Separation of concerns — compiler/runtime/driver/RTL split