0007 — Simulation engines
Status: accepted
Decision
- An in-house modified nodal analysis engine covers operating point, DC sweep, transient (trapezoidal and backward Euler with error control and breakpoints) and AC, for R, L, C, sources, diodes, switches and VCVS. It uses sparse LU, SPICE-style junction limiting, and gmin/source-stepping fallbacks. Every analysis is checked against closed-form results (the validation report lives in
falcad-sim/docs/VALIDATION.md). - An event-driven 4-state logic engine handles gate-level digital simulation.
- A SPICE deck exporter and an ngspice adapter cover broader device support where ngspice is installed. ngspice is never silently downloaded.
- The engine never reads the clock or the network. Results carry provenance (engine version, solver options, caller-supplied timestamp).
Why not only ngspice
ngspice is a native binary with its own packaging and license review, and it can’t run in the browser. The in-house engine gives verified results everywhere and keeps a small, fully tested surface. ngspice extends coverage (BJT, MOSFET, vendor models) on the desktop.