Analog & Transistor-Level Simulation

Dan Fritchman
Software Makes Hardware
13 min readOct 2, 2019

--

Our last Software Makes Hardware chapter introduced the simulation model of most digital circuits: a combination of event-driven and reactive logic. Many circuits — including nearly everything analog, and most described at a transistor-level, don’t fit this paradigm. Predicting their behavior requires an entirely different view of how they work, which we’ll refer to as a different paradigm or model of computation.

This mode of circuit simulation is often referred to as SPICE, after the seminal program originally developed at UC Berkeley in the early 1970s. In the decades since, much of the work in this in this area has retained a “spice”-suffixed naming convention — including all of the code shown here, available at github.com/HW21/TeachSpice.

The Analog Model of Computation

If you’ve taken freshman physics (and especially if you’ve studied electrical engineering), you’ve probably been asked to solve problems in linear circuits. For example, let’s imagine a (somewhat) arbitrary network of resistors and current sources — such as this one:

--

--