Handed a transistor-level schematic PDF of the 6502, the first instinct is to draw it. But trying that quickly reveals a hard fact: the PDF is vector art, not a netlist — you cannot reliably recover which wire connects to which net from it.
So the starting point of this project isn’t drawing; it’s finding a trustworthy connectivity source: the visual6502 netlist.
1. What the netlist gives you
visual6502 ships three datasets:
| File | Content |
|---|---|
transdefs | Each transistor: gate, source, drain, type (enhancement/depletion) |
segdefs | Geometry and segment ids of each diffusion/metal segment |
nodenames | Node id → name (vcc, vss, clk0…) |
Recover the “device + net” graph from these three, then decide how to draw.
2. Drawing: hierarchy + cell reuse
The 6502 layout repeats a lot of structure (inverters, pass gates, latches, PLA rows…). Drawing transistor by transistor is slow and error-prone, so we wrote a generator:
netlist_6502.h ──▶ model.py ──▶ blocks.py / cells.py ──▶ draw.py ──▶ KiCad (.kicad_sch)
- cells: recognize which logic cell a cluster of transistors belongs to, emit a reusable symbol;
- blocks: organize cells into functional blocks, one sheet each (clock, ALU, registers, PLA…);
- draw: instantiate symbols on sheets, draw wires, add labels and junctions.
The output: a 12-page hierarchical schematic (6502.pdf) plus a KiCad project.
3. Wiring: three traps
The generator is the easy part; making every wire actually connect is not:
| Trap | Symptom | Fix |
|---|---|---|
| Labels don’t connect | A label on a wire endpoint isn’t seen as connected | Add junctions at rail taps and node branches |
| Series/pass nodes folded | Networks that should connect get split | Fold only unnamed, non-gate, unshared nodes |
| Power label case | vcc and VCC become two different nets | Normalize to vcc / vss |
One more hidden issue: empty pass branches produced leaf=None; falling back to leaf=v kept it from crashing.
4. Verification: not “looks right”
When the schematic is done, it must be proven equivalent to the original netlist. The verify script does a reverse reconstruction: from the generated data, rebuild “devices + nets” and compare with visual6502:
source: 3239 devices, 1703 nets
missing 0; extra 0; named mismatches 0
RESULT: OK
One step further: run a simulation (a ported perfect6502 core) on the same netlist:
436 half-cycles; page 2 identical
RESULT: PASS
Schematic, netlist and simulation agree — only then is it done.
5. Summary
- A vector PDF cannot be the data source; the netlist is;
- Generated drawing + reverse-reconstruction verification is the only way to make “thousands of devices” tractable;
- Verification must land on two levels — structural equivalence and behavioral agreement — not “the picture looks similar.”
Next: turning this schematic into 4,000 discrete transistors — the MOnSter6502 route.
Related
- Splitting the Board: Dynamic Nodes Can’t Just Be Cut
- Building the 6502 from 4,000 Discrete Transistors: The MOnSter6502 Route
- Code Agents and FPGA Development: A 97-Round Experiment Log
Get the next essay
New essays on products, business and tech — plus what the experiment's numbers actually say.