Systolic Arrays Explained

Systolic Arrays Explained

How the hardware multiplies matrices

An interactive guide to the systolic arrays inside matrix engines, one clock cycle at a time, drawn from a cycle-accurate model.

Loading the animation…

How this is checkedChecked against RTL: the weight-stationary array with shadow weights, written in SystemVerilog and simulated in Verilator 5.020, matches the cycle-accurate model on every register after every clock edge: 17,488 values, 0 mismatches (29,180 across three designs). Synthesised with Yosys: a 16 × 16 array is 203,392 gates and 16,000 flip-flops. How it is tested →

The RTL beside the model

The waveform is the weight-stationary array in Verilator, read from its VCD; below it is the model's frame for the same clock edge. Step through: the shadow weights shift down each column while the previous tile computes, and each PE swaps them in as the next tile's first activation arrives. Shift the model by one cycle and the mismatches light up (511 of 1,116 registers), the check's negative control. Synthesis numbers for every PE and array size are on the model page.

Loading the waveform…

What you'll learn

A matrix unit is a grid of multiply-accumulate cells that pass numbers to their neighbours every clock cycle: each operand is fetched from memory once and used by a whole row or column of cells. This site takes that machine apart one cycle at a time: which operand stays put, how the inputs are skewed so everything meets at the right moment, and where the cycles go.

Every animation is drawn from a cycle-accurate model of the array (Python reference, exact TypeScript port). Its weight-stationary and output-stationary frames, and the processing element's pipeline, match SystemVerilog designs simulated in Verilator on every register after every clock edge: 29,180 values, 0 mismatches.

The model, its conventions and the RTL cross-check: the model.

New to the Hardware track? Start here: the four sites in reading order, what you need first, and a glossary of the terms they define.

Built by a hardware engineer

The author designs hardware: the RTL, SoC and signal-integrity work behind this track is public too.

Part of a family of sixteen companion sites in four tracks, all in the site menu above: Foundations (Decoder, Training), Hardware (Kernels, Systolic, Accelerators, Racks), Inference (Serving, Architectures, Numerics, Trade-offs) and Agents (Harnesses, Protocols, Context, Orchestration, Evals, Security). This site is the silicon inside a matrix engine. How it was built, and how to check it: about.