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.
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 IntegratedCircuit Emphasis,
is considered as industrial standard for computeraided circuit analysis for microelectronic circuits.
SPICE analyses various types of circuits contain one or more of the following components:
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:
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  10^{12} 
G  giga  10^{9} 
Meg  mega  10^{6} 
K  kilo  10^{3} 
M  milli  10^{3} 
U  micro  10^{6} 
N  nano  10^{9} 
P  pico  10^{12} 
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 FieldEffect Transistor (MESFET) 
C  Capacitor 
D  Diode 
E  VoltageControlled Voltage Source (VCVS) 
F  CurrentControlled Current Source (CCCS) 
G  VoltageControlled Current Source (VCCS) 
H  CurrentControlled Voltage Source (CCVS) 
I  Independent Current Source 
J  Junction FieldEffect Transistor (JFET) 
K  Coupled Inductors 
L  Inductors 
M  MOS FieldEffect Transistor (MOSFET) 
Q  Bipolar Junction Transistor (BJT) 
R  Resistor 
V  Independent Voltage Source 
SPICE considers the current always flows from the positive node through the element
to the negative node.
Element  Spice Description 
Rname n+ n value  
Lname n+ n value 

Cname n+ n value 
where
Name  Parameter  Units  Default 
TC1  Firstorder temperature coefficient  1/^{o}C  0.0 
TC2  Secondorder temperature coefficient  1/(^{o}C)^{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:
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(T_{o})*(1 + TC1*(TT_{o}) + TC2*(TT_{o})^{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*V^{2} + ...
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*I^{2} + ...
Two inductors are mutually linked, can be described by their own element lines, then the coupling can be described as:
Kname Lname1 Lname2 value
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 ... >>>
Iname n+ n <<DC> value> <AC <ac_arg <ac_phase>>>
+ <TRAN_function <value1 <value2 ... >>>
The polarity conventions are shown below: