« All posts

AI Circuit Tutor That Can't Draw a Wrong Circuit

How digiwleea's AI circuit tutor uses netlist verification and simulation feedback to guarantee every generated circuit is provably correct.

digiwleea, a browser-based CPU simulator built from single transistors, includes an AI tutor that can build a working full adder on request in seconds. The trick isn't a more reliable model — it's a system that never lets the model touch layout directly. The model only emits a logical netlist describing which gates connect to which pins; a separate engine decides where everything goes.

That layout engine tries a cascade of strategies, but the real guarantee is verification: every candidate is run through the simulator's own union-find pass, which partitions all pins into electrical nets. If that partition doesn't exactly match the netlist the model requested, the candidate is discarded. Shorted nets, floating pins, or a wire brushing the wrong pin are all caught by this single check, run on the production engine itself rather than a separate validator that could drift out of sync.

After a build, the system simulates the circuit and hands the model its actual truth table, so the tutor iterates against measured behavior instead of its own confidence. If nothing verifies, the tutor simply refuses to build rather than show a plausible-looking but wrong circuit — the same gate protects reusable library components before they're ever saved.

The broader lesson for engineers building on LLMs: constrain the model to the semantic layer it's actually good at, verify with the real production engine rather than a lookalike, feed measured reality back into the loop, and prefer honest refusal over plausible wrongness. None of this is specific to circuits.