This tutorial gives a brief overview of SPICE to microelectronic students. Most of the examples and exercises are directed to the microelectronic applications. The description is far from complete, as SPICE is a powerful circuit simulator with many capabilities. However, it will serve as a start for students in other disciplines. For more information, please refer to the SPICE user's manual or books listed at the end of this tutorial.






4.1 Passive Components
4.2 Independent Sources


Most of microelectronic circuit design is curried out with the aid of a computer aided circuit analysis program such as SPICE. SPICE, an acronym for Simulation Program with Integrated-Circuit Emphasis, is considered as industrial standard for computer-aided circuit analysis for microelectronic circuits.

SPICE was initially a research project at the University of California at Berkeley in the late 1960s. In the early 1970s, the most important addition was in the area of semiconductor device models. A better model for bipolar transistors, the integral charge-control model of H. Gummel and C. Poon, was introduced. This model included second-order effects, such as high-level injection and low-level recombination, and represented a major advancement over the Ebers-Moll model.
Models for two other semiconductor devices were added: the junction field effect transistor (JFET) and the metal-oxide semiconductor field effect transistor (MOSFET).
Today SPICE is synonymous with analogue computer-aided simulation. The major CAE companies, Cadence and Mentor, offer a property SPICE version as part of their analogue CAE products: Analog Workbench and Analog Artist from Cadence and Accusim from Mentor.

SPICE is a general-purpose circuit simulator capable of performing the following types of analysis:

  • Nonlinear DC analysis: the result of this analysis is commonly referred to as the DC bias or operating-point characteristic.
  • Nonlinear transient analysis: computes the voltages and currents with respect to time.
  • Linear AC analysis: linearises the circuit around the DC operating point and then calculates the output as a function of frequency.
  • Temperature analysis: allows a series of analyses to be performed while varying the temperature of the circuit.
  • Noise analysis: calculates the noise contribution of each elements and the total effect on the output in a mean-square sense.
  • Sensitivity analysis: indicates which components affect the circuit performance most critically.
  • Fourier analysis: computes the Fourier series coefficients of the circuit's voltages or currents.
  • Mont Carlo analysis: performs multiple runs of selected analysis types using a predetermined statistical distribution for the values of various components.
  • Distortion analysis: computes several harmonic distortion characteristics using AC small-signal analysis.

SPICE analyses various types of circuits contain one or more of the following components:

  • Independent and/or dependent voltage and/or current sources
  • Resistors
  • Capacitors
  • Inductors
  • Mutual inductors
  • Transmission lines
  • Operational amplifiers
  • Switches
  • Diodes
  • Bipolar junction transistors
  • Junction field effect transistors (JFET)
  • Metal-oxide semiconductor transistors (MOS)
  • Metal Schottky field effect transistors (MESFET)
  • Digital gates (PSpice for example)


A circuit to be simulated must be described in a sequence of lines (cards). Each line is either a statement, which describes a single element, or a control line, which set model parameters, measurement nodes, or analysis types. The first line must be a title line, and the last line must be an .END statement. A command line must start with dot command. Comment line must start with an asterisk '*'.

Spice input file (deck) format is as follows:

    Title statement

      circuit description
        Power Supplies / Signal Sources
        Element Descriptions
        Model Statements

      Analysis Requests

      Output Requests


The circuit is described as elements connected between nodes. Elements must be uniquely labeled, and the nodes must be distinctly numbered with nonnegative integers between 0, for ground, and 9999.

Elements have small or large values can be encoded as follows:

Code metric prefix Decimal representation
T tera 1012
G giga 109
Meg mega 106
K kilo 103
M milli 10-3
U micro 10-6
N nano 10-9
P pico 1012
F femto 10-15

Each element has a unit (dimension) which are as follows:

Spice Suffix Units
V volts
A amps
Hz herts
Ohm ohm (W)
H henry
F farad
Degree degree


The basic elements of electronic circuits can be represented by the first letter, the list of these elements and their representations are as follows:

1st letter Element
B GaAs Field-Effect Transistor (MESFET)
C Capacitor
D Diode
E Voltage-Controlled Voltage Source (VCVS)
F Current-Controlled Current Source (CCCS)
G Voltage-Controlled Current Source (VCCS)
H Current-Controlled Voltage Source (CCVS)
I Independent Current Source
J Junction Field-Effect Transistor (JFET)
K Coupled Inductors
L Inductors
M MOS Field-Effect Transistor (MOSFET)
Q Bipolar Junction Transistor (BJT)
R Resistor
V Independent Voltage Source


4.1 Passive Components

SPICE considers the current always flows from the positive node through the element to the negative node.

Element Spice Description
Passive Components Rname n+ n- value
Lname n+ n- value
Cname n+ n- value


  • Rvalue = (Vn+ - Vn-)/IR
  • Cvalue = iC/(dvC/dt)
  • Lvalue = vL/(diL/dt)

Spice3 supports a diffusion resistor from the geometric and process information as follows:

Rname n+ n- <Mname> <L = L> <W = W>

where <Mname> is the model name of type R, which contains one or more of the following:

Name Parameter Units Default
TC1 First-order temperature coefficient 1/oC 0.0
TC2 Second-order temperature coefficient 1/(oC)2 0.0
RSH Sheet resistance ohm/sq 0.0
DEFW Default width m 10-6
NARROW Narrowing due to undercut m 0.0

The value of the resistance can be computed as follows:

Rvalue = RSH ((L - NARROW)/(W - NARROW))

Moreover, the capacitance of a planar diffusion can be evaluated as follows:

Cname n+ n- <Mname> <L = L> <W = W> <IC = vo>

where <Mname> is the model name of type C, which contains one or more of the following:

Name Parameter Units Default
CJ Junction bottom capacitance Fm-2 --
CJSW Junction sidewall capacitance Fm(-1) --
DEFW Default device width m 10-6
NARROW Narrowing due to undercut m 0.0

The value of the capacitance can be computed as follows:

Cvalue = CJ (L - NARROW)(W - NARROW) + 2 CJSW (L + W - 2 NARROW)

The value of the resistor as a function of temperature is given by:

Value(T) = Value(To)*(1 + TC1*(T-To) + TC2*(T-To)2)

A nonlinear capacitance whose value depends on the instantaneous voltage across it can be described as:

Cname n+ n- POLY C0 C1 C2 ... <IC = initial_voltage>

Its value is given by:

C = C0 + C1*V + C2*V2 + ...

A nonlinear inductor whose value depends on the instantaneous current through it can be described as:

Lname n+ n- POLY L0 L1 L2 ... <IC = initial_current>

Its value is given by:

L = L0 + L1*I + L2*I2 + ...

Two inductors are mutually linked, can be described by their own element lines, then the coupling can be described as:

Kname Lname1 Lname2 value

4.2 Independent Sources

Voltage and current sources that are independent of any circuit variables are defined by the following statements:

Vname n+ n- <<DC> value> <AC <ac_arg <ac_phase>>>
+ <TRAN_function <value1 <value2 ... >>>


The polarity conventions are shown below:
Independent sources