Skip to content

findOverDrivenNodes

findOverDrivenNodes(program): readonly CompileWarning[]

Defined in: packages/compiler/src/over-driven-node.ts:106

Nodes driven by more than one ideal voltage source, read from the lowered stamps.

Reading stamps rather than the netlist is the whole correctness of this rule, and a first version got it wrong. boss-sd-1 declares two supply devices on node 14 — a rail and a battery’s positive terminal — and lowering collapses them into one dc-source stamp, so the compiled circuit is not over-determined and ngspice accepts the deck. A netlist-level check flagged it anyway, reporting a redundant declaration as a contradiction. The stamps are what the runtime executes and what the deck is emitted from, so they are the only thing that can say whether two sources really force one unknown.

Counts dc-source positives and ideal-opamp outputs, and nothing else. A transistor collector on a driven node is ordinary — a collector is a current source behind a load resistor, not a voltage forced through near-zero impedance — and a supply’s negative end is a reference rather than a driver, so counting either would make this noise.

Per block, because regions are independent solves: two sources on the same node id in different regions are different unknowns and no conflict.

Program

readonly CompileWarning[]