T27.AI

Blog

Four rules for a measurement rig whose readout cannot be misread

2026-08-11 · 6 min read

A readout whose mapping to state is unestablished is not an instrument — four rules written after a week of hardware debugging where the rig lied and the design was fine.

FPGAHardwareDebuggingMeasurement

Every rule below exists because I got a reading, believed it, and it was the rig talking rather than the design. None of them is about a particular chip.

1. Calibrate the readout before the experiment, never after

Drive a fixed asymmetric pattern and look at it. 4’b0011 is the minimum useful one: it fixes both the polarity and the index mapping in a single observation.

active-HIGH : led0,led1 lit    led2,led3 dark
active-LOW  : led0,led1 dark   led2,led3 lit

What happened without it: a design drove led = {2’b00, s2, s1} and the two hardwired zeros came back lit. The board is active-low, so "all four lit" meant all four bits zero — the opposite of the reading I first took. I concluded "both edges capture" when the data said neither does.

A readout whose mapping to state is not established is not an instrument.

2. A sticky-OR cannot tell "never captured" from "captured zero"

Both leave it at 0. Report AND as well as OR over the same window.

ORANDstate
00stuck low
11stuck high
10toggling
01impossible — a consistency check on the rig itself

Initialise the AND register to 1 and the OR to 0. Then the AND leaving 1 also proves the clock ran, which is a second thing the OR cannot show. The fourth row is the useful one: it can never occur, so if it does, the rig is broken and not the design.

3. Numbering ambiguity silently inverts conclusions

Readings arrived as "LED 0 / 1 / 3 / 4", then "LED 1 / 2 / 3 / 4" — mixed 0-based and 1-based with one index skipped. I mapped both to led[0..3] without noticing, and the two mappings give opposite answers to the question being asked.

Design the readout so the answer does not depend on which indicator is which:

4. A/B/A, always

Run the baseline, run the change, run the baseline again. If the two baselines disagree, the rig moved and the middle run means nothing. It costs a third run and it is the only thing that separates "the change did something" from "something changed".

The one that stings

The sticky-OR remedy in rule 2 is the same one our own theorem prescribes for saturating indicators. I had been applying that rule to other people’s code all day and not to my own bench.

What this does not settle

Receipts

Every figure above is measured, and the limits are named with it.