MacSpice > User's Guide > Circuit Elements and Models

MacSpice User's Guide

3 CIRCUIT ELEMENTS AND MODELS

Data fields that are delimited with square brackets '[ ... ]' are optional. All indicated punctuation (parentheses, equal signs, etc.) is optional but indicate the presence of any delimiter. Further, future implementations may require the punctuation as stated. A consistent style adhering to the punctuation shown here makes the input easier to understand. With respect to branch voltages and currents, Spice uniformly uses the associated reference convention (current flows in the direction of voltage drop). Where power is used as an instance parameter the passive sign convention is used, i.e. positive when energy is being transferred into the device from the circuit.

3.1 ELEMENTARY DEVICES

3.1.1 Resistors

General form:

     RXXXXXXX N1 N2 VALUE

Examples:

     R1 1 2 100
     RC1 12 17 1K

N1 and N2 are the two element nodes. VALUE is the resistance (in ohms) and may be positive or negative but not zero.

3.1.2 Semiconductor Resistors

General form:

     RXXXXXXX N1 N2 [VALUE] [ MNAME [L=LENGTH] [W=WIDTH] [TEMP=TEMP] ]

Examples:

     RLOAD 2 10 10K
     RMOD 3 7 RMODEL L=10u W=1u

This is the more general form of the resistor presented in section 3.1.1, and allows the modelling of temperature effects and for the calculation of the actual resistance value from strictly geometric information and the specifications of the process. If VALUE is specified, it overrides the geometric information and defines the resistance. If MNAME is specified, then the resistance may be calculated from the process information in the model MNAME and the given LENGTH and WIDTH. If VALUE is not specified, then MNAME and LENGTH must be specified. If WIDTH is not specified, then it is taken from the default width given in the model. The (optional) TEMP value is the temperature at which this device is to operate, and overrides the temperature specification on the .OPTION control line.

3.1.3 Semiconductor Resistor Model (R)

The resistor model consists of process-related device data that allow the resistance to be calculated from geometric information and to be corrected for temperature. The parameters available are:

NameParameterUnitsDefaultExample
TC1First order temperature coeff.Ω °C−10.0-
TC2Second order temperature coeff.Ω °C−20.0-
RSHSheet resistanceΩ/[]-50
DEFWDefault widthm1.0×10−62e-6
NARROWNarrowing due to side etchingm0.01e-7
TNOMParameter measurement temperature°C2750

The sheet resistance is used with the narrowing parameter and L and W from the resistor device to determine the nominal resistance by the formula:

$$ R = RSH {{ L - { \it NARROW } } \over {W - { \it NARROW } } } $$

DEFW is used to supply a default value for W if one is not specified for the device. If either RSH or L is not specified, then the standard default resistance value of 1 kΩ is used. TNOM is used to override the circuit-wide value given on the .OPTIONS control line where the parameters of this model have been measured at a different temperature. After the nominal resistance is calculated, it is adjusted for temperature by the formula:

$$ R(T) = R(T_0 ) [ 1 + T_{\rm C1} (T - T_0 ) + T_{\rm C2} (T - T_0)^2 ]. $$

3.1.4 Capacitors

General form:

     CXXXXXXX N+ N− VALUE [IC=INCOND]

Examples:

     CBYP 13 0 1UF
     COSC 17 23 10U IC=3V

N+ and N− are the positive and negative element nodes, respectively. VALUE is the capacitance in farads.

The (optional) initial condition is the initial (time-zero) value of capacitor voltage (in volts). Note that the initial conditions (if any) apply 'only' if the UIC option is specified on the .TRAN control line.

3.1.5 Semiconductor Capacitors

General form:

     CXXXXXXX N+ N− [VALUE] [ MNAME [L=LENGTH] [W=WIDTH] ] [IC=INCOND]

Examples:

     CLOAD 2 10 10P
     CMOD 3 7 CMODEL L=10u W=1u

This is the more general form of the capacitor presented in section 3.1.4, and allows for the calculation of the actual capacitance value from strictly geometric information and the specifications of the process. If VALUE is specified, it defines the capacitance. If MNAME is specified, then the capacitance is calculated from the process information in the model MNAME and the given length and width. If VALUE is not specified, then MNAME and L must be specified. If W is not specified, then it is taken from the default width given in the model. Either VALUE or MNAME, L, and W may be specified, but not both sets.

3.1.6 Semiconductor Capacitor Model (C)

The capacitor model contains process information that may be used to compute the capacitance from strictly geometric information.

NameParameterUnitsDefaultExample
CJJunction bottom capacitanceF m−1-5e-5
CJSWJunction sidewall capacitanceF m−1-2e-11
DEFWDefault device widthm1.0×10−62e-6
NARROWNarrowing due to side etchingm0.01e-7

The capacitor has a capacitance computed as

$$ \begin{align*} C = C_{\rm J} \times ( {\it LENGTH } - {\it NARROW} ) \times ( {\it WIDTH} - {\it NARROW} )\\ + 2 C_{\rm JSW} \times ({\it LENGTH } + {\it WIDTH} - 2 \cdot {\it NARROW}) \end{align*} $$

3.1.7 Inductors

General form:

     LYYYYYYY N+ N− VALUE [IC=INCOND]

Examples:

     LLINK 42 69 1UH
     LSHUNT 23 51 10U IC=15.7MA

N+ and N− are the positive and negative element nodes, respectively. VALUE is the inductance in henries.

The (optional) initial condition is the initial (time-zero) value of inductor current (in amps) that flows from N+, through the inductor, to N−. Note that the initial conditions (if any) apply only if the UIC option is specified on the .TRAN analysis line.

3.1.8 Coupled (Mutual) Inductors

General form:

     KXXXXXXX LYYYYYYY LZZZZZZZ VALUE

Examples:

     K43 LAA LBB 0.999
     KXFRMR L1 L2 0.87

LYYYYYYY and LZZZZZZZ are the names of the two coupled inductors, and VALUE is the coefficient of coupling, K, which must be in the range −1 ≤ K ≤ +1. Using the 'dot' convention, place a 'dot' on the first node of each inductor. When there are three or more coupled inductors in a system, some sets of coupling values are physically impossible because the magnetic fields would violate energy conservation. MacSpice uses an eigen-value analysis of the coupling matrix to detect such conditions and issue appropriate warnings.

3.1.9 Switches

General form:

     SXXXXXXX N+ N− NC+ NC- MODEL [ON|OFF]
     WYYYYYYY N+ N− VNAM MODEL [ON|OFF]

Examples:

     s1 1 2 3 4 switch1 ON
     s2 5 6 3 0 sm2 off
     Switch1 1 2 10 0 smodel1
     w1 1 2 vclock switchmod1
     W2 3 0 vramp sm1 ON
     wreset 5 6 vclck lossyswitch OFF

N+ and N− are the nodes between which the switch terminals are connected. The model name is mandatory while the initial conditions are optional. For the voltage controlled switch, NC+ and NC- are the positive and negative controlling nodes respectively. For the current controlled switch, the controlling current is that through the specified voltage source VNAM. The direction of positive controlling current flow is from the positive node, through the source, to the negative node.

3.1.10 Switch Model (SW/CSW)

Examples:

     .model switch1 sw ( vt=0.5 vh=0 )
     .model lossyswitch csw ( it=0.5 ron=10 roff=1MEG )

The switch model allows an almost ideal switch to be described in Spice. The switch is not quite ideal, in that the resistance can not change from 0 to infinity, but must always have a finite positive value. By proper selection of the on and off resistances, they can be effectively zero and infinity in comparison to other circuit elements. The parameters available are:

NameParameterUnitsDefaultSwitch
VTThreshold voltageV0.0S
ITThreshold currentA0.0W
VHHysteresis voltageV0.0S
IHHysteresis currentA0.0W
RONOn resistanceΩ1.0both
ROFFOff resistanceΩ1/GMIN*both

*(See the .OPTIONS control line for a description of GMIN, its default value results in an off-resistance of 1.0 TΩ.)

The use of an ideal element that is highly nonlinear such as a switch can cause large discontinuities to occur in the circuit node voltages. A rapid change such as that associated with a switch changing state can cause numerical roundoff or tolerance problems leading to erroneous results or timestep difficulties. The user of switches can improve the situation by taking the following steps:

First, it is wise to set ideal switch impedances just high or low enough to be negligible with respect to other circuit elements. Using switch impedances that are close to 'ideal' in all cases aggravates the problem of discontinuities mentioned above. Of course, when modelling real devices such as MOSFETS, the on resistance should be adjusted to a realistic level depending on the size of the device being modeled.

If a wide range of ON to OFF resistance must be used in the switches (ROFF/RON > 109), then the tolerance on errors allowed during transient analysis may need to be decreased by using the .OPTIONS control line and specifying TRTOL to be less than the MacSpice default value of 1.0. should be decreased by using the .OPTIONS control line and specifying TRTOL to be less than the default value of 7.0. When switches are placed around capacitors, then the option CHGTOL should also be reduced. Suggested values for these two options are 0.15 1.0 and 1e-16 respectively. These changes help Spice to be more careful around the switch points so that no errors are made due to the rapid change in the circuit.

3.2 VOLTAGE AND CURRENT SOURCES

3.2.1 Independent Sources

General form:

     VXXXXXXX N+ N− [[DC] DCVALUE] [AC [ACMAG [ACPHASE]]]
     +       [DISTOF1 [F1MAG [F1PHASE]]] [DISTOF2 [F2MAG [F2PHASE]]]
     IYYYYYYY N+ N− [[DC] DCVALUE] [AC [ACMAG [ACPHASE]]]
     +       [DISTOF1 [F1MAG [F1PHASE]]] [DISTOF2 [F2MAG [F2PHASE]]]

Examples:

     VCC 10 0 DC 6
     VIN 13 2 0.001 AC 1 SIN(0 1 1MEG)
     ISRC 23 21 AC 0.333 45.0 SFFM(0 1 10K 5 1K)
     VMEAS 12 9
     VCARRIER 1 0 DISTOF1 0.1 -90.0
     VMODULATOR 2 0 DISTOF2 0.01
     IIN1 1 5 AC 1 DISTOF1 DISTOF2 0.001

N+ and N− are the positive and negative nodes, respectively. Note that sources need not be grounded. For both voltage and current sources, a positive current is one that flows into the positive node, through the source, and out of the negative node. Voltage sources, in addition to being used for circuit excitation, are the 'ammeters' for SPICE, that is, zero valued voltage sources may be inserted into the circuit for the purpose of measuring current. They of course have no effect on circuit operation since they represent short-circuits.

DCVALUE is the DC and transient analysis value of the source. If the source value is zero both for DC and transient analyses, this value may be omitted. If the source value is time-invariant (e.g., a power supply), then the value may optionally be preceded by the letters DC. The letters 'DC' to identify the time-invariant value are optional but recommended (for clarity).

ACMAG is the AC magnitude and ACPHASE is the AC phase. The source is set to this value in the ac analysis. If ACMAG is omitted following the keyword 'AC', a value of unity is assumed. If ACPHASE is omitted, a value of zero is assumed. If the source is not an ac small-signal input, the keyword 'AC' and the AC values are omitted.

The keywords 'DISTOF1' and 'DISTOF2' specify that the independent source has distortion inputs at the frequencies F1 and F2 respectively (see the description of the .DISTO control line). The keywords may be followed by an optional magnitude and phase. The default values of the magnitude and phase are 1.0 and 0.0 respectively.

Any independent source can be assigned a time-dependent value for transient analysis. If a source is assigned a time-dependent value, the time-zero value is used by the DC analysis that initialises a transient analysis. There are five independent source functions: pulse, exponential, sinusoidal, piece-wise linear, and single-frequency FM. If parameters other than source values are omitted or set to zero, the default values shown are assumed. Here, TSTEP and TSTOP are the transient analysis parameters, see .TRAN for details. In normal circumstances, the time-zero value for the function should match the DCVALUE specified for the source.

3.2.1.1. Pulse

General form:

     PULSE(V1 V2 TD TR TF PW PER)

Examples:

     VIN 3 0 PULSE(-1 1 2NS 2NS 2NS 50NS 100NS)
ParameterDefinitionDefault valueUnits
V1Initial value V or A
V2Pulsed value V or A
TDDelay time0.0s
TRRise timeTSTEPs
TFFall timeTSTEPs
PWPulse widthTSTOPs
PERPeriodTSTOPs

A single pulse so specified is described by the following table:

TimeValue
0 V1
TD V1
TD+TR V2
TD+TR+PW V2
TD+TR+PW+TF V1
TSTOP V1

Intermediate points are determined by linear interpolation.

3.2.1.2 Sinusoidal

General form:

     SIN(VO VA FREQ TD THETA)

Examples:

     VIN 3 0 SIN(0 1 100MEG 1NS 1E10)

ParametersDefinitionDefault valueUnits
VOOffset V or A
VAAmplitude V or A
FREQFrequency1/TSTOPHz
TDDelay0.0s
THETADamping factor0.0s−1

The shape of the waveform is described by the following table:

Time, tValue
0 to TDVO
TD to TSTOP VO+VA · sin(2π×FREQ×[tTD]) · exp([TDtTHETA)
3.2.1.3 Exponential

General form:

     EXP(V1 V2 TD1 TAU1 TD2 TAU2)

Examples:

     VIN 3 0 EXP(-4 -1 2NS 30NS 60NS 40NS)
ParametersDefinitionDefault valueUnits
V1Initial value V or A
V2Pulsed value V or A
TD1Rise delay time0.0s
TAU1Rise time constantTSTEPs
TD2Fall delay timeTD1+TSTEPs
TAU2Fall time constantTSTEPs

The shape of the waveform is described by the following table:

Time, tValue
0 to TD1V1
TD1 to TD2V2+(V1V2) · (exp([TD1t]/TAU1)
TD2 to TSTOPV1+(V1V2) · exp([TD1t]/TAU1)+(V2V1) · exp([TD2t]/TAU2)
3.2.1.4 Piece-Wise Linear

General form:

     PWL(T1 VAL1 [T2 VAL2 T3 VAL3 ... TN VALN ])

Examples:

     VCLOCK 7 5 PWL(0 -7 10NS -7 11NS -3 17NS -3 18NS -7 50NS -7)

Each pair of arguments (Ti, VALi) specifies a value for the source VALi (in volts or amps) at time Ti. The times must increase strictly monotonically. Prior to T1 the source value is VAL1, and after TN the source remains at VALN. Between specified timepoints, the value is determined by linear interpolation.

3.2.1.5 Single-Frequency FM

General form:

     SFFM(VO VA FC MDI FS)

Examples:

     V1 12 0 SFFM(0 1M 20K 5 1K)
ParameterDefinitionDefault valueUnits
VOOffset-volts or amps
VAAmplitude-volts or amps
FCCarrier frequency1/TSTOPHz
MDIModulation index--
FSSignal frequency1/TSTOPHz

The shape of the waveform is described by the following equation:

V(t) = VO+VA · sin(2π · FC · t+MDI · sin[2π · FS · t])

Note that it is the phase, not the frequency, that is modulated at the carrier frequency. Hence, these parameters should normally be thought of as defining a 'phase modulated' or 'double frequency modulated' behaviour.

3.2.2 Linear Dependent Sources

SPICE allows circuits to contain linear dependent sources characterized by any of the four equations:

i = g · v v = e · v i = f · i v = h · i

where g, e, f, and h are constants representing transconductance, voltage gain, current gain, and transresistance, respectively.

3.2.2.1 Linear Voltage-Controlled Current Sources

General form:

     GXXXXXXX N+ N− NC+ NC- VALUE

Examples:

     G1 2 0 5 0 0.1MMHO

N+ and N− are the positive and negative nodes, respectively. Current flow is from the positive node, through the source, to the negative node. NC+ and NC- are the positive and negative controlling nodes, respectively. VALUE is the transconductance (in mhos).

3.2.2.2 Linear Voltage-Controlled Voltage Sources

General form:

     EXXXXXXX N+ N− NC+ NC- VALUE

Examples:

     E1 2 3 14 1 2.0

N+ is the positive node, and N− is the negative node. NC+ and NC- are the positive and negative controlling nodes, respectively. VALUE is the voltage gain.

3.2.2.3 Linear Current-Controlled Current Sources

General form:

     FXXXXXXX N+ N− SRCNAM VALUE

Examples:

     F1 13 5 VSENS 5

N+ and N− are the positive and negative nodes, respectively. Current flow is from the positive node, through the source, to the negative node. SRCNAM is the name of a source device through which the controlling current flows. In the common case of a voltage source, the direction of positive controlling current flow is from the positive node, through the source, to the negative node. VALUE is the current gain.

3.2.2.4 Linear Current-Controlled Voltage Sources

General form:

     HXXXXXXX N+ N− SRCNAM VALUE

Examples:

     HX 5 17 VZ 0.5K

N+ and N− are the positive and negative nodes, respectively. SRCNAM is the name of a source device through which the controlling current flows. In the common case of a voltage source, the direction of positive controlling current flow is from the positive node, through the source, to the negative node. VALUE is the transresistance (in ohms).

3.2.3 Non-linear Dependent Sources

General form:

     BXXXXXXX N+ N− [ I=EXPR | V=EXPR ]

Examples:

     B1 0 1 I=cos(v(1))+sin(v(2))
     B2 2 3 V=ln(cos(log(v(1,2)^2)))-v(3)^4+v(2)^v(1)
     B3 4 5 I=17
     B4 6 7 V=exp(pi^i(vdd))

N+ is the positive node, and N− is the negative node. The values of the V and I parameters determine the voltages and currents across and through the device, respectively. If I is given then the device is a current source, and if V is given the device is a voltage source. One and only one of these parameters must be given.

MacSpice translates the poly() syntax used in Spice 2 (see Appendix C) into a Spice 3 compatible equivalent, normally a nonlinear 'B' source. [Note: The Spice 3 non-linear sources are not compatible with the poly() syntax used in Spice 2. Appendix C is included to facilitate conversion of old source.]

The small-signal AC behavior of the nonlinear source is a linear dependent source (or sources) with a proportionality constant equal to the derivative (or derivatives) of the source at the DC operating point.

The expressions given for V and I may be any function of voltages and currents through voltage sources in the system. The following functions of real variables are defined:

abs()sgn()u()uramp()  
exp()expm1()ln()ln1p()log()sqrt()
cos()sin()tan()acos()asin()atan()
cosh()sinh()tanh()acosh()asinh()atanh()

Functions expm1(x) and ln1p(x) calculate exp(x)-1 and ln(1+x) respectively with high precision for small values of x.

The function abs() takes the absolute value, sgn() is the sign function, u() is the unit-step function, and uramp() is the integral of the unit step:

 x < 0.0x = 0.0x > 0.0
abs(x)x0.0x
sgn(x)−10+1
u(x)0.00.51.0
uramp(x)0.00.0x

These functions are useful in synthesizing piece-wise non-linear functions, though convergence may be adversely affected.

The following standard operators are defined:

 +  −  *  /  ^  unary −

If the argument of log(), ln(), or sqrt() becomes less than zero, the absolute value of the argument is used. If a divisor becomes zero or the argument of log() or ln() becomes zero, an error will result. Other problems may occur when the argument for a function in a partial derivative enters a region where that function is undefined. If the argument of sqrt() becomes negative, a divisor becomes zero or the argument of log() or ln() becomes zero or negative, an error will result. Other problems may occur when the argument for a function in a partial derivative enters a region where that function is undefined.

To get time into the expression you can integrate the current from a constant current source with a capacitor and use the resulting voltage (don't forget to set the initial voltage across the capacitor). Nonlinear resistors, capacitors, and inductors may be synthesized with the nonlinear dependent source. Nonlinear resistors are obvious. Nonlinear capacitors and inductors are implemented with their linear counterparts by a change of variables implemented with the nonlinear dependent source. The following subcircuit will implement a nonlinear capacitor:

     .Subckt nlcap   pos neg
     * Bx: calculate f(input voltage)
     Bx   1    0    v = f(v(pos,neg))
     * Cx: linear capacitance
     Cx   2    0    1
     * Vx: Ammeter to measure current into the capacitor
     Vx   2    1    DC 0volts
     * Drive the current through Cx back into the circuit
     Fx   pos  neg  Vx 1
     .ends

Non-linear inductors are similar.

3.3 TRANSMISSION LINES

Transmission line elements need to be used with care. Typically, the element models only one propagating mode. This is an issue because electrical transmission lines usually have more than one mode. For example, a length of coaxial cable, has two modes (inner-shield and shield-ground) and a simple pair of wires also has two modes (differential and common). The example file 'ltra3.cir' shows what is required to simulate a pair of wires using a single-mode model. Refer to [8] for the details of the calculations required. Only the transmission of the voltage and current between N1 and N3 is represented by single-mode elements, N2 and N4 are merely the respective current mirrors of these.

Although the tables below imply that all lengths must be given in metres, this is not the case; any standard may be used provided it is used consistently for the 'per unit length' parameters.

Consider sacrificing compatibility with Spice3 and using the TXL model (§3.3.6.1) and CPL model (§3.3.6.2) devices for modelling a single lossy transmission line and a coupled multiconductor line system, respectively. These elements use the recursive convolution method and were originally developed for KSpice and can effectively replace the much slower LTRA model, which uses a state-based approach.

3.3.1 Lossless Transmission Lines

General form:

     TXXXXXXX N1 N2 N3 N4 Z0=VALUE [TD=VALUE] [ F=FREQ [NL=NRMLEN] ]
     +                    [IC=V1, I1, V2, I2]

Examples:

     T1 1 0 2 0 Z0=50 TD=10NS

N1 and N2 are the nodes at port 1; N3 and N4 are the nodes at port 2. Z0 is the characteristic impedance. The length of the line may be expressed in either of two forms. The transmission delay, TD, may be specified directly (as TD=10ns, for example). Alternatively, a frequency F may be given, together with NL, the normalized electrical length of the transmission line with respect to the wavelength in the line at the frequency F. If a frequency is specified but NL is omitted, 0.25 is assumed (that is, the frequency is assumed to be the quarter-wave frequency). Note that although both forms for expressing the line length are indicated as optional, one of the two must be specified.

Note that this element models only one propagating mode. If all four nodes are distinct in the actual circuit, then two modes may be excited. To simulate such a situation, two transmission-line elements are required. (see the example in Appendix A for further clarification.)

The (optional) initial condition specification consists of the voltage and current at each of the transmission line ports. Note that the initial conditions (if any) apply 'only' if the UIC option is specified on the .TRAN control line.

Note that a lossy transmission line (see §3.3.2) with its loss set to zero may be more accurate than the lossless transmission line due to implementation details.

3.3.2 Lossy Transmission Lines

General form:

     OXXXXXXX N1 N2 N3 N4 MNAME

Examples:

     O23 1 0 2 0 LOSSYMOD
     OCONNECT 10 5 20 5 INTERCONNECT

This is a two-port convolution model for single-conductor lossy transmission lines. N1 and N2 are the nodes at port 1; N3 and N4 are the nodes at port 2. Note that a lossy transmission line with zero loss may be more accurate than the lossless transmission line due to implementation details.

3.3.3 Lossy Transmission Line Model (LTRA)

The uniform RLC/RC/LC/RG transmission line model (referred to as the LTRA model henceforth) models a uniform constant-parameter distributed transmission line. The RC and LC cases may also be modelled using the URC and TRA models; however, the newer LTRA model is usually faster and more accurate than these, but is slower than the KSpice CPL/TXL models. The operation of the LTRA model is based on the convolution of the transmission line's impulse responses with its inputs (see [8]).

The LTRA model takes a number of parameters, some of which must be given and some of which are optional.

There is a bug in Spice 3f5 that means that an .AC analysis of the LTRA model only gives correct results in cases when LEN=1.0 . This has been fixed in MacSpice, but code portable to Spice 3 is possible by setting LEN=1.0 and entering values for L, C, etc. for the whole line, not per unit length.

NameParameterUnits/typeDefaultExample
RResistance/lengthΩ m−10.00.2
LInductance/lengthH m−10.09.13e-9
GConductance/lengthS m−10.00.0
CCapacitance/lengthF m−10.03.65e-12
LENLength of linemNo default1.0
RELBreakpoint control 10.5
ABSBreakpoint control 15
NOSTEPLIMITDon't limit timestep to less than line delayflagNot setSet
NOCONTROLDon't do complex timestep controlflagNot setSet
LININTERPUse linear interpolationflagNot setSet
MIXEDINTERPUse linear when quadratic seems badflagNot setSet
COMPACTRELSpecial reltol for history compaction RELTOL1.0e-3
COMPACTABSSpecial abstol for history compaction ABSTOL1.0e-9
TRUNCNRUse Newton-Raphson method for timestep controlflagNot setSet
TRUNCDONTCUTDon't limit timestep to keep impulse-response errors lowflagNot setSet

The following types of lines have been implemented so far: RLC (uniform transmission line with series loss only), RC (uniform RC line), LC (lossless transmission line), and RG (distributed series resistance and parallel conductance only). Any other combination will yield erroneous results and should not be tried. The length LEN of the line must be specified.

NOSTEPLIMIT is a flag that will remove the default restriction of limiting time-steps to less than the line delay in the RLC case. NOCONTROL is a flag that prevents the default limiting of the time-step based on convolution error criteria in the RLC and RC cases. This speeds up simulation but may in some cases reduce the accuracy of results. LININTERP is a flag that, when specified, will use linear interpolation instead of the default quadratic interpolation for calculating delayed signals. MIXEDINTERP is a flag that, when specified, uses a metric for judging whether quadratic interpolation is not applicable and if so uses linear interpolation; otherwise it uses the default quadratic interpolation. TRUNCDONTCUT is a flag that removes the default cutting of the time-step to limit errors in the actual calculation of impulse-response related quantities. COMPACTREL and COMPACTABS are quantities that control the compaction of the past history of values stored for convolution. Larger values of these lower accuracy but usually increase simulation speed. These are to be used with the TRYTOCOMPACT option, described in the .OPTIONS section. TRUNCNR is a flag that turns on the use of Newton-Raphson iterations to determine an appropriate timestep in the timestep control routines. The default is a trial and error procedure by cutting the previous timestep in half. REL and ABS are quantities that control the setting of breakpoints.

The option most worth experimenting with for increasing the speed of simulation is REL. The default value of 1 is usually safe from the point of view of accuracy but occasionally increases computation time. A value greater than 2 eliminates all breakpoints and may be worth trying depending on the nature of the rest of the circuit, keeping in mind that it might not be safe from the viewpoint of accuracy. Breakpoints may usually be entirely eliminated if it is expected the circuit will not display sharp discontinuities. Values between 0 and 1 are usually not required but may be used for setting many breakpoints.

COMPACTREL may also be experimented with when the option TRYTOCOMPACT is specified in a .OPTIONS control line. The legal range is between 0 and 1. Larger values usually decrease the accuracy of the simulation but in some cases improve speed. If TRYTOCOMPACT is not specified on a .OPTIONS control line, history compaction is not attempted and accuracy is high. NOCONTROL, TRUNCDONTCUT and NOSTEPLIMIT also tend to increase speed at the expense of accuracy.

3.3.4 Uniform Distributed RC Lines (Lossy)

General form:

     UXXXXXXX N1 N2 N3 MNAME L=LEN [N=LUMPS]

Examples:

     U1 1 2 0 URCMOD L=50U
     URC2 1 12 2 UMODL l=1MIL N=6

N1 and N2 are the two element nodes the RC line connects, while N3 is the node to which the capacitances are connected. MNAME is the model name, LEN is the length of the RC line in meters. If N is specified, LUMPS is the number of lumped segments to use in modelling the RC line (see the model description for the action taken if this parameter is omitted).

3.3.5 Uniform Distributed RC Model (URC)

The URC model is derived from a model proposed by L. Gertzberg in 1974. The model is accomplished by a subcircuit type expansion of the URC line into a network of lumped RC segments with internally generated nodes. The length represented by each segments increases in a geometric progression toward the middle of the URC line, with K as the ratio between adjacent segments. The number of lumped segments used, if not specified for the URC line device, is determined by the following formula:

$$ N = { { \log \left[ F_{\rm max} {R \over L}{C \over L} 2\pi L^2 \left({K-1 \over K}\right)^2\right]} \over {\log(K)} } $$

The URC line is made up strictly of resistor and capacitor segments unless the ISPERL parameter is given a non-zero value, in which case the capacitors are replaced with reverse biased diodes with a zero-bias junction capacitance equivalent to the capacitance replaced, and with a saturation current of ISPERL in amps per meter of transmission line and an optional series resistance equivalent to RSPERL in ohms per meter.

NameParameterUnitsDefaultExampleArea
KProportionality constant-1.51.2-
FMAXMaximum frequency of interestHz1.0 G6.5Meg-
RPERLResistance per unit lengthΩ m−1100010-
CPERLCapacitance per unit lengthF m−110−12123p-
ISPERLDiode saturation current per unit lengthA m−10--
RSPERLDiode resistance per unit lengthΩ m−10--

3.3.6 KSpice Transmission Line Models

WARNING! These devices are installed in MacSpice but have not had extensive validation. They only implement the op, dc and tran analyses. Please report bugs.

General form:

    YXXXXXXX N1 N2 N3 N4 MNAME [LENGTH = LEN]
    PXXXXXXX W1A [W2A ... ] W1B [W2B ... ] MNAME [LENGTH = LEN]

Examples (TXL):

     Y2 2 0 3 0 YMOD3
     Y3 APLUS AMINUS BPLUS BMINUS YMOD3 LENGTH=45

Examples (CPL):

     P1  2  3  4  5  0  22  33  44  55  0  LOSSYMODEL
     P3 IN1 IN2 IN3 OUT1 OUT2 OUT3 PMODXX LENGTH=45mm

The value of LEN is the line-length in metres. In the TXL case, N1 and N2 are the nodes at port 1; N3 and N4 are the nodes at port 2. In the CPL case, WnA and WnB are the two ends of the nth conductor.

If backwards compatibility with Spice3 is not required, these elements — which use a recursive convolution method of calculation and were originally developed for KSpice — can potentially replace the LTRA model, which uses a much slower state-based approach.

3.3.6.1 Simple Lossy Transmission Model (TXL)

Example:

    .MODEL YMOD TXL R=12.45 L=8.972e-9 G=0 C=0.468e-12 LENGTH=16

Note that the Y-element models only one propagating mode using the following parameters:

NameParameterUnitsDefaultExample
TXLFlag indicates model type---
RResistance per unit lengthΩ m−10.010
LInductance per unit lengthH m−10.00.3u
GConductance per unit lengthS m−10.012m
CCapacitance per unit lengthF m−10.01p
LENGTHLengthm0.06.5mm
3.3.6.2 Simple Coupled Multiconductor Model (CPL)

Example:

    .MODEL LOSSYMODEL CPL
	+R=11.8      0        0        0 
	+           11.8      0        0 
	+                    11.8      0  
	+                             11.8
	+L=354n     213n      0        0
	+           354n    213n       0
	+                   354n     213n
	+                            354n
	+G=0 0 0 0 0 0 0 0 0 0
	+C=138p     -11.8p    0        0
	+           138p    -11.8p     0    
	+                   138p     -11.8p
	+                            138p
	+length=0.16

The P-element models multiple modes using the following parameters:

NameParameterUnitsDefaultExample
CPLFlag indicates model type---
RResistance matrix per unit lengthΩ m−10.010
LInductance matrix per unit lengthH m−10.0265n
GConductance matrix per unit lengthS m−10.012m
CCapacitance matrix per unit lengthF m−10.0300p
LENGTHLengthm0.06.5mm

Up to 4-wires plus ground can be specified. As this is a multiconductor system the upper-diagonal elements of the mutual inductance / capacitance / conductance matrices must be specified.

3.4 TRANSISTORS AND DIODES

The area factor used on the diode, BJT, JFET, and MESFET devices determines the number of equivalent parallel devices of a specified model. The affected parameters are marked with an asterisk under the heading 'area' in the model descriptions below. Several geometric factors associated with the channel and the drain and source diffusions can be specified on the MOSFET device line.

Two different forms of initial conditions may be specified for some devices. The first form is included to improve the dc convergence for circuits that contain more than one stable state. If a device is specified OFF, the dc operating point is determined with the terminal voltages for that device set to zero. After convergence is obtained, the program continues to iterate to obtain the exact value for the terminal voltages. If a circuit has more than one dc stable state, the OFF option can be used to force the solution to correspond to a desired state. If a device is specified OFF when in reality the device is conducting, the program still obtains the correct solution (assuming the solutions converge) but more iterations are required since the program must independently converge to two separate solutions. The .NODESET control line serves a similar purpose as the OFF option. The .NODESET option is easier to apply and is the preferred means to aid convergence.

The second form of initial conditions are specified for use with the transient analysis. These are true 'initial conditions' as opposed to the convergence aids above. See the description of the .IC control line and the .TRAN control line for a detailed explanation of initial conditions.

3.4.1 Junction Diodes

General form:

     DXXXXXXX N+ N− MNAME [AREA] [OFF] [IC=VD] [TEMP=T]

Examples:

     DBRIDGE 2 10 DIODE1
     DCLMP 3 7 DMOD 3.0 IC=0.2

N+ and N− are the positive (anode) and negative (cathode) nodes, respectively. MNAME is the model name, AREA is the area factor, and OFF indicates an (optional) starting condition on the device for dc analysis. If the area factor is omitted, a value of 1.0 is assumed. The (optional) initial condition specification using IC=VD is intended for use with the UIC option on the .TRAN control line, when a transient analysis is desired starting from other than the quiescent operating point. The (optional) TEMP value is the temperature at which this device is to operate, and overrides the temperature specification on the .OPTION control line.

3.4.2 Diode Model (D)

The dc characteristics of the diode are determined by the parameters IS and N. An ohmic resistance, RS, is included. Charge storage effects are modeled by a transit time, TT, and a nonlinear depletion layer capacitance that is determined by the parameters CJO, VJ, and M. The temperature dependence of the saturation current is defined by the parameters EG, the energy and XTI, the saturation current temperature exponent. The nominal temperature at which these parameters were measured is TNOM, which defaults to the circuit-wide value specified on the .OPTIONS control line. Reverse breakdown is modeled by an exponential increase in the reverse diode current and is determined by the parameters BV and IBV (both of which are positive numbers).

NameParameterUnitsDefaultExampleArea
ISSaturation currentA1.0e-141.0e-14*
RSOhmic resistanceΩ010*
NEmission coefficient-11.0 
TTTransit-times00.1ns 
CJOZero-bias junction capacitanceF02pF*
VJJunction potentialV10.6 
MGrading coefficient-0.50.5 
EGActivation energyeV1.111.11 Si
0.69 Sbd
0.67 Ge
 
XTISaturation-current temperature exponent-3.03.0 jn
2.0 Sbd
 
KFFlicker noise coefficient-0  
AFFlicker noise exponent-1  
FCCoefficient for forward-bias depletion capacitance formula-0.5  
BVReverse breakdown voltageV40.0 
IBVCurrent at breakdown voltageA1.0e-3  
TNOMParameter measurement temperature°C2750 

3.4.3 Bipolar Junction Transistors (BJTs)

General form:

     QXXXXXXX NC NB NE [NS] MNAME [AREA] [OFF] [IC=VBE, VCE] [TEMP=T]

Examples:

     Q23 10 24 13 QMOD IC=0.6, 5.0
     Q50A 11 26 4 20 MOD1

NC, NB, and NE are the collector, base, and emitter nodes, respectively. NS is the (optional) substrate node. If unspecified, ground is used. MNAME is the model name, AREA is the area factor, and OFF indicates an (optional) initial condition on the device for the DC analysis. If the area factor is omitted, a value of 1.0 is assumed. The (optional) initial condition specification using IC=VBE, VCE is intended for use with the UIC option on the .TRAN control line, when a transient analysis is desired starting from other than the quiescent operating point. See the .IC control line description for a better way to set transient initial conditions. The (optional) TEMP value is the temperature at which this device is to operate, and overrides the temperature specification on the .OPTION control line.

3.4.4 BJT Models (NPN/PNP)

The bipolar junction transistor model in Spice is an adaptation of the integral charge control model of Gummel and Poon. This modified Gummel-Poon model extends the original model to include several effects at high bias levels. The model automatically simplifies to the simpler Ebers-Moll model when certain parameters are not specified. The parameter names used in the modified Gummel-Poon model have been chosen to be more easily understood by the program user, and to reflect better both physical and circuit design thinking.

The dc model is defined by the parameters IS, BF, NF, ISE, IKF, and NE, which determine the forward current gain characteristics, IS, BR, NR, ISC, IKR, and NC, which determine the reverse current gain characteristics, and VAF and VAR, which determine the output conductance for forward and reverse regions. Three ohmic resistances RB, RC, and RE are included, where RB can be high current dependent. Base charge storage is modeled by forward and reverse transit times, TF and TR, the forward transit time TF being bias dependent if desired, and nonlinear depletion layer capacitances that are determined by CJE, VJE, and MJE for the B-E junction, CJC, VJC, and MJC for the B-C junction and CJS, VJS, and MJS for the C-S (Collector-Substrate) junction. The temperature dependence of the saturation current, IS, is determined by the energy-gap, EG, and the saturation current temperature exponent, XTI. Additionally base current temperature dependence is modeled by the beta temperature exponent XTB in the new model. The values specified are assumed to have been measured at the temperature TNOM, which can be specified on the .OPTIONS control line or overridden by a specification on the .MODEL line.

The BJT parameters used in the modified Gummel-Poon model are listed below. The parameter names used in earlier versions of Spice 2 are still accepted.

Modified Gummel-Poon BJT Parameters.

NameParameterUnitsDefaultExampleArea
ISTransport saturation currentA1.0e-161.0e-15*
BFIdeal maximum forward beta-100100 
NFForward current emission coefficient-1.01 
VAFForward Early voltageV200 
IKFCorner for forward beta high current roll-offA0.01*
ISEB-E leakage saturation currentA01.0e-13*
NEB-E leakage emission coefficient-1.52 
BRIdeal maximum reverse beta-10.1 
NRReverse current emission coefficient-11 
VARReverse Early voltageV200 
IKRCorner for reverse beta high current roll-offA0.01*
ISCB-C leakage saturation currentA01.0e-13*
NCB-C leakage emission coefficient-21.5 
RBZero bias base resistanceΩ0100*
IRBCurrent where base resistance falls halfway to its min valueA0.1*
RBMMinimum base resistance at high currentsΩRB10*
REEmitter resistanceΩ01*
RCCollector resistanceΩ010*
CJEB-E zero-bias depletion capacitanceF02pF*
VJEB-E built-in potentialV0.750.6 
MJEB-E junction exponential factor-0.330.33 
TFIdeal forward transit times00.1ns 
XTFCoefficient for bias dependence of TF-0  
VTFVoltage describing VBC dependence of TFV  
ITFHigh-current parameter for effect on TF A0  *
PTFExcess phase at freq=1.0/(TF*2π) Hzdeg0  
CJCB-C zero-bias depletion capacitanceF02pF*
VJCB-C built-in potentialV0.750.5 
MJCB-C junction exponential factor-0.330.5 
XCJCFraction of B-C depletion capacitance connected to internal base node-1  
TRIdeal reverse transit times010ns 
CJSZero-bias collector-substrate capacitanceF02pF*
VJSSubstrate junction built-in potentialV0.75  
MJSSubstrate junction exponential factor-00.5 
XTBForward and reverse beta temperature exponent-0  
EGEnergy gap for temperature effect on ISeV1.11  
XTITemperature exponent for effect on IS-3  
KFFlicker-noise coefficient-0  
AFFlicker-noise exponent-1  
FCCoefficient for forward-bias depletion capacitance formula-0.5  
TNOMParameter measurement temperature°C2750 

3.4.5 Junction Field-Effect Transistors (JFETs)

General form:

     JXXXXXXX ND NG NS MNAME [AREA] [OFF] [IC=VDS, VGS] [TEMP=T]

Examples:

     J1 7 2 3 JM1 OFF

ND, NG, and NS are the drain, gate, and source nodes, respectively. MNAME is the model name, AREA is the area factor, and OFF indicates an (optional) initial condition on the device for dc analysis. If the area factor is omitted, a value of 1.0 is assumed. The (optional) initial condition specification, using 'IC=VDS, VGS' is intended for use with the UIC option on the .TRAN control line, when a transient analysis is desired starting from other than the quiescent operating point. See the .IC control line for a better way to set initial conditions. The (optional) TEMP value is the temperature at which this device is to operate, and overrides the temperature specification on the .OPTION control line.

3.4.6 JFET Models (NJF/PJF)

MacSpice provides two JFET device models. The variable LEVEL specifies the model to be used:

LEVEL=1Shichman-Hodges (described below)
LEVEL=2Parker-Skellern jfet mesfet model (refer to the Macquairie University documentation)

The level 1 JFET model is derived from the FET model of Shichman and Hodges. The dc characteristics are defined by the parameters VTO and BETA, which determine the variation of drain current with gate voltage, LAMBDA, which determines the output conductance, and IS, the saturation current of the two gate junctions. Two ohmic resistances, RD and RS, are included. Charge storage is modeled by nonlinear depletion layer capacitances for both gate junctions that vary as the −1/2 power of junction voltage and are defined by the parameters CGS, CGD, and PB.

Note that in Spice3f and later, a fitting parameter B has been added. For details, see [9].

NameParameterUnitsDefaultExampleArea
VTOThreshold voltage (VTO)V-2.0-2.0 
BETATransconductance parameter (B)A V−21.0e-41.0e-3*
LAMBDAChannel-length modulation parameter (L)V−101.0e-4 
RDDrain ohmic resistanceΩ0100*
RSSource ohmic resistanceΩ0100*
CGSZero-bias G-S junction capacitance (Cgd)F05pF*
CGDZero-bias G-D junction capacitance (Cgd)F01pF*
PBGate junction potentialV10.6 
ISGate junction saturation current (IS )A1.0e-141.0e-14*
BDoping tail parameter-11.1 
KFFlicker noise coefficient-0  
AFFlicker noise exponent-1  
FCCoefficient for forward-bias depletion capacitance formula-0.5  
TNOMParameter measurement temperature°C2750 

3.4.7 MOSFETs

General form:

     MXXXXXXX ND NG NS NB MNAME [L=VAL] [W=VAL] [AD=VAL] [AS=VAL]
     + [PD=VAL] [PS=VAL] [NRD=VAL] [NRS=VAL] [OFF]
     + [IC=VDS, VGS, VBS] [TEMP=T]

Examples:

     M1 24 2 0 20 TYPE1
     M31 2 17 6 10 MODM L=5U W=2U
     M1 2 9 3 0 MOD1 L=10U W=5U AD=100P AS=100P PD=40U PS=40U

ND, NG, NS, and NB are the drain, gate, source, and bulk (substrate) nodes, respectively. MNAME is the model name. L and W are the channel length and width, in meters. AD and AS are the areas of the drain and source diffusions, in square-meters. Note that the suffix 'u' specifies microns (10−6 m) and 'p' square-microns (10−12 m2). If any of L, W, AD, or AS are not specified, default values are used. The use of defaults simplifies input file preparation, as well as the editing required if device geometries are to be changed. PD and PS are the perimeters of the drain and source junctions, in meters. NRD and NRS designate the equivalent number of squares of the drain and source diffusions; these values multiply the sheet resistance RSH specified on the .MODEL control line for an accurate representation of the parasitic series drain and source resistance of each transistor. PD and PS default to 0.0 while NRD and NRS default to 1.0. 'OFF' indicates an (optional) initial condition on the device for DC analysis. The (optional) initial condition specification using 'IC=VDS, VGS, VBS' is intended for use with the UIC option on the .TRAN control line, when a transient analysis is desired starting from other than the quiescent operating point. See the .IC control line for a better and more convenient way to specify transient initial conditions. The (optional) TEMP value is the temperature at which this device is to operate, and overrides the temperature specification on the .OPTION control line. The temperature specification is valid for level 1, 2, 3, and 6 MOSFETs, but not for level 4 or 5 (BSIM) devices.

3.4.8 MOSFET Models (NMOS/PMOS)

SPICE provides six MOSFET device models, which differ in the formulation of the I-V characteristic. The variable LEVEL specifies the model to be used:

LEVEL=1Shichman-Hodges
LEVEL=2MOS2 (as described in [1])
LEVEL=3MOS3, a semi-empirical model (see [1])
LEVEL=4BSIM (as described in [3])
LEVEL=5New BSIM (BSIM2; as described in [5])
LEVEL=6MOS6 (as described in [2])

MacSpice provides additional mosfet devices.

The DC characteristics of the level 1 through level 3 MOSFETs are defined by the device parameters VTO, KP, LAMBDA, PHI and GAMMA. If a process parameter value is specified (e.g. (NSUB, TOX, etc. ) then Spice will calculate corresponding values for VTO, etc. and use these calculated values as defaults instead of the defaults listed in the tables below. User-specified values for VTO, etc. will override these calculated defaults. VTO is positive (negative) for enhancement mode and negative (positive) for depletion mode N-channel (P-channel) devices. Charge storage is modelled by three constant capacitors, CGSO, CGDO, and CGBO that represent overlap capacitances, by the nonlinear thin-oxide capacitance, which is distributed among the gate, source, drain, and bulk regions, and by the nonlinear depletion-layer capacitances for both substrate junctions divided into bottom and periphery, which vary as the MJ and MJSW power of junction voltage respectively, and are determined by the parameters CBD, CBS, CJ, CJSW, MJ, MJSW and PB. Charge storage effects are modelled by the piece-wise linear voltages-dependent capacitance model proposed by Meyer. The thin-oxide charge-storage effects are treated slightly different for the LEVEL=1 model. These voltage-dependent capacitances are included only if TOX is specified in the input description and they are represented using Meyer's formulation.

There is some overlap among the parameters describing the junctions, e.g. the reverse current can be input either as IS (in A) or as JS (in A/m2). Whereas the first is an absolute value the second is multiplied by AD and AS to give the reverse current of the drain and source junctions respectively. This methodology has been chosen since there is no sense in relating always junction characteristics with AD and AS entered on the device line; the areas can be defaulted. The same idea applies also to the zero-bias junction capacitances CBD and CBS (in F) on one hand, and CJ (in F/m2) on the other. The parasitic drain and source series resistance can be expressed as either RD and RS (in ohms) or RSH (in ohms/sq.), the latter being multiplied by the number of squares NRD and NRS input on the device line.

A discontinuity in the MOS level 3 model with respect to the KAPPA parameter has been detected (see [10]). The supplied fix has been implemented in Spice3f2 and later. Since this fix may affect parameter fitting, the option 'BADMOS3' may be set to use the old implementation (see the section on simulation variables and the '.OPTIONS' line). SPICE level 1, 2, 3 and 6 parameters:

#Name Level ParameterUnitsDefaultExample
1LEVEL1–3, 6Model index-1 
2VTO1–3, 6Zero-bias threshold voltage (VTO)V0.01.0
3KP1–3Transconductance parameterA V−22.0e-53.1e-5
4GAMMA1–3, 6Bulk threshold parameterV1/20.00.37
5PHI1–3, 6Surface potential (U)V0.60.65
6LAMBDA1, 2, 6Channel-length modulation (L)V−10.00.02
7RD1–3, 6Drain ohmic resistanceΩ0.01.0
8RS1–3, 6Source ohmic resistanceΩ0.01.0
9CBD1–3, 6Zero-bias B-D junction capacitanceF0.020f
10CBS1–3, 6Zero-bias B-S junction capacitanceF0.020f
11IS1–3, 6Bulk junction saturation current (IS)A1.0e-141.0e-15
12PB1–3, 6Bulk junction potentialV0.80.87
13CGSO1–3, 6Gate-source overlap capacitance per meter channel widthF m−10.04.0e-11
14CGDO1–3, 6Gate-drain overlap capacitance per meter channel widthF m−10.04.0e-11
15CGBO1–3, 6Gate-bulk overlap capacitance per meter channel lengthF m−10.02.0e-10
16RSH1–3, 6Drain and source diffusion sheet resistanceΩ/square0.010.0
17CJ1–3, 6Zero-bias bulk junction bottom capacitance per sq-meter of junction areaF m−20.02.0e-4
18MJ1–3, 6Bulk junction bottom grading coefficient-0.50.5
19CJSW1–3, 6Zero-bias bulk junction sidewall capacitance per meter of junction perimeterF m−10.01.0e-9
20MJSW1–3, 6Bulk junction sidewall grading coefficient-0.50 (level 1)
0.33 (level 2, 3, 6)
 
21JS1–3, 6Bulk junction saturation current per sq-meter of junction areaA m−20.0 
22TOX1–3, 6Oxide thicknessm1.0e-71.0e-7
23NSUB1–3, 6Substrate dopingcm−3-4.0e15
24NSS1–3, 6Surface state densitycm−20.01.0e10
25NFS2, 3Fast surface state densitycm−20.01.0e10
26TPG1–3, 6Type of gate material: +1 opposite to substrate; -1 same as substrate; 0 Al gate-1.0 
27XJ2, 3Metallurgical junction depthm0.01u
28LD1–3, 6Lateral diffusionm0.00.8u
29U01–3, 6Surface mobilitycm2 V−1 s−1600700
30UCRIT2Critical field for mobility degradationV cm−11.0e41.0e4
31UEXP2Critical field exponent in mobility degradation-0.00.1
32UTRATransverse field coefficient (mobility) (not implemented)-0.00.3
33VMAX2, 3Maximum drift velocity of carriersm s−10.05.0e4
34NEFF2Total channel-charge (fixed and mobile) coefficient-1.05.0
35KF1–3Flicker noise coefficient-0.01.0e-26
36AF1–3Flicker noise exponent-1.01.2
37FC1–3, 6Coefficient for forward-bias depletion capacitance formula-0.5 
38DELTA2, 3Width effect on threshold voltage-0.01.0
39THETA3Mobility modulationV−10.00.1
40ETA3Static feedback-0.01.0
41KAPPA3Saturation field factor-0.20.5
42TNOM1–3, 6Parameter measurement temperature°C2750
43KV6Saturation voltage factor-2-
44NV6Saturation voltage coefficient-0.5
45KC6Saturation current factor-5.0e-5
46NC6Saturation current coefficient-1
47NVTH6Threshold voltage coefficientV0.5
48PS6Saturation current modification parameterV0
49GAMMA16Bulk threshold parameter 1V1/20
50SIGMA6Static feedback effect parameterV1/20
51LAMBDA06Channel length modulation parameter 0V−10
52LAMBDA16Channel length modulation parameter 1V−10
53ALPHA3alpham2 V−10.01.3e-13
54XD3Depletion layer widthm0.03.5e-7

The level 4 and level 5 (BSIM1 and BSIM2) parameters are all values obtained from process characterization, and can be generated automatically. J. Pierret [4] describes a means of generating a 'process' file, and the program Proc2Mod provided with SPICE3 converts this file into a sequence of BSIM1 '.MODEL' lines suitable for inclusion in a SPICE input file. Parameters marked below with an * in the l/w column also have corresponding parameters with a length and width dependency. For example, VFB is the basic parameter with units of volts, and LVFB and WVFB also exist and have units of volt-meter The formula

$$ P = P_0 + { P_{\rm L} \over L_{\rm eff} } + { W_{\rm L} \over W_{\rm eff} } $$

is used to evaluate the parameter for the actual device specified with

$$ L_{\rm eff} = L_{\rm input}-DL $$

and

$$ W_{\rm eff} = W_{\rm input}-DW $$

Note that unlike the other models in SPICE, the BSIM model is designed for use with a process characterization system that provides all the parameters, thus there are no defaults for the parameters, and leaving one out is considered an error. For an example set of parameters and the format of a process file, see the SPICE2 implementation notes [3]. For more information on BSIM2, see reference [5].

SPICE BSIM (level 4) parameters:

NameParameterUnitsL/w
VFBFlat-band voltageV*
PHISurface inversion potentialV*
K1Body effect coefficientV1/2*
K2Drain/source depletion charge-sharing coefficient-*
ETAZero-bias drain-induced barrier-lowering coefficient-*
MUZZero-bias mobilitycm2 V−1 s−1 
DLShortening of channelµm 
DWNarrowing of channelµm 
U0Zero-bias transverse-field mobility degradation coefficientV−1*
U1Zero-bias velocity saturation coefficientµm V−1*
X2MZSens. of mobility to substrate bias at V=0cm2 V−2 s−1*
X2ESens. of drain-induced barrier lowering effect to substrate biasV−1*
X3ESens. of drain-induced barrier lowering effect to drain bias at Vds=VddV−1*
X2U0Sens. of transverse field mobility degradation effect to substrate biasV−2*
X2U1Sens. of velocity saturation effect to substrate biasµm V−2*
MUSMobility at zero substrate bias and at Vds=Vddcm2 V−2 s−1 
X2MSSens. of mobility to substrate bias at Vds=Vddcm2 V−2 s−1*
X3MSSens. of mobility to drain bias at Vds=Vddcm2 V−2 s−1*
X3U1Sens. of velocity saturation effect on drain bias at Vds=Vddµm V−2*
TOXGate oxide thicknessµm 
TEMPTemperature at which parameters were measured°C 
VDDMeasurement bias rangeV 
CGDOGate-drain overlap capacitance per meter channel widthF m−1 
CGSOGate-source overlap capacitance per meter channel widthF m−1 
CGBOGate-bulk overlap capacitance per meter channel lengthF m−1 
XPARTGate-oxide capacitance-charge model flag- 
N0Zero-bias subthreshold slope coefficient-*
NBSens. of subthreshold slope to substrate bias-*
NDSens. of subthreshold slope to drain bias-*
RSHDrain and source diffusion sheet resistanceΩ/square 
JSSource drain junction current densityA m−2 
PBBuilt in potential of source drain junctionV 
MJGrading coefficient of source drain junction- 
PBSWBuilt in potential of source, drain junction sidewallV 
MJSWGrading coefficient of source drain junction sidewall- 
CJSource drain junction capacitance per unit areaF m−2 
CJSWSource drain junction sidewall capacitance per unit lengthF m−1 
WDFSource drain junction default widthm 
DELLSource drain junction length reductionm 

XPART=0 selects a 40/60 drain/source charge partition in saturation, while XPART=1 selects a 0/100 drain/source charge partition.

ND, NG, and NS are the drain, gate, and source nodes, respectively. MNAME is the model name, AREA is the area factor, and OFF indicates an (optional) initial condition on the device for dc analysis. If the area factor is omitted, a value of 1.0 is assumed. The (optional) initial condition specification, using IC=VDS, VGS is intended for use with the UIC option on the .TRAN control line, when a transient analysis is desired starting from other than the quiescent operating point. See the .IC control line for a better way to set initial conditions.

3.4.9 MESFETs

General form:

     ZXXXXXXX ND NG NS MNAME [AREA] [OFF] [IC=VDS, VGS]

Examples:

     Z1 7 2 3 ZM1 OFF

ND, NG, and NS are the drain, gate, and source nodes, respectively. MNAME is the model name, AREA is the area factor, and OFF indicates an (optional) initial condition on the device for dc analysis. If the area factor is omitted, a value of 1.0 is assumed. The (optional) initial condition specification, using 'IC=VDS, VGS' is intended for use with the UIC option on the .TRAN control line, when a transient analysis is desired starting from other than the quiescent operating point. See the .IC control line for a better way to set initial conditions.

3.4.10 MESFET Models (NMF/PMF)

The standard MESFET model is derived from the GaAs FET model of Statz et al. as described in [11]. The dc characteristics are defined by the parameters VTO, B, and BETA, which determine the variation of drain current with gate voltage, ALPHA, which determines saturation voltage, and LAMBDA, which determines the output conductance. The formula are given by:

$$ I_d = { \beta (V_{\rm gs} - V_{\rm T})^2 \over 1 + b(V_{\rm gs} - V_{\rm T})} \left[ 1 - \left[ 1 - \alpha { V_{\rm ds}\over 3} \right]^3 \right] \left( 1+\lambda V_{\rm ds}\right) \quad{\rm for}\quad0 < V_{\rm ds} < {3\over\alpha} $$

$$ I_d = { \beta (V_{\rm gs} - V_{\rm T})^2 \over 1 + b(V_{\rm gs} - V_{\rm T})} \left( 1+\lambda V_{\rm ds}\right)\quad{\rm for} \quad {3\over\alpha} < V_{\rm ds} $$

Two ohmic resistances, RD and RS, are included. Charge storage is modeled by total gate charge as a function of gate-drain and gate-source voltages and is defined by the parameters CGS, CGD, and PB.

NameParameterUnitsDefaultExampleArea
VTOPinch-off voltageV-2.0-2.0 
BETATransconductance parameterA V−21.0e-41.0e-3*
BDoping tail extending parameterV−10.30.3*
ALPHASaturation voltage parameterV−122*
LAMBDAChannel-length modulation parameterV−101.0e-4 
RDDrain ohmic resistanceΩ0100*
RSSource ohmic resistanceΩ0100*
CGSZero-bias G-S junction capacitanceF05pF*
CGDZero-bias G-D junction capacitanceF01pF*
PBGate junction potentialV10.6 
KFFlicker noise coefficient-0  
AFFlicker noise exponent-1  
FCCoefficient for forward-bias depletion capacitance formula-0.5