Almost every Integrated Circuit designer knows SPICE simulator. Ideally with SPICE simulator, we could build a virtual circuit and cover several circuit principles and applications in a short time.In this paper, we firstly introduced some basic information about SPICE, and then we dived into the part of how we use the SPICE simulator. After finishing that, we began to introduce the principal part of this paper: algorithm and implementation of a SPICE simulator.Nodal Analysis, the core algorithm of SPICE simulator, was discussed in this paper. Meanwhile, we discussed the Newton's method used to transform a nonlinear device such as diode into its linear companion model and the Euler integration formula used to transform an energy-storage component into its equivalent linear components for transient analysis.After introduction of companion model, we introduced the model of diode and NMOS used. It is necessary to study that in order to add new model to simulator easily.Next, a basic SPICE simulator was implemented using the c programming language on the Linux platform. And a RC circuit was created to verify the simulator.At last, an over thermal shutdown circuit is designed according to the algorithm and implementation of SPICE simulator. |