Skip to content

findSupplyShorts

findSupplyShorts(netlist): readonly SupplyShortWarning[]

Defined in: packages/compiler/src/supply-short.ts:46

A diode whose anode sits on a supply node and whose cathode sits on ground is forward biased by the whole supply. In a real circuit that is a dead short: the junction conducts until something fails.

The runtime does not diverge on it, which is why this went unseen. DIODE_VOLTAGE_LIMIT caps the junction voltage at 0.9 V before the current is computed, so instead of running away the diode settles at about 1 A — and the supply is an ideal source, so it simply sinks that current and the pedal renders a plausible level. ibanez-ts808 renders a gain of 0.506 with a 1 A short on its rail. The clamp is a convergence device that turned out to be hiding a circuit defect, which is the same shape as several other masks found the same day.

Directness is required, and it is what makes this precise. The check asks that the anode be on a node a voltage-source or rail device terminates, and the cathode be ground itself. An indicator LED fed through a series resistor does not match, because its anode sits on the resistor’s node rather than the supply’s — so the common legitimate arrangement is excluded by construction rather than by a special case.

Measured over the pedal corpus: 6 diodes across 6 packets match structurally, of which the two that compile carry 1.074 A each. The other four are in the unsupported population, so they are flagged the moment their packets compile.

The warning states the structure and the polarity, and does not claim the source is wrong. A protection diode reversed in the source and a protection diode this pipeline has mis-read look identical from here; what makes it reportable is that either way the compiled circuit contains a short. Checked on ibanez-ts808: the source itself declares anode on the 9 V node and cathode on ground, so the role reading is not at fault there — but that is a per-packet finding rather than something this stage should assert.

Netlist

readonly SupplyShortWarning[]