FA-88908 / Digital logic simulation / Member archive
Second driver silently overwrites a net · case 03
Two gates driving the same net are accepted and the later one wins.
Case contract
Input [pis, gates]: pis maps primary input net -> 0/1; gates are [out, op, ins] in any order with ops and/or/xor/nand/not/tie0/tie1. Reject with 'undriven <net>' (first gate in list order, first pin) if a gate reads a net driven by nobody, or 'multiply driven <net>' if a net has two drivers (a gate driving a primary input counts). Otherwise evaluate in dependency waves; return 'loop' if no gate becomes ready. Level: primary inputs 0, gate = 1 + max input level, tie cells 0. Return {'depth': max level, 'values': sorted [net, value]}.
Why this case matters
Levelized compiled-code simulators must order gates by dependency and diagnose structural netlist errors before evaluating.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| two gates drive one net | {"depth": 2, "values": [["a", 1], ["b", 1], ["c", 1], ["m", 1], ["o", 0]]} | "multiply driven m" | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗