Reference Material
Part of Zero to NPU.
Pull these as you need them, not up front
Reading all of this before you start is a procrastination strategy. Each entry is tagged with the phase where it becomes relevant.
Core
| Topic | Source | Needed by |
|---|---|---|
| The model + golden C | karpathy/llama2.c | phase-1-baseline-llm |
| Board details | Blackboard User Manual · Product page | phase-0-toolchain |
| Silicon details | Zynq-7000 DS190 Overview | board-specs |
Theory
| Topic | Source | Needed by |
|---|---|---|
| Quantization math | Jacob et al., Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inference (the gemmlowp paper) | phase-2-numerics |
| Systolic arrays | Jouppi et al., In-Datacenter Performance Analysis of a TPU (§ on the MXU) | phase-3-mac-engine |
| Online softmax | Milakov & Gimelshein, Online normalizer calculation for softmax | phase-5-vector-unit |
Prior art — read, don’t copy
| Project | Why it’s useful |
|---|---|
Leonui/tiny-npu | 16×16 int8 array, real GPT-2/LLaMA weights, cycle-accurate golden models. Closest architectural match. Note: FPGA synthesis is still a roadmap item there — it’s a simulation project. |
Buck008/Transformer-Accelerator-Based-on-FPGA | Parameterized systolic array that actually runs on Zynq hardware today. Sized for a Z1/Z2 — you’ll need to shrink it. |
taoFPGA/accelerator | Fused matmul → softmax → GELU in int8 streaming RTL on Zynq-7000. |
Calibration
| Source | What it tells you |
|---|---|
| LlamaF (arXiv 2409.11424) | TinyLlama-1.1B at 1.5 tok/s on a ZCU102 — a board vastly larger than yours. Useful for calibrating what’s genuinely hard, and for understanding why your Tier 2 capstone is slow. |
On the Zynq-7020 data point
One published 16×16 int8 array on a 7020 mapped only 64 of 256 multipliers to DSPs — the other 192 became fabric multipliers, consuming most of a 59% LUT occupancy.
The 7020 has 220 DSPs. You have 60. This is the clearest available evidence that 16×16 is not reachable on your part, and why 8×4 is the right call.