(Note: This is Part 1 of a two-part article. Click here for Part 2.)
SPICE (Simulation Program with Integrated Circuits Emphasis, often written as Spice) environment becomes an analysis platform of many design software package today, digital and analog alike. Any design engineer must acquire some knowledge of SPICE and its analysis elements for better understanding of the design platform at his hand.
This article provides the basic elements of a SPICE program code and its analysis operations. Any modern design platform includes a SPICE analysis code as its core program, which makes the graphical-user-interface (GUI) much more friendly and easy to use. SPICE is the most popular software code which exists today and most of its elements are used automatically without user interference. The program is operated from the design platform GUI while the user controls the graphical elements.
A SPICE analysis program is supported with operating tools, and with its core elements based on three programs:
1. Field-Solver to transform the GUI into electrical SPICE circuit.
2. Schematic capture to create the circuit connectivity and export the circuit netlist.
3. SPICE simulator which performs the analysis and provides solution with a GUI for signal waveforms.
This article presents the SPICE environment with its basic elements to understand its functionality and know its analysis integration into a combined modern Design Environment software package. It is divided into these sections:
- Introduction
- Origins of Spice
- Spice Program Basic Structure
- Modern Spice Environment
- Field-solver basic definitions
- Schematic Capture and Design Entry
- Spice Simulator
- Combined Environment Requirements
- Summary
There is also a list of useful PC-design related and relevant terms at the end.
1. Introduction
SPICE or Spice (Simulation Program with Integrated Circuits Emphasis) is the most popular program for electronic circuit analysis existing today. An up-to-date, modern system design is defined within it, and must include complete set of software elements to provide the designer an adequate tools environment.
There are many Spice-based programs existing today, in many commercial organizations. The origin of Spice goes back to 1970s, where it was started at the University of California, Berkeley, as nonlinear circuit simulator named CANCER (Computer Analysis of Nonlinear Circuits Excluding Radiation).
In 1971, the SPICE1 program was released to the public domain and quickly became an industry-standard simulation tool. SPICE2 was the next major release, in 1975. From 1980 to the present, many commercial vendors offer versions of Spice-based simulation programs. The popularity of Spice simulation programs increases with electronic circuit complexity, due to the many circuit parameters that designers can construct within a circuit today.
Vendors of Electronic Design Automation (EDA) tools try to create user-friendly computer programs which:
- Are easy to use, have friendly Graphical User Interface (GUI)
- Provide good correlation between simulation and measurements
- Computer Aided Design (CAD)-based programs which rely on well-known theory (EM, EM Field, transmission line, etc.)
- Translate system graphics into electrical parameters.
- Support dedicated utilization for ICs or at the system level (device package and printed circuit boards).
- Speed-up the design cycle of complex circuits (time to market).
- Lower CAD program cost.
Integrated circuits, unlike board-level designs which are composed of discrete parts, are impossible to breadboard before manufacture. Further, the high costs of photolithographic masks and other manufacturing prerequisites make it essential to design the circuit to be as close to perfect as possible before the integrated circuit is first built. Simulating the circuit with Spice is the industry-standard way to verify circuit operation at the transistor level before committing to manufacturing an integrated circuit.
Board-level designs can often be breadboarded, but designers may want more information about the circuit than is available from a single mock-up. After all, building and verifying one unit doesn't assure performance across multiple units.
For instance, performance is affected by component values and it is helpful for designers to use Spice to simulate and predict the effect of variations of those values. Even with a breadboard, some aspects of operation may not be accurate compared to the final printed wiring board, such as parasitic resistances and capacitances. In radio applications, especially UHF and microwave, parasitics are important and must be built into the model of the circuit being simulated. In these cases it is usual to perform Monte Carlo simulations using Spice, a task which is impractical using calculations by hand.
Circuit simulation programs, of which SPICE and derivatives are the most prominent, take a text net list describing the circuit elements (transistors, resistors, capacitors, inductors, diodes, and others.) and their connections, and translate this description into equations to be solved. The general equations produced are nonlinear, differential, algebraic equations which are solved using implicit integration methods, Newton's method and sparse matrix techniques.
2. Origins of Spice
Spice was originally developed at the Electronics Research Laboratory of the University of California, Berkeley in 1975 by Larry Nagel and Donald Pederson. Versions 1 and 2 were coded in Fortran (2G.6 in 1983 was the last) and ran on mainframe computers. Versions 3 and later are coded in C, but still use a Fortran-like syntax for circuit description.
First versions of Berkeley Spice used nodal analysis. However, this meant that ideal voltage sources and inductors could not be included in the circuit. Later versions are using modified nodal analysis, which does not have this drawback.
Different algorithms are used to translate all circuit analysis problems into a single or multiple simpler problems of calculating an operating point of a linear circuit. Such problems can then be solved efficiently by solving linear simultaneous equations. For example, nonlinear circuits are solved using a Newton-Raphson algorithm, which linearizes nonlinear elements in a circuit. Transient analysis is performed using trapezoid or gear-integration algorithms.
XSPICE is an enhanced SPICE simulation engine, developed by Georgia Tech. It significantly augmented the functionality to include a number of abstract simulation models as well as mixed analog/digital circuit simulation.
Free versions of SPICE are available for most computing platforms. A new circuit simulator, Ngspice, based on SPICE3 F5, is licensed under the classic BSD license, and there also exists a branch project called tclspice. LTSPICE is a free non-commercial version of SPICE that works on Microsoft Windows and on Linux (under Wine (software) emulator). MacSpice is available for Mac OS 9 and Mac OS X.
Many commercial versions of Spice have later replaced Berkeley SPICE as the industry standard. While many are still compatible with the original Berkeley syntax, commercial vendors added proprietary extensions that limit the portability of circuit descriptions and models between different vendors. Most recent versions also include a graphical user interface for constructing circuit descriptions. For digital circuits (elements such as RAM), dedicated simulators exist that run orders of magnitude faster than the traditional Spice tools.
3. Spice Program Basic Structure
The system equations are created through matrices, discussed next.
The system matrices
To save time, Spice uses a shortcut to develop the system matrix. This shortcut of matrices is created through the "matrix construction by inspection" technique. This technique builds the system matrix with the help of a predefined element template. The template describes the position of the matrix for the 'conductance and current' values of a particular device.
A resistor template structure is shown as an example, to present the matrix structure for "conductance matrix x voltage matrix = current matrix":

(Click on image to enlarge.)
Conductance matrix:
The conductance array is the circuit's linear relationship between voltage and current for every element. Nonlinear elements such as diodes, transistors and charge-storage elements are represented in the conductance array by their equivalent linear circuit.
Voltage matrix:
The voltage matrix is presented as the node voltage of each element in the circuit. When performing analysis, Spice determines the node voltage and current with the aid of the Kirchoff's laws applied to the circuit.
Current matrix:
During Spice simulation, the branch current is defined by the current source settings.
The elements of the system
Each version of Spice defines its basic elements which represent the electronic circuit and system. Below are the elements of PSPICE, Device type and Letter:
- Bipolar transistor Q
- Capacitor C
- Voltage-controlled voltage source Voltage-controlled current source E
- Voltage-controlled voltage source Voltage-controlled current source G
- Current-controlled current source Current-controlled voltage source F
- Current-Controlled switch W
- Current-controlled current source Current-controlled voltage source H
- Digital input (N device) N
- Digital output (O Device) O
- Digital primitive summary U
- Stimulus devices* U STIM
- Diode D
- GaAsFET B
- Independent current source & stimulus I
- Independent voltage source & stimulus V
- Inductor L
- Coupling K
- IGBT Z
- Junction FET J
- MOSFET M
- Resistor R
- Subcircuit instantiation X
- Transmission line T
Transmission line coupling K
- Voltage-Controlled switch S
Non-linear elements
These are active elements such as diodes, transistors, transistor arrays, and other charge storage elements. These elements complicate analysis because their voltage-current relationships are not always linear.
Such nonlinear and charge-storage elements must be reduced to simplified equivalent circuits before being entered in the system equations. These simplifications are required because the matrices accept linear I-V relationships only; the Spice matrix is always G x V = I. Any nonlinear functions may be expressed as series of linear approximation, and defined through a piecewise-linear curve.
Linear analyses
When a circuit contains linear elements, Spice uses the CAD technique of Gaussian elimination to solve the matrix.
Nonlinear analyses
When a circuit includes nonlinear elements, Spice uses an additional technique called the Newton-Raphson algorithm, which applies iteration to find a solution, and for which any node of the circuit is solved for its dc voltage level.
The iterations are defined by the Spice parameter of
"ITL = x"
which causes the simulation to run-up to a pre-defined limit and stop. If the dc bias in not found before the ITL limit, a non-convergence situation occurs, and an error message is generated. Upon the completion of the iteration process, the dc voltage of a node is defined by convergence process in Spice with the Newton-Raphson algorithm.
4. The Modern Spice Environment
The environment of any electronic design system must cover the disciplines shown in the design triangle of Figure 1:

(Click on image to enlarge.)
The high-speed Signal Integrity (SI) environment includes:
The SI design environment, which includes:
- Complete design environment: includes electrical-schematic, circuit layout and design tools.
- SPICE based simulator analysis- includes full modern SPICE tools of Field-Solver, Schematic drawing and SPICE simulator.
- Virtual Electrical Laboratory- since any circuit node presented by its Voltage/current values any laboratory measurement tool can be presented through software.
The detailed tools environment
- Tool Kit
- Design Flow
- Project steps
The tool kit consists of related elements, Figure 2:

(Click on image to enlarge.)
The design flow is shown in Figure 3:

(Click on image to enlarge.)
A Signal Integrity (SI) project
Any SI project contains the following phases:
- Preliminary Design Review (PDR)
- Model-Validation
- Solution-Space-Analysis (SSA) to create design constraints and board cross-section
- Post-layout analysis
A modern Spice-based program is based on tools including a field solver, electronic schematic capture, and the Spice simulator.
(Part 2 of this article examines Spice tools under the design environment Click here for Part 2.)
Bibliography
- ORCAD spice manual: PSPICE User's Guide, Cadence 2000
- Optimal: PAKsi manual and D/S, www.optimalcorp.com
- Cadence, SPICE model manual: www.cadence.com
- Ron N. Kielkowski, "Inside SPICE", MCGraw Hill Inc. 1998
- Ron N. Kielkowski, "SPICE-Practical Device Modeling", MCGraw Hill Inc. 1995
- Online Spice-related material at:
http://www.wikipedia.org/
http://www.catena.uk.com/site/
http://www.beigebag.com/
http://www.5spice.com/
Relevant Terms
These terms are used in the Spice and EDA environment:
EDA: Electronic Design Automation
BREADBOARD: Experimental/Prototype electrical circuit.
ITERATIONS: Mathematical method of stepped process
CONVERGENCE: Mathematical method of equation solution finding in stepped process.
DEVICE STIMULUS: Signal generator to activate a electrical device model.
COUPLING: Electrical relation between adjacent circuits.
NODE: Electrical Circuit junction.
TRANSISTOR ARRAY: Interconnect between transistors to create electrical function.
MICROSTRIP: RF micro structure on 'external' substrate layers
STRIPLINE: RF micro structure on 'internal' substrate layers
FILLETING: Graphical matching between different graphical shapes.
TEAR DROOP: Tear graphical shape to match between different graphical shapes.
VIAS: Conducting cross shape between PCB/substrate layers
BOND WIRE: Connection wire from die to substrate.
BALL SOLDER: Solder connection ball between substrate and PCB.
DIE BUMPS: Solder connection shape between die and substrate.
MESH/MESHING: Pre-shaped net, applied to graphical shape.
FIELD-SOLVER: Software code that rely on graphical meshing and math equation solver.
FULL-WAVE SOLVER: Solving Maxwell's equation at any given frequency.
STATIC/QUASI STATIC: Solving Maxwell's equation for frequencies below resonance frequency.
SCHEMATIC CAPTURE: Electrical schematic drawing software.
About the author
Yoram Levy, Ph.D., is with EDA Integrity Solutions Ltd, a Cadence channel partner, based in Herzliya, Israel.