A digit classifier
in hardware.
64 ink counts feed 16 weighted sums. Clamping and scaling turn those sums into hidden values; a second weighted sum gives each digit a score. The largest score wins. Training chose the fixed weights; changing the ink recomputes the answer.
Drawing & keyboard
Your ink is cropped, fitted proportionally into 32×32, then counted in 4×4 blocks, approximating training-image normalization. Keyboard: arrows move, Space paints, Backspace erases.
Change one ink count
Try the flip, then move the count. We inspect one path; the changed count feeds all 16 neurons and recomputes all ten scores. Edited ink has no assigned label.
* marks each winner. Signed scores, not probabilities.
Follow the sum, one product at a time
Signed scores, not probabilities.
Schedule the same arithmetic
More multipliers compute products in parallel. Five builds preserve every hidden value and score on 2,095 checked inputs. The 180 output ticks stay serial, limiting speedup. Clock counts exclude loading; resources are mapping estimates. Physical board operation and timing remain unverified.
Download the circuit & known-answer tests ↓Synthesis measurements loading…
What was measured · sources · limits
Fully connected network with signed 8-bit weights. Hidden sums are floored after dividing by 26, then clamped to 0–255. Score ties choose the smaller digit. The sum inspector shows arithmetic, not an RTL clock trace. The build replay slows CXXRTL write times, identical for every input.
Dataset: Optical Recognition of Handwritten Digits, E. Alpaydin & C. Kaynak (1998), UCI, DOI 10.24432/C50P49, CC BY 4.0. Original 32×32 bitmaps were normalized and pooled into 8×8 block counts. 30 writers supplied training data; 13 different writers supplied the test set.
Production flows: FINN and hls4ml. This circuit uses Yosys synthesis and CXXRTL simulation. Browser inference runs locally; drawings are not sent anywhere.