Stationary weight B[k][j] Activation moving right Partial sum moving down Finished output C[i][j]

Systolic Array: 2D Weight-Stationary Dataflow

This is a genuine, independently-computed 2D counterpart to the 3D output-stationary systolic array simulator. Instead of both operands streaming diagonally into a grid of fixed accumulators, this model implements the weight-stationary dataflow used in Google's original TPU MXU: the weight matrix B is systolically shifted into every processing element first — a real extra pipeline stall of 2N−2 cycles that output-stationary designs never pay — and only then do activations stream rightward while partial sums drain downward through the same grid, with finished dot products appearing in a separate output readout strip rather than being stored in place. Every number is computed from scratch in this page: the exact same triple-nested multiply-accumulate as ordinary matrix multiplication, scheduled with real systolic timing and checked against a direct O(N³) reference computation across many random trials before shipping (see verification note in the source). Resize the array, change the clock, or load fresh random matrices to watch the load-then-drain pipeline play out.