NPU · SKY130 130 nm · Clock gating · Scan DFT · Tiny Tapeout · design complete
One-Tile int4 NPU (2x2 MAC Array) for Tiny Tapeout
A 2×2 int4 multiply-accumulate array with 16-bit accumulators, one clock gate per row and a 96-flop scan chain, taken from RTL to a signed-off layout in a single 161 × 112 µm Tiny Tapeout tile. Built for the TTSKY26d shuttle; the demo board's microcontroller drives it over the pins.
50 MHz with timing met at all 12 corners (−40…100 °C, 1.60–1.95 V). DRC, LVS and antenna clean, Tiny Tapeout precheck 15/15. Clock gating cuts core power by 45–59% (vector-based, pre-silicon estimate).
Specs
OVERVIEW| Chip | |
|---|---|
| Process | SkyWater SKY130 (130 nm), sky130_fd_sc_hd cells |
| Shuttle | Tiny Tapeout TTSKY26d, deadline 2026-11-30 |
| Area | 1×1 tile, 161.0 × 111.52 µm = 17,955 µm² |
| Top module | tt_um_akln0401_npu |
| Clock | 50 MHz; setup +5.70 ns, hold +0.162 ns over 12 corners (−40…100 °C, 1.60–1.95 V) |
| Cells | 1,595 placed (excl. fill): 98 flops, 2 clock gates, 914 logic gates, 321 timing/fanout buffers, 22 clock-tree cells, 225 taps, 13 diodes |
| Utilization | 84.4% · 32.8 mm of routing on met1–met4 |
| Power | 0.19–0.28 mW at 50 MHz, typical corner, depending on the workload (vector-based estimate, see clock gating) |
| Accelerator | |
|---|---|
| Array | 2×2 processing elements, signed int4 × int4 |
| Accumulators | 4 × 16-bit, two's-complement wrap; 511 worst-case steps without overflow |
| Per step | 4 MACs in one clock (outer product acc[i][j] += a[i]·b[j]) |
| Throughput | One register write ≥ 6 clocks, a step needs 3 writes → ≤ 2.8M steps/s (11M MAC/s) at 50 MHz; the host's GPIO speed sets the real rate |
| Interface | 8-bit write data, 8-bit read data, 3-bit address, write strobe; 7 registers |
| Clock gating | 1 ICG (dlclkp_1) per row; a row's clock runs only on step/clear cycles. Saves 45–59% of core power (see clock gating) |
| Test | Full scan: 96 flops in one chain, uio[6] → uio[7] (only the 2 reset-sync flops are off it) |
How it works
OPERATIONThe chip is a small matrix-multiply engine. The microcontroller on the Tiny Tapeout demo board acts as the host: it writes operands into the chip over the pins, tells it to step, and reads the results back.
Write a register
The host puts the address on
uio[2:0]and the byte onui[7:0], then raises the strobeuio[3]. The strobe is synchronized to the chip clock (2 flops) and its rising edge loads the byte.Load operands
A0holds two int4 valuesa[0],a[1](one column of A),B0holdsb[0],b[1](one row of B).Step
A
CTRLstep (or, in auto mode, anyB1write) opens each enabled row's clock gate for exactly one cycle, and all four PEs adda[i]·b[j]to their accumulator.Ksteps compute a 2×2 block ofC = A·Bwith inner dimensionK(up to 511 without overflow).Read back
Writing
RSELpicks an accumulator and a byte;uo[7:0]then shows that byte. Four reads give the 32-bit sign-extended value.Sleep between steps
When nothing is stepping, the row clock gates are closed: the 64 accumulator flops and their clock tree get no clock edges (clock gating).
Test on silicon
test_mode(uio[4]) forces the clocks on and links all 96 flops into one shift register fromuio[6]touio[7], so any internal state can be loaded and read out on the bench (scan chain).
Layout: GDS and 3D model
LIBRELANE 3.0.14The final GDS from the place-and-route run, rendered with KLayout. It has 39 rows of standard cells (2.72 µm each). The tile's 4 pairs of vertical met4 power stripes cross the whole tile, and the 43 signal pins sit on the top edge, where the Tiny Tapeout mux connects them.
Whole tile, all layers, SKY130 colours. Fine texture: standard cells. Line grid: met1–met4 routing and power.
Routing only: met1 blue, met2 red, met3 green, met4 orange; white = met4 power stripes and pins.
Interactive 3D model
The same GDS as a 3D model. Each layer is extruded at its height in the SKY130 stack (heights are exaggerated, ×4 by default; use the slider). Click to interact: drag to rotate, right-drag or shift-drag to pan, wheel or pinch to zoom; ⤢ goes full screen. The Metal preset hides the transistor layers, Cells shows only them.
174,710 shapes in 13 layers (diff, tap, poly, licon, li1, mcon, met1, via, met2, via2, met3, via3, met4), drawn with WebGL2; browsers without WebGL2 show a still image.
Close-up: met4 power stripes (orange) on top, met3 (green) straps and signals, met2 (red) and met1 (blue) routing below, with the via stacks (grey) between them.
Tapeout
SIGNOFFSignoff on the final layout. The local flow is the same as Tiny Tapeout's GitHub gds action (tt-support-tools + LibreLane 3.0.14), and the precheck is the same set of checks the shuttle runs.
| Check | Result | Evidence |
|---|---|---|
| Physical: Magic DRC, LVS, antenna, routing DRC (flow) | 0 / 0 / 0 / 0 | LibreLane signoff |
| TT precheck: Magic + KLayout DRC (FEOL, BEOL, off-grid), pins, boundary, power, layers | 15 / 15 | same checks as the shuttle |
| Setup, 12 corners | +5.70 ns worst at ss, −40 °C, 1.60 V | 0 violations |
| Hold, 12 corners | +0.162 ns worst at ff, −40 °C, 1.95 V | 0 violations |
| Max slew / max cap | 10 / 0 slew ≤ 0.84 ns vs 0.75 limit, cold slow corner only | on the read-mux select nets, not a clock or critical path; already in the timing numbers |
| Power grid, IR drop | 0 violations, worst drop 0.07 mV | LibreLane signoff |
| RTL simulation (cocotb, through the pins) | 17 / 17 | test/: incl. all 256 int4 operand pairs on every MAC unit and exact 16-bit overflow boundaries |
| Gate-level simulation of the PnR netlist | 17 / 17 | same tests, also in CI |
| Gate level with SDF delays at 50 MHz (ss −40 °C, ss 100 °C, tt, ff −40 °C) | 8 / 8 each | test/extra/sdf/ |
| RTL vs. netlist random co-simulation, every output every cycle | 0 mismatches, 20M cycles + 6M with SDF at 3 corners | test/extra/cosim/; 3 planted RTL bugs all caught |
System
ARCHITECTUREThe microcontroller writes operand bytes and commands over a small register bus, the chip does all four multiply-accumulates in one clock, and the host reads accumulators back one byte at a time through RSEL.
Data path (heavy lines), register bus (thin lines), scan chain (dashed lines). uio_oe is fixed at 0x80: only uio[7] is an output, driven 0 unless test_mode.
Register map
INTERFACEWrite-only registers, 3-bit address on uio[2:0]. Operands are signed int4 (−8…7), two per byte.
| Addr | Name | Bits | Reset |
|---|---|---|---|
| 0 | A0 | a[0] = [3:0], a[1] = [7:4] | 0 |
| 1 | A1 | unused (rows 2–3 do not exist in the 2×2 array) | 0 |
| 2 | B0 | b[0] = [3:0], b[1] = [7:4] | 0 |
| 3 | B1 | data unused (2×2 array); the write steps the array if CTRL.auto is set | 0 |
| 4 | CTRL | [0] clear all accumulators · [1] step · [2] auto (sticky). Clear beats step in the same write | auto = 0 |
| 5 | ROWEN | [1:0] row enable; a disabled row's clock stops | all 1 |
| 6 | RSEL | [7] = 0: uo = byte [5:4] of accumulator [3:0] (index 2·i + j, sign-extended to 32 bit) · [7] = 1: uo = ID byte [1:0] | 0x00 |
| 7 | — | reserved |
ID bytes: 4E 22 10 01 = 'N', 2×2 array, 16-bit accumulators, version 1. Reset clears every accumulator and the A/B operand registers.
MAC array
DATAPATHOne step is an outer product: for every enabled row i and every column j, acc[i][j] += a[i] · b[j]. A matrix product C = A·B with inner dimension K is K steps, each loading one column of A and one row of B.
// npu_pe.v — one MAC unit, clocked by its row's gated clockif (scan_en) acc <= {acc[ACC_W-2:0], scan_in};else if (clear) acc <= 0;else if (step) acc <= acc + sign_extend(a * b); // int4 × int4 → 8-bit product
Accumulator width: 16 bit
511 worst-case stepsThe largest product is −8·−8 = 64. 16-bit accumulators (max 32,767) take 511 worst-case steps, so a whole 64-input dot product (8×8 digit image) fits in one pass; 12-bit would have allowed only 31 (the host would have to split K). Overflow wraps (two's complement).
Clock gating
LOW POWEREach row has one sky130_fd_sc_hd__dlclkp_1 integrated clock gate (wrapper src/dft/clk_gate.v). The latch is transparent while clk is low, so the enable can't glitch the gated clock.
// functional enableen[i] = (step_q && !scan_en && row_en[i]) || clear_q || !rstn// test mode forces the clock onGATE = en[i] || test_mode
A row's accumulators and their clock tree toggle only on the cycle after a step or clear. Between steps the host is busy writing operands for dozens of chip clocks, so the array is idle almost all the time. The cocotb test counts the edges of each row's gated clock: for every ROWEN mask, 3 steps give 3 edges on an enabled row and 0 on a disabled one, and test mode keeps both clocks running.
Power saved: vector-based estimate
To find out what the clock gates buy, the post-PnR netlist was simulated running real workloads, and its switching activity went into the signoff timer's power engine with the routed parasitics. Each workload ran twice with identical bus traffic: once normally, and once with test_mode high, which forces both row clocks on. That second run is the design as it would be without clock gating.
58.6% less core power with the clock gates working while the array waits for the host (idle at 50 MHz, typical corner). Across all four workloads and three corners the saving is 45–59%.
Core power at the typical corner (tt, 25 °C, 1.80 V), 50 MHz, 400 µs per run. Activity from unit-delay gate-level simulation; all 4,546 pins annotated.
Table: every workload at three corners
| Workload | Corner | Gating on | No gating | Saved |
|---|---|---|---|---|
| Idle | tt 25 °C 1.80 V | 191.3 µW | 461.5 µW | 270.2 µW (58.6%) |
| Idle | ff −40 °C 1.95 V | 220.6 µW | 532.5 µW | 312.0 µW (58.6%) |
| Idle | ss −40 °C 1.60 V | 146.9 µW | 354.6 µW | 207.7 µW (58.6%) |
| Slow host | tt 25 °C 1.80 V | 197.4 µW | 466.7 µW | 269.3 µW (57.7%) |
| Slow host | ff −40 °C 1.95 V | 227.5 µW | 538.4 µW | 310.9 µW (57.7%) |
| Slow host | ss −40 °C 1.60 V | 151.7 µW | 358.7 µW | 207.0 µW (57.7%) |
| Max bus rate | tt 25 °C 1.80 V | 276.7 µW | 533.6 µW | 256.9 µW (48.2%) |
| Max bus rate | ff −40 °C 1.95 V | 316.7 µW | 613.4 µW | 296.6 µW (48.4%) |
| Max bus rate | ss −40 °C 1.60 V | 213.0 µW | 410.6 µW | 197.5 µW (48.1%) |
| Max bus rate, row 1 off | tt 25 °C 1.80 V | 260.0 µW | 523.6 µW | 263.6 µW (50.3%) |
| Max bus rate, row 1 off | ff −40 °C 1.95 V | 298.0 µW | 602.3 µW | 304.3 µW (50.5%) |
| Max bus rate, row 1 off | ss −40 °C 1.60 V | 200.2 µW | 402.8 µW | 202.6 µW (50.3%) |
| Max bus rate, with SDF delays (glitches included) | tt 25 °C 1.80 V | 308.2 µW | 561.7 µW | 253.5 µW (45.1%) |
Where it comes from
At the maximum bus rate (typical corner) the saving is all clock: the gated branches of the clock tree and the clock pins of the 64 accumulator flops stop toggling between steps. The logic does the same work either way.
| Group | Gating on | No gating | Difference |
|---|---|---|---|
| Clock tree | 130.3 µW | 266.0 µW | −135.7 µW |
| Flops (incl. their clock pins) | 79.4 µW | 200.9 µW | −121.5 µW |
| Logic | 66.9 µW | 66.7 µW | +0.3 µW |
| Total | 276.7 µW | 533.6 µW | −256.9 µW |
With the gates working, the NPU's power hardly depends on the workload (191 µW idle, 277 µW at the maximum bus rate). What's left is the always-on part: the root of the clock tree and the 34 interface and synchronizer flops. Turning a row off with ROWEN only saves another 17 µW here, because each row's clock is already off about 95% of the time.
Real netlist, real protocol
The post-PnR netlist (the same file the Tiny Tapeout CI builds) is driven through its pins at 50 MHz by a host model that follows the datasheet write protocol, streaming int4 matrix-multiply steps (A0, B0, CTRL step) with fixed-seed random operands.
Same traffic, gating defeated
The baseline repeats the identical stimulus with test_mode high. That forces both clock gates open, while the MAC units still hold through their own step enables. Both runs end with the same accumulator values, so only the clocking differs.
Switching activity
Icarus Verilog dumps every net to a VCD over a 400 µs window. A second run with SDF back-annotated delays adds the glitches that unit-delay simulation misses.
Power analysis
OpenSTA (LibreLane 3.0.14) reads the routed netlist, the extracted SPEF, the sky130 liberty power models and the VCD; all 4,546 pins get their activity from the simulation. The same is repeated at the typical, fast-cold and slow-cold corners.
Reproducible
audit/power/run_power.sh in the repository rebuilds every number on this page.
This is a pre-silicon estimate of this tile's 1.8 V core only (no pads, Tiny Tapeout multiplexer or other projects). The absolute values depend on the liberty models; the gated/ungated ratio is the robust result. On the bench, the same comparison is one pin: run a workload with uio[4] (test_mode) low, then high with uio[5] low, and compare the core current (≈ 0.15 mA difference expected at 1.8 V).
Scan chain
DFTMux-D scan in RTL. test_mode (uio[4]) forces all row clocks on and puts scan_out on uio[7]; scan_en (uio[5]) is ANDed with test_mode; scan_in is uio[6]. Every flop is on the chain except the two reset-synchronizer flops, which stay off it so reset remains controllable in test mode.
Chain order from scan_in to scan_out, with the flop count of each field. Every field shifts in LSB first.
Length = 3 + 8 + 8 + 1 + 2 + 8 + 2 + 4 × 16 = 96 flops. The shift test runs through the pins in RTL and on the gate-level netlist; the per-bit map is generated by test/scan_map.py.
Pinout
I/O| Pin | Dir | Function |
|---|---|---|
| ui[7:0] | in | Write data byte |
| uo[7:0] | out | Read byte selected by RSEL (accumulator byte or ID byte) |
| uio[2:0] | in | Register address |
| uio[3] | in | Write strobe, active high (synchronized, acts on its rising edge) |
| uio[4] | in | test_mode: row clocks forced on, scan out enabled |
| uio[5] | in | scan_en (only with test_mode) |
| uio[6] | in | scan_in |
| uio[7] | out | scan_out (0 unless test_mode) |
| ena | — | unused |
Host code
FIRMWAREPseudocode for the demo board's microcontroller; set_pins/read_uo stand in for whatever GPIO API the firmware uses (TT MicroPython SDK or C SDK). Strobe timing is in chip clocks: MicroPython is far slower than 4 chip clocks per pin change, but C code writing the GPIO registers directly can toggle in a few ns, so it needs the explicit waits.
A0, A1, B0, B1, CTRL, ROWEN, RSEL = range(7)def wr(addr, data): set_pins(ui=data, addr=addr, strobe=0) set_pins(strobe=1) wait_chip_clocks(4) # hold addr/data ≥ 4 chip clocks set_pins(strobe=0) wait_chip_clocks(2) # low ≥ 2 chip clocks before the next writedef nib(lo, hi): # two signed int4 → one byte return (lo & 0xF) | (hi & 0xF) << 4def read_acc(n): # 32-bit sign-extended accumulator n = COLS*i + j v = 0 for byte in range(4): wr(RSEL, byte << 4 | n) v |= read_uo() << (8 * byte) return v - (1 << 32) if v & 0x80000000 else vdef matmul(A, B): # A: ROWS×K, B: K×COLS, int4 entries wr(CTRL, 0b101) # clear + auto-step on B1 writes for k in range(len(B)): # K up to 511 with 16-bit accumulators wr(A0, nib(A[0][k], A[1][k])) # column k of A wr(B0, nib(B[k][0], B[k][1])) # row k of B wr(B1, 0) # B1 data unused at 2×2: just steps return [[read_acc(COLS*i + j) for j in range(COLS)] for i in range(ROWS)]
For the 2×2 array (ROWS = COLS = 2). Without auto mode, step with wr(CTRL, 0b010) instead of the B1 write. The array size can be read from ID byte 1 (wr(RSEL, 0x81) → 0x22).
Next
ROADMAPDesign, verification, layout
Done: RTL, tests, PnR and local signoff above.
Repository and CI
Done: public GitHub repo; Tiny Tapeout
gdsbuild, precheck and gate-level test pass in CI.Submit to TTSKY26d
Next: before 2026-11-30.
Bring-up on silicon
After fab: ID bytes
4E 22 10 01, scan chain shift, matmuls against a Python reference, clock-gating current with rows on/off.