Indeed. At the end of the day, this is engineering, and one learns to livewithin the limitations of the tools.
Vera Albrecht,Cecil Aswell,Giles Atkinson,Giles C. Billingsley,Phil Barker,Steven Borley,Stuart Brorson,Alessio Cacciatori,Mansun Chan,Wayne A. Christopher,Al Davis,Glao S. Dezai,Jon Engelbert,Daniele Foci,Noah Friedman,David A. Gates,Alan Gillespie,John Heidemann,Marcel Hendrix,Jeffrey M. Hsu,JianHui Huang,S. Hwang,Chris Inbody,Gordon M. Jacobs,Min-Chie Jeng,Beorn Johnson,Stefan Jones,Kenneth H. Keller,Francesco Lannutti,Robert Larice,Mathew Lew,Robert Lindsell,Weidong Liu,Kartikeya Mayaram,Richard D. McRoberts,Manfred Metzger,Jim Monte,Wolfgang Muees,Paolo Nenzi,Gary W. Ng,Hong June Park,Stefano Perticaroli,Arno Peters,Serban-Mihai Popescu,Georg Post,Thomas L. Quarles,Emmanuel Rouat,Jean-Marc Routure,Jaijeet S. Roychowdhury,Lionel Sainte Cluque,Takayasu Sakurai,Amakawa Shuhei,Kanwar Jit Singh,Bill Swartz,Hitoshi Tanaka,Brian Taylor,Steve Tell,Andrew Tuckey,Andreas Unger,Holger Vogt,Dietmar Warning,Michael Widlok,Charles D.H. Williams,Antony Wilson,
Suffix | Name | Factor |
T | Tera | |
G | Giga | |
Meg | Mega | |
K | Kilo | |
mil | Mil | |
m | milli | |
u | micro | |
n | nano | |
p | pico | |
f | femto | |
a | atto |
First letter | Element description | Comments, links
|
A | XSPICE code model | |
B | Behavioral (arbitrary) source | |
C | Capacitor | |
D | Diode | |
E | Voltage-controlled voltage source (VCVS) | |
F | Current-controlled current source (CCCs) | linear (4.2.3)
|
G | Voltage-controlled current source (VCCS) | |
H | Current-controlled voltage source (CCVS) | linear (4.2.4)
|
I | Current source | |
J | Junction field effect transistor (JFET) | |
K | Coupled (Mutual) Inductors | |
L | Inductor | |
M | Metal oxide field effect transistor (MOSFET) | |
N | Verilog-A Compact Device Models | |
O | Lossy transmission line | |
P | Coupled multiconductor line (CPL) | |
Q | Bipolar junction transistor (BJT) | |
R | Resistor | |
S | Switch (voltage-controlled) | |
T | Lossless transmission line | |
U | Uniformly distributed RC line | 6.3*
|
U | Basic digital building blocks using XSPICE | 10*
|
V | Voltage source | |
W | Switch (current-controlled) | |
X | Subcircuit | |
Y | Single lossy transmission line (TXL) | |
Z | Metal semiconductor field effect transistor (MESFET) |
POWER AMPLIFIER CIRCUIT
* additional lines following
*...
Test of CAM cell
* additional lines following
*...
******************************
* additional lines following
*...
.TITLE Test of CAM cell
* additional lines following
*...
Test of CAM cell
* additional lines following
*...
*TITLE Test of CAM cell
* additional lines following
*...
.end
* <any comment>
* RF=1K Gain should be 100
* Check open-loop gain and phase margin
<any command> $ <any comment>
<any command> ; <any comment>
RF2=1K $ Gain should be 100
C1=10p ; Check open-loop gain and phase margin
.param n1=1 //new value
<any command>
+ <continuation of any command> ; some comment
+ <further continuation of any command>
.model mname type(pname1=pval1 pname2=pval2 ... )
.model MOD1 npn (bf=50 is=1e-13 vbf=50)
Code | Model Type |
R | Semiconductor resistor model |
C | Semiconductor capacitor model |
L | Inductor model |
SW | Voltage controlled switch |
CSW | Current controlled switch |
URC | Uniform distributed RC model |
LTRA | Lossy transmission line model |
D | Diode model |
NPN | NPN BJT model |
PNP | PNP BJT model |
NJF | N-channel JFET model |
PJF | P-channel JFET model |
NMOS | N-channel MOSFET model |
PMOS | P-channel MOSFET model |
NMF | N-channel MESFET model |
PMF | P-channel MESFET model |
VDMOS | Power MOS model |
* The following is the instance card:
*
xdiv1 10 7 0 vdivide
* The following are the subcircuit definition cards:
*
.subckt vdivide 1 2 3
r1 1 2 10K
r2 2 3 5K
.ends
.SUBCKT subnam N1 <N2 N3 ...>
.SUBCKT OPAMP 1 2 3 4
.ENDS <SUBNAM>
.ENDS OPAMP
XYYYYYYY N1 <N2 N3 ...> SUBNAM
X1 2 4 17 3 1 MULTI
.GLOBAL nodename1 [ nodename2 ... ]
.GLOBAL gnd vcc
.INCLUDE filename
.INCLUDE /users/spice/common/bsim3-param.mod
.INCPSLT filename
.INCPSLT /users/spice/models/OPA1641.lib
.LIB filename libname
.LIB /users/spice/common/mosfets.lib mos1
.param <ident> = <expr> <ident> = <expr> ...
.param pippo=5
.param po=6 pp=7.8 pap={AGAUSS(pippo, 1, 1.67)}
.param pippp={pippo + pp}
.param p={pp}
.param pop=’pp+p’
.param a = 123 * 3 b = sqrt(9) $ doesn’t work, a <= 123
.param a = ’123 * 3’ b = sqrt(9) $ ok.
.param c = a + 123 $ won’t work
.param c = ’a + 123’ $ ok.
.param c = a+123 $ ok.
.param str1=”first” str2=”second”
.param both={str1}” and “str2
{ <expr> }
.subckt <identn> node node ... <ident>=<value> <ident>=<value> ...
.subckt myfilter in out rval=100k cval=100nF
X<name> node node ... <identn> <ident>=<value> <ident>=<value> ...
X1 input output myfilter rval=1k
* Param-example
.param amplitude= 1V
*
.subckt myfilter in out rval=100k cval=100nF
Ra in p1 {2*rval}
Rb p1 out {2*rval}
C1 p1 0 {2*cval}
Ca in p2 {cval}
Cb p2 out {cval}
R1 p2 0 {rval}
.ends myfilter
*
X1 input output myfilter rval=1k cval=1n
V1 input 0 AC {amplitude}
.end
<atom> where <atom> is either a spice number or an identifier
<unary-operator> <atom>
<function-name> ( <expr> [ , <expr> ...] )
<atom> <binary-operator> <expr>
( <expr> )
Operator | Alias | Precedence | Description |
- | 1 | unary - | |
! | 1 | unary not | |
** | ^ | 2 | power, like pwr |
* | 3 | multiply | |
/ | 3 | divide | |
% | 3 | modulo | |
\ | 3 | integer divide | |
+ | 4 | add | |
- | 4 | subtract | |
== | 5 | equality | |
!= | <> | 5 | non-equal |
<= | 5 | less or equal | |
>= | 5 | greater or equal | |
< | 5 | less than | |
> | 5 | greater than | |
&& | 6 | boolean and | |
|| | 7 | boolean or | |
c?x:y | 8 | ternary operator |
compatmode hs: x>0 pow(x, y); x<0 pow(x, round(y)); X=0 0
compatmode lt: x>0 pow(x, y); x<0 pow(x, y)
if y is close to integer; else 0
* Logical operators
v1or 1 0 {1 || 0}
v1and 2 0 {1 && 0}
v1not 3 0 {! 1}
v1mod 4 0 {5 % 3}
v1div 5 0 {5 \ 3}
v0not 6 0 {! 0}
.control
op
print allv
.endc
.end
Built-in function | Notes
|
sqrt(x) | y = sqrt(x)
|
sin(x), cos(x), tan(x) | |
sinh(x), cosh(x), tanh(x) | |
asin(x), acos(x), atan(x) | |
asinh(x), acosh(x), atanh(x) | |
arctan(x) | atan(x), kept for compatibility
|
exp(x) | |
ln(x), log(x) | |
abs(x) | |
nint(x) | Nearest integer, half integers towards even
|
int(x) | Nearest integer rounded towards 0
|
floor(x) | Nearest integer rounded towards -∞
|
ceil(x) | Nearest integer rounded towards +∞
|
pow(x,y) | x raised to the power of y (pow from C runtime library)
|
pwr(x,y) | pow(fabs(x), y)
|
min(x, y) | |
max(x, y) | |
sgn(x) | 1.0 for x > 0, 0.0 for x == 0, -1.0 for x < 0
|
ternary_fcn(x, y, z) | x ? y : z
|
gauss(nom, rvar, sigma) | nominal value plus variation drawn from Gaussian distribution with mean 0 and standard deviation rvar (relative to nominal), divided by sigma
|
agauss(nom, avar, sigma) | nominal value plus variation drawn from Gaussian distribution with mean 0 and standard deviation avar (absolute), divided by sigma
|
unif(nom, rvar) | nominal value plus relative variation (to nominal) uniformly distributed between +/-rvar
|
aunif(nom, avar) | nominal value plus absolute variation uniformly distributed between +/-avar
|
limit(nom, avar) | nominal value +/-avar, depending on random number in [-1, 1[ being > 0 or < 0
|
suffix | value |
g | 1e9 |
meg | 1e6 |
k | 1e3 |
m | 1e-3 |
u | 1e-6 |
n | 1e-9 |
p | 1e-12 |
f | 1e-15 |
.func <ident> { <expr> }
.func <ident> = { <expr> }
.func icos(x) {cos(x) - 1}
.func f(x,y) {x*y}
.func foo(a,b) = {a + b}
.csparam <ident> = <expr>
.param pippo=5
.param pp=6
.csparam pippp={pippo + pp}
.param p={pp}
.csparam pap=’pp+p’
.temp value
.temp 27
.if(boolean expression)
...
.elseif(boolean expression)
...
.else
...
.endif
* device instance in IF-ELSE block
.param ok=0 ok2=1
v1 1 0 1
R1 1 0 2
.if (ok && ok2)
R11 1 0 2
.else
R11 1 0 0.5 $ <-- selected
.endif
* .model in IF-ELSE block
.param m0=0 m1=1
M1 1 2 3 4 N1 W=1 L=0.5
.if(m0==1)
.model N1 NMOS level=49 Version=3.1
.elseif(m1==1)
.model N1 NMOS level=49 Version=3.2.4 $ <-- selected
.else
.model N1 NMOS level=49 Version=3.3.0
.endif
bipolar amplifier
R3 vcc intc 10k
R1 vcc intb 68k
R2 intb 0 10k
Cout out intc 10u
Cin intb in 10u
RLoad out 0 100k
Q1 intc intb 0 BC546B
VCC vcc 0 5
Vin in 0 dc 0 ac 1 sin(0 1m 500)
.model BC546B npn ( IS=7.59E-15 VAF=73.4 BF=480 IKF=0.0962
+ NE=1.2665 ISE=3.278E-15 IKR=0.03 ISC=2.00E-13 NC=1.2 NR=1
+ BR=5 RC=0.25 CJC=6.33E-12 FC=0.5 MJC=0.33 VJC=0.65
+ CJE=1.25E-11 MJE=0.55 VJE=0.65 TF=4.26E-10 ITF=0.6 VTF=3
+ XTF=20 RB=100 IRB=0.0001 RBM=10 RE=0.5 TR=1.50E-07)
.end
Q1 intc intb 0 defaultmod
.model defaultmod npn
d1 2 0 mydiode m=10
d01 1 0 mydiode
d02 1 0 mydiode
d03 1 0 mydiode
d04 1 0 mydiode
d05 1 0 mydiode
d06 1 0 mydiode
d07 1 0 mydiode
d08 1 0 mydiode
d09 1 0 mydiode
d10 1 0 mydiode
...
First letter | Element description |
C | Capacitor |
D | Diode |
F | Current-controlled current source (CCCs) |
G | Voltage-controlled current source (VCCS) |
I | Current source |
J | Junction field effect transistor (JFET) |
L | Inductor |
M | Metal oxide field effect transistor (MOSFET) |
Q | Bipolar junction transistor (BJT) |
R | Resistor |
X | Subcircuit (for details see below) |
Z | Metal semiconductor field effect transistor (MESFET) |
.param madd = 6
X1 a b sub1 m=5
.subckt sub1 a1 b1
Cs1 a1 b1 C=5p m=’madd-2’
.ends
.param madd = 4
X1 a b sub1 m=3
.subckt sub1 a1 b1
X2 a1 b1 sub2 m=’madd-2’
.ends
.subckt sub2 a2 b2
Cs2 a2 b2 3p m=2
.ends
Lload 1 2 1u ind1 dtemp=5
.MODEL ind1 L tc1=0.001
RXXXXXXX n+ n- <resistance|r=>value <ac=val> <m=val>
+ <scale=val> <temp=val> <dtemp=val> <tc1=val> <tc2=val>
+ <noisy=0|1>
R1 1 2 100
RC1 12 17 1K
R2 5 7 1K ac=2K
RL 1 4 2K m=2
RE1 1 2 800 newres dtemp=5
.MODEL newres R tc1=0.001
RE2 a b 1.4k tc1=2m tc2=1.4u
RE3 n1 n2 1Meg tce=700m
Rmd 134 57 1.5k noisy=0
RXXXXXXX n+ n- <value> <mname> <l=length> <w=width>
+ <temp=val> <dtemp=val> <m=val> <ac=val> <scale=val>
+ <noisy = 0|1>
RLOAD 2 10 10K
RMOD 3 7 RMODEL L=10u W=1u
Name | Parameter | Units | Default | Example |
TC1 | first order temperature coeff. | 0.0 | - | |
TC2 | second order temperature coeff. | 0.0 | - | |
RSH | sheet resistance | - | 50 | |
DEFW | default width | 1e-6 | 2e-6 | |
NARROW | narrowing due to side etching | 0.0 | 1e-7 | |
SHORT | shortening due to side etching | 0.0 | 1e-7 | |
TNOM | parameter measurement temperature | 27 | 50 | |
KF | flicker noise coefficient | 0.0 | 1e-25 | |
AF | flicker noise exponent | 0.0 | 1.0 | |
WF | flicker noise width exponent | 1.0 | ||
LF | flicker noise length exponent | 1.0 | ||
EF | flicker noise frequency exponent | 1.0 | ||
R (RES) | default value if element value not given | - | 1000 |
Material | Min. | Typ. | Max. |
Inter-metal (metal1 - metal2) | 0.005 | 0.007 | 0.1 |
Top-metal (metal3) | 0.003 | 0.004 | 0.05 |
Polysilicon (poly) | 15 | 20 | 30 |
Silicide | 2 | 3 | 6 |
Diffusion (n+, p+) | 10 | 25 | 100 |
Silicided diffusion | 2 | 4 | 10 |
n-well | 1000 | 2000 | 5000 |
RXXXXXXX n+ n- R = ’expression’ <tc1=value> <tc2=value> <noisy=0>
RXXXXXXX n+ n- ’expression’ <tc1=value> <tc2=value> <noisy=0>
R1 rr 0 r = ’V(rr) < {Vt} ? {R0} : {2*R0}’ tc1=2e-03 tc2=3.3e-06
R2 r2 rr r = {5k + 50*TEMPER}
.param rp1 = 20
R3 no1 no2 r = ’5k * rp1’ noisy=1
Non-linear resistor
.param R0=1k Vi=1 Vt=0.5
* resistor depending on control voltage V(rr)
R1 rr 0 r = ’V(rr) < {Vt} ? {R0} : {2*R0}’
* control voltage
V1 rr 0 PWL(0 0 100u {Vi})
.control
unset askquit
tran 100n 100u uic
plot i(V1)
.endc
.end
CXXXXXXX n+ n- <value> <mname> <m=val> <scale=val> <temp=val>
+ <dtemp=val> <tc1=val> <tc2=val> <ic=init_condition>
CBYP 13 0 1UF
COSC 17 23 10U IC=3V
C1 15 5 cstd
C2 2 7 cstd
.model cstd C cap=3n
CEB 1 2 1u cap1 dtemp=5
.MODEL cap1 C tc1=0.001
CXXXXXXX n+ n- <value> <mname> <l=length> <w=width> <m=val>
+ <scale=val> <temp=val> <dtemp=val> <ic=init_condition>
CLOAD 2 10 10P
CMOD 3 7 CMODEL L=10u W=1u
Name | Parameter | Units | Default | Example |
CAP | model capacitance | 0.0 | 1e-6 | |
CJ | junction bottom capacitance | - | 5e-5 | |
CJSW | junction sidewall capacitance | - | 2e-11 | |
DEFW | default device width | 1e-6 | 2e-6 | |
DEFL | default device length | 0.0 | 1e-6 | |
NARROW | narrowing due to side etching | 0.0 | 1e-7 | |
SHORT | shortening due to side etching | 0.0 | 1e-7 | |
TC1 | first order temperature coeff. | 0.0 | 0.001 | |
TC2 | second order temperature coeff. | 0.0 | 0.0001 | |
TNOM | parameter measurement temperature | 27 | 50 | |
DI | relative dielectric constant | - | 1 | |
THICK | insulator thickness | 0.0 | 1e-9 |
CXXXXXXX n+ n- C = ’expression’ <tc1=value> <tc2=value>
CXXXXXXX n+ n- ’expression’ <tc1=value> <tc2=value>
CXXXXXXX n+ n- Q = ’expression’ <tc1=value> <tc2=value>
C1 cc 0 c = ’V(cc) < {Vt} ? {C1} : {Ch}’ tc1=-1e-03 tc2=1.3e-05
C1 a b q = ’1u*(4*atan(V(a,b)/4)*2+V(a,b))/3’
Behavioral Capacitor
.param Cl=5n Ch=1n Vt=1m Il=100n
.ic v(cc) = 0 v(cc2) = 0
* capacitor depending on control voltage V(cc)
C1 cc 0 c = ’V(cc) < {Vt} ? {Cl} : {Ch}’
I1 0 1 {Il}
Exxx n1-copy n2 n2 cc2 1
Cxxx n1-copy n2 1
Bxxx cc2 n2 I = ’(V(cc2) < {Vt} ? {Cl} : {Ch})’ * i(Exxx)
I2 n2 22 {Il}
vn2 n2 0 DC 0
* measure charge by integrating current
aint1 %id(1 cc) 2 time_count
aint2 %id(22 cc2) 3 time_count
.model time_count int(in_offset=0.0 gain=1.0
+ out_lower_limit=-1e12 out_upper_limit=1e12
+ limit_range=1e-9 out_ic=0.0)
.control
unset askquit
tran 100n 100u
plot v(2)
plot v(cc) v(cc2)
.endc
.end
LYYYYYYY n+ n- <value> <mname> <nt=val> <m=val>
+ <scale=val> <temp=val> <dtemp=val> <tc1=val>
+ <tc2=val> <ic=init_condition>
LLINK 42 69 1UH
LSHUNT 23 51 10U IC=15.7MA
L1 15 5 indmod1
L2 2 7 indmod1
.model indmod1 L ind=3n
Lload 1 2 1u ind1 dtemp=5
.MODEL ind1 L tc1=0.001
Name | Parameter | Units | Default | Example |
IND | model inductance | 0.0 | 1e-3 | |
CSECT | cross section | 0.0 | 1e-6 | |
DIA | coil diameter | 0.0 | 1e-3 | |
LENGTH | length | 0.0 | 1e-2 | |
TC1 | first order temperature coeff. | 0.0 | 0.001 | |
TC2 | second order temperature coeff. | 0.0 | 0.0001 | |
TNOM | parameter measurement temperature | 27 | 50 | |
NT | number of turns | - | 0.0 | 10 |
MU | relative magnetic permeability | - | 1.0 | - |
KXXXXXXX LYYYYYYY LZZZZZZZ value
K43 LAA LBB 0.999
KXFRMR L1 L2 0.87
L1 1 0 10u
L2 2 0 11u
L3 3 0 10u
K12 L1 L2 0.99
K23 L2 L3 0.99
K13 L1 L3 0.98
L1 1 0 10u
L2 2 0 11u
L3 3 0 10u
K123 L1 L2 L3 0.97
LXXXXXXX n+ n- L = ’expression’ <tc1=value> <tc2=value>
LXXXXXXX n+ n- ’expression’ <tc1=value> <tc2=value>
L1 l2 lll L = ’i(Vm) < {It} ? {Ll} : {Lh}’ tc1=-4e-03 tc2=6e-05
Variable inductor
.param Ll=0.5m Lh=5m It=50u Vi=2m
.ic v(int21) = 0
* variable inductor depending on control current i(Vm)
L1 l2 lll L = ’i(Vm) < {It} ? {Ll} : {Lh}’
* measure current through inductor
vm lll 0 dc 0
* voltage on inductor
V1 l2 0 {Vi}
* fixed inductor
L3 33 331 {Ll}
* measure current through inductor
vm33 331 0 dc 0
* voltage on inductor
V3 33 0 {Vi}
* non linear inductor (discrete setup)
F21 int21 0 B21 -1
L21 int21 0 1
B21 n1 n2 V = ’(i(Vm21) < {It} ? {Ll} : {Lh})’ * v(int21)
* measure current through inductor
vm21 n2 0 dc 0
V21 n1 0 {Vi}
.control
unset askquit
tran 1u 100u uic
plot i(Vm) i(vm33)
plot i(vm21) i(vm33)
plot i(vm)-i(vm21)
.endc
.end
SXXXXXXX N+ N- NC+ NC- MODEL <ON><OFF>
WYYYYYYY N+ N- VNAM MODEL <ON><OFF>
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
Name | Parameter | Units | Default
|
Switch model |
VT | threshold voltage | V | 0.0
|
SW |
IT | threshold current | A | 0.0
|
CSW |
VH | hysteresis voltage | V | 0.0
|
SW |
IH | hysteresis current | A | 0.0
|
CSW |
RON | on resistance | 1.0
|
SW,CSW | |
ROFF | off resistance | 1.0e+12 (*)
|
SW,CSW |
Switch test
.tran 2us 5ms
*switch control voltage
v1 1 0 DC 0.0 PWL(0 0 2e-3 2 4e-3 0)
*switch control voltage starting inside hysteresis window
*please note influence of instance parameters ON, OFF
v2 2 0 DC 0.0 PWL(0 0.9 2e-3 2 4e-3 0.4)
*switch control current
i3 3 0 DC 0.0 PWL(0 0 2e-3 2m 4e-3 0) $ <--- switch control current
*load voltage
v4 4 0 DC 2.0
*input load for current source i3
r3 3 33 10k
vm3 33 0 dc 0 $ <--- measure the current
* ouput load resistors
r10 4 10 10k
r20 4 20 10k
r30 4 30 10k
r40 4 40 10k
*
s1 10 0 1 0 switch1 OFF
s2 20 0 2 0 switch1 OFF
s3 30 0 2 0 switch1 ON
.model switch1 sw vt=1 vh=0.2 ron=1 roff=10k
*
w1 40 0 vm3 wswitch1 off
.model wswitch1 csw it=1m ih=0.2m ron=1 roff=10k
*
.control
run
plot v(1) v(10)
plot v(10) vs v(1) $ <-- get hysteresis loop
plot v(2) v(20) $ <--- different initial values
plot v(20) vs v(2) $ <-- get hysteresis loop
plot v(2) v(30) $ <--- different initial values
plot v(30) vs v(2) $ <-- get hysteresis loop
plot v(40) vs vm3#branch $ <--- current controlled switch hysteresis
.endc
.end
VXXXXXXX N+ N- <<DC> DC/TRAN VALUE> <AC <ACMAG <ACPHASE>>>
+ <DISTOF1 <F1MAG <F1PHASE>>> <DISTOF2 <F2MAG <F2PHASE>>>
IYYYYYYY N+ N- <<DC> DC/TRAN VALUE> <AC <ACMAG <ACPHASE>>>
+ <DISTOF1 <F1MAG <F1PHASE>>> <DISTOF2 <F2MAG <F2PHASE>>>
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
PULSE(V1 V2 TD TR TF PW PER NP)
VIN 3 0 PULSE(-1 1 2NS 2NS 2NS 50NS 100NS 5)
Name | Parameter | Default Value | Units |
V1 | Initial value | - | , |
V2 | Pulsed value | - | , |
TD | Delay time | 0.0 | sec |
TR | Rise time | TSTEP | sec |
TF | Fall time | TSTEP | sec |
PW | Pulse width | TSTOP | sec |
PER | Period | TSTOP | sec |
NP | Number of Pulses *) | unlimited | - |
Time | Value |
0 | V1 |
TD | V1 |
TD+TR | V2 |
TD+TR+PW | V2 |
TD+TR+PW+TF | V1 |
TSTOP | V1 |
SIN(VO VA FREQ TD THETA PHASE)
VIN 3 0 SIN(0 1 100MEG 1NS 1E10)
Name | Parameter | Default Value | Units |
VO | Offset | - | , |
VA | Amplitude | - | , |
FREQ | Frequency | ||
TD | Delay | 0.0 | sec |
THETA | Damping factor | 0.0 | |
PHASE | Phase | 0.0 | degrees |
EXP(V1 V2 TD1 TAU1 TD2 TAU2)
VIN 3 0 EXP(-4 -1 2NS 30NS 60NS 40NS)
Name | Parameter | Default Value | Units |
V1 | Initial value | - | , |
V2 | pulsed value | - | , |
TD1 | rise delay time | 0.0 | sec |
TAU1 | rise time constant | TSTEP | sec |
TD2 | fall delay time | TD1+TSTEP | sec |
TAU2 | fall time constant | TSTEP | sec |
PWL(T1 V1 <T2 V2 T3 V3 T4 V4 ...>) <r=value> <td=value>
VCLOCK 7 5 PWL(0 -7 10NS -7 11NS -3 17NS -3 18NS -7 50NS -7)
+ r=0 td=15NS
SFFM(VO VA FM MDI FC TD PHASEM PHASEC)
V1 12 0 SFFM(0 2 20 45 1k 1m 0 0)
Name | Parameter | Default value | Units |
VO | Offset | - | , |
VA | Amplitude | - | , |
FM | Modulating frequency | ||
MDI | Modulation index | 90 | |
FC | Carrier frequency | ||
TD | Signal delay | 0.0 | |
PHASEM | Modulation signal phase | 0.0 | degrees |
PHASEC | Carrier signal phase | 0.0 | degrees |
AM(VO VMO VMA FM FC TD PHASEM PHASEC)
V1 12 0 AM(0.5 2 1.8 20K 5MEG 1m)
Name | Parameter | Default value | Units |
VO | Overall offset | - | , |
VMO | Modulation signal offset | - | , |
VMA | Modulation signal amplitude | 1 | , |
FM | Modulation signal frequency | ||
FC | Carrier signal frequency | ||
TD | Overall delay | 0.0 | |
PHASEM | Modulation signal phase | 0.0 | degrees |
PHASEC | Carrier signal phase | 0.0 | degrees |
TRNOISE(NA NT NALPHA NAMP RTSAM RTSCAPT RTSEMT)
VNoiw 1 0 DC 0 TRNOISE(20n 0.5n 0 0) $ white
VNoi1of 1 0 DC 0 TRNOISE(0 10p 1.1 12p) $ 1/f
VNoiw1of 1 0 DC 0 TRNOISE(20 10p 1.1 12p) $ white and 1/f
IALL 10 0 DC 0 trnoise(1m 1u 1.0 0.1m 15m 22u 50u)
$ white, 1/f, RTS
Name | Parameter | Default value | Units |
NA | Rms noise amplitude (Gaussian) | - | , |
NT | Time step | - | |
NALPHA | 1/f exponent | - | |
NAMP | Amplitude (1/f) | - | , |
RTSAM | Amplitude | - | , |
RTSCAPT | Trap capture time | - | |
RTSEMT | Trap emission time | - |
TRRANDOM(TYPE TS <TD <PARAM1 <PARAM2>>>)
VR1 r1 0 dc 0 trrandom (2 10m 0 1) ; Gaussian with mean 0
V1 1 0 dc 0 trrandom (1 1u 0.5u 0.5 0.5) ; Uniform between 0 and 1
TYPE | description | PARAM1 | default | PARAM2 | default | ||
1 | Uniform | Range | 1 | Offset | 0 | ||
2 | Gaussian | Standard Dev. | 1 | Mean | 0 | ||
3 | Exponential | Mean | 1 | Offset | 0 | ||
4 | Poisson | Lambda | 1 | Offset | 0 |
EXTERNAL
Vex 1 0 dc 0 external
Iex i1 i2 dc 0 external <m = xx>
DC 0 AC 1 portnum n1 <z0 n2>
V1 in 0 dc 0 ac 1 portnum 1 z0 100
GXXXXXXX N+ N- NC+ NC- VALUE <m=val>
G1 2 0 5 0 0.1
EXXXXXXX N+ N- NC+ NC- VALUE
E1 2 3 14 1 2.0
FXXXXXXX N+ N- VNAM VALUE <m=val>
F1 13 5 VSENS 5 m=2
HXXXXXXX N+ N- VNAM VALUE
HX 5 17 VZ 0.5K
Dependent Polynomial Sources | |
Source Type | Instance Card |
POLYNOMIAL VCVS | EXXXXXXX N+ N- POLY(ND) NC1+ NC1- P0 (P1...) |
POLYNOMIAL VCCS | GXXXXXXX N+ N- POLY(ND) NC1+ NC1- P0 (P1...) |
POLYNOMIAL CCCS | FXXXXXXX N+ N- POLY(ND) VNAM1 !VNAM2...? P0 (P1...) |
POLYNOMIAL CCVS | HXXXXXXX N+ N- POLY(ND) VNAM1 !VNAM2...? P0 (P1...) |
BXXXXXXX n+ n- <i=expr> <v=expr> <tc1=value> <tc2=value>
+ <temp=value> <dtemp=value>
B1 0 1 I=cos(v(1))+sin(v(2))
B2 0 1 V=ln(cos(log(v(1,2)^2)))-v(3)^4+v(2)^v(1)
B3 3 4 I=17
B4 3 4 V=exp(pi^i(vdd))
B5 2 0 V = V(1) < {Vlow} ? {Vlow} :
+ V(1) > {Vhigh} ? {Vhigh} : V(1)
* B source test Clamped voltage source
* C. P. Basso "Switched-mode power supplies", New York, 2008
.param Vhigh = 4.6
.param Vlow = 0.4
Vin1 1 0 DC 0 PWL(0 0 1u 5)
Bcl 2 0 V = V(1) < Vlow ? Vlow : V(1) > Vhigh ? Vhigh : V(1)
.control
unset askquit
tran 5n 1u
plot V(2) vs V(1)
.endc
.end
.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
Bx 1 0 V = v(pos,neg)*v(pos,neg)
* use of ’hertz’ variable in nonlinear resistor
*.param rbase=1k
* some tests
B1 1 0 V = hertz*v(33)
B2 2 0 V = v(33)*hertz
b3 3 0 V = 6.283e3/(hertz+6.283e3)*v(33)
V1 33 0 DC 0 AC 1
*** Translate R1 10 0 R=’1k/sqrt(HERTZ)’ to B source ***
.Subckt nlres pos neg rb=rbase
* Bx: calculate f(input voltage)
Bx 1 0 v = -1 / {rb} / sqrt(HERTZ) * v(pos, neg)
* Rx: linear resistance
Rx 2 0 1
* Vx: Ammeter to measure current into the resistor
Vx 2 1 DC 0Volts
* Drive the current through Rx back into the circuit
Fx pos neg Vx 1
.ends
Xres 33 10 nlres rb=1k
*Rres 33 10 1k
Vres 10 0 DC 0
.control
define check(a,b) vecmax(abs(a - b))
ac lin 10 100 1k
* some checks
print v(1) v(2) v(3)
if check(v(1), frequency) < 1e-12
echo "INFO: ok"
end
plot vres#branch
.endc
.end
Bdio 1 0 I = pwl(v(A), 0,0, 33,10m, 100,33m, 200,50m)
Blimit b 0 V = pwl(v(1), -4,0, -2,2, 2,4, 4,5, 6,5)
Demonstrates usage of the pwl function in an B source (ASRC)
* Also emulates the TABLE function with limits
.param x0=-4 y0=0
.param x1=-2 y1=2
.param x2=2 y2=-2
.param x3=4 y3=1
.param xx0=x0-1
.param xx3=x3+1
Vin ctrl 0 DC=0V
R1 ctrl 0 2
* no limits outside of the tabulated x values
* (continues linearily)
Btest2 2 0 I = pwl(v(ctrl),’x0’,’y0’,’x1’,’y1’,’x2’,’y2’,
+ ’x3’,’y3’)
* like TABLE function with limits:
Btest3 3 0 I = (v(ctrl) < ’x0’) ? ’y0’ : (v(ctrl) < ’x3’)
+ ? pwl(v(1),’x0’,’y0’,’x1’,’y1’,’x2’,’y2’,’x3’,’y3’) : ’y3’
* more efficient and elegant TABLE function with limits
*(voltage controlled):
Btest4 4 0 I = pwl(v(ctrl),
+ ’xx0’,’y0’, ’x0’,’y0’,
+ ’x1’,’y1’,
+ ’x2’,’y2’,
+ ’x3’,’y3’, ’xx3’,’y3’)
*
* more efficient and elegant TABLE function with limits
* (controlled by current):
Btest5 5 0 I = pwl(-2*i(Vin),
+ ’xx0’,’y0’, ’x0’,’y0’,
+ ’x1’,’y1’,
+ ’x2’,’y2’,
+ ’x3’,’y3’, ’xx3’,’y3’)
Rint2 2 0 1
Rint3 3 0 1
Rint4 4 0 1
Rint5 5 0 1
.control
dc Vin -6 6 0.2
plot v(2) v(3) v(4)-0.5 v(5)+0.5
.endc
.end
* pwl for behavioral R, transient sim
VU1 3 0 DC 9
RR1 3 0 R = pwl(time, 0,1, 7m,1, 8m,1.19, 14m,1.19, 15m,1)
RR2 3 0 R = pwl(time, 0,1, 7m,1, 8m,1.19, 14m,1.19, 15m,1,
+ 15.1m,1)
.tran 100u 20m 0
.probe alli
.control
option noinit
run
display
set xbrushwidth=2
plot rr1#branch rr2#branch ylimit 7 17
.endc
.end
EXXXXXXX n+ n- vol=’expr’
E41 4 0 vol = ’V(3)*V(3)-Offs’
EXXXXXXX n+ n- value={expr}
E41 4 0 value = {V(3)*V(3)-Offs}
Exxx n1 n2 TABLE {expression} = (x0, y0) (x1, y1) (x2, y2)
ECMP 11 0 TABLE {V(10,9)} = (-5mV, 0V) (5mV, 5V)
ELOPASS 4 0 LAPLACE {V(1)}
+ {5 * (s/100 + 1) / (s^2/42000 + s/60 + 1)}
AELOPASS 1 int_4 filter1
.model filter1 s_xfer(gain=5
+ num_coeff=[{1/100} 1]
+ den_coeff=[{1/42000} {1/60} 1]
+ int_ic=[0 0])
ELOPASS 4 0 int_4 0 1
ELOPASS 4 0 LAPLACE {V(1)*v(2)} {10 / (s/6800 + 1)}
BELOPASS int_1 0 V=V(1)*v(2)
AELOPASS int_1 int_4 filter1
.model filter1 s_xfer(gain=10
+ num_coeff=[1]
+ den_coeff=[{1/6800} 1]
+ int_ic=[0])
ELOPASS 4 0 int_4 0 1
EXFER 1 0 FREQ {V(20,21)}= DB
+(1.000000e+07Hz, 1.633257e-07, -1.859873e+01)
+(1.025641e+08Hz, -4.165672e+00, -4.076855e+02)
+(2.000000e+08Hz, -2.798303e-05, -7.519027e+02)
EAND out1 out0 and(2) in1 0 in2 0 (0.5, 0) (2.8, 3.3)
GXXXXXXX n+ n- cur=’expr’ <m=val>
G51 55 225 cur = ’V(3)*V(3)-Offs’
GXXXXXXX n+ n- value=’expr’ <m=val>
G51 55 225 value = ’V(3)*V(3)-Offs’
Gxxx n1 n2 TABLE {expression} =
+ (x0, y0) (x1, y1) (x2, y2) <m=val>
GCMP 0 11 TABLE {V(10,9)} = (-5MV, 0V) (5MV, 5V)
R 11 0 1k
VCCS, VCVS, non-linear dependency
.param Vi=1
.param Offs=’0.01*Vi’
* VCCS depending on V(3)
B21 int1 0 V = V(3)*V(3)
G1 21 22 int1 0 1
* measure current through VCCS
vm 22 0 dc 0
R21 21 0 1
* new VCCS depending on V(3)
G51 55 225 cur = ’V(3)*V(3)-Offs’
* measure current through VCCS
vm5 225 0 dc 0
R51 55 0 1
* VCVS depending on V(3)
B31 int2 0 V = V(3)*V(3)
E1 1 0 int2 0 1
R1 1 0 1
* new VCVS depending on V(3)
E41 4 0 vol = ’V(3)*V(3)-Offs’
R4 4 0 1
* control voltage
V1 3 0 PWL(0 0 100u {Vi})
.control
unset askquit
tran 10n 100u uic
plot i(E1) i(E41)
plot i(vm) i(vm5)
.endc
.end
B source debugging
V1 1 0 1
V2 2 0 -2
E41 4 0 vol = ’V(1)*log(V(2))’
.control
tran 1 1
.endc
.end
Error: -2 out of range for log
calling PTeval, tree =
(v0) * (log (v1))
d / d v0 : log (v1)
d / d v1 : (v0) * ((0.434294) / (v1))
values: var0 = 1
var1 = -2
EXXXX N+ N- POLY(ND) NC1+ NC1- (NC2+ NC2-...) P0 (P1...)
ENONLIN 100 101 POLY(2) 3 0 4 0 0.0 13.6 0.2 0.005
FXXXX N+ N- POLY(ND) V1 (V2 V3 ...) P0 (P1...)
FNONLIN 100 101 POLY(2) VDD Vxx 0 0.0 13.6 0.2 0.005
TXXXXXXX N1 N2 N3 N4 Z0=VALUE <TD=VALUE>
+ <F=FREQ <NL=NRMLEN>> <IC=V1, I1, V2, I2>
T1 1 0 2 0 Z0=50 TD=10NS
OXXXXXXX n1 n2 n3 n4 mname
O23 1 0 2 0 LOSSYMOD
.model LOSSYMOD ltra rel=1 r=12.45 g=0 l=8.972e-9 c=0.468e-12
+len=16 steplimit compactrel=1.0e-3 compactabs=1.0e-14
OCONNECT 10 5 20 5 INTERCONNECT
Name | Parameter
|
Units/Type | Default | Example |
R | resistance/length
|
0.0 | 0.2 | |
L | inductance/length
|
0.0 | 9.13e-9 | |
G | conductance/length
|
0.0 | 0.0 | |
C | capacitance/length
|
0.0 | 3.65e-12 | |
LEN | length of line
|
no default | 1.0 | |
REL | breakpoint control
|
arbitrary unit | 1 | 0.5 |
ABS | breakpoint control
|
1 | 5 | |
NOSTEPLIMIT | don’t limit time-step to less than line delay
|
flag | not set | set |
NO CONTROL | don’t do complex time-step control
|
flag | not set | set |
LININTERP | use linear interpolation
|
flag | not set | set |
MIXEDINTERP | use linear when quadratic seems bad
|
flag | not set | set |
COMPACTREL | special reltol for history compaction
|
RELTOL | 1.0e-3 | |
COMPACTABS | special abstol for history compaction
|
ABSTOL | 1.0e-9 | |
TRUNCNR | use Newton-Raphson method for time-step control
|
flag | not set | set |
TRUNCDONTCUT | don’t limit time-step to keep impulse-response errors low
|
flag | not set | set |
UXXXXXXX n1 n2 n3 mname l=len <n=lumps>
U1 1 2 0 URCMOD L=50U
.model URCMOD URC CPERL=100p RPERL=100k FMAX=10G
URC2 1 12 2 UMODL l=1MIL N=6
Name | Parameter | Units | Default | Example | Area |
K | Propagation Constant | - | 1.5 | 1.2 | - |
FMAX | Maximum Frequency of interest | 1.0 G | 6.5 Meg | - | |
RPERL | Resistance per unit length | 1000 | 10 | - | |
CPERL | Capacitance per unit length | 10e-15 | 1 p | - | |
ISPERL | Saturation Current per unit length | 0 | - | - | |
RSPERL | Diode Resistance per unit length | 0 | - | - |
YXXXXXXX N1 0 N2 0 mname <LEN=LENGTH>
Y1 1 0 2 0 ymod LEN=2
.MODEL ymod txl R=12.45 L=8.972e-9 G=0 C=0.468e-12 length=16
Name | Parameter
|
Units/Type | Default | Example |
R | resistance/length
|
0.0 | 0.2 | |
L | inductance/length
|
0.0 | 9.13e-9 | |
G | conductance/length
|
0.0 | 0.0 | |
C | capacitance/length
|
0.0 | 3.65e-12 | |
LENGTH | length of line
|
no default | 1.0 |
PXXXXXXX NI1 NI2...NIX GND1 NO1 NO2...NOX GND2 mname <LEN=LENGTH>
P1 in1 in2 0 b1 b2 0 PLINE
.model PLINE CPL length={Len}
+R=1 0 1
+L={L11} {L12} {L22}
+G=0 0 0
+C={C11} {C12} {C22}
.param Len=1 Rs=0
+ C11=9.143579E-11 C12=-9.78265E-12 C22=9.143578E-11
+ L11=3.83572E-7 L12=8.26253E-8 L22=3.83572E-7
Name | Parameter
|
Units/Type | Default | Example |
R | resistance/length
|
0.0 | 0.2 | |
L | inductance/length
|
0.0 | 9.13e-9 | |
G | conductance/length
|
0.0 | 0.0 | |
C | capacitance/length
|
0.0 | 3.65e-12 | |
LENGTH | length of line
|
no default | 1.0 |
QXXXXXXX node1 node2 node3 modelname <instpar1=val> <instpar2=val> <off>
.model modelname modeltype mpar1=val mpar2=val ...
M1 dnode1 gnode1 snode1 bnode1 mosnb3 L=0.35u W=2u
.model mosnb3 NMOS level=8 version=3.3.0 tox=6.5n nch=2.4e17 nsub=5e16 vth0=0.3
DXXXXXXX n+ n- mname <area=val> <m=val> <pj=val> <off>
+ <ic=vd> <temp=val> <dtemp=val>
+ <lm=val> <wm=val> <lp=val> <wp=val>
DBRIDGE 2 10 DIODE1
DCLMP aa cc DMOD AREA=3.0 IC=0.2
.model mname type(pname1=pval1 pname2=pval2 ... )
.model DIODE1 D (bv=50 is=1e-13 n=1.05)
.model DMOD D
Name | Parameter
|
Units | Default | Example | Scale factor |
IS (JS) | Saturation current
|
1.0e-14 | 1.0e-16 | area | |
JSW | Sidewall saturation current
|
0.0 | 1.0e-15 | perimeter | |
N | Emission coefficient
|
- | 1 | 1.5 | |
RS | Ohmic resistance
|
0.0 | 100 | ||
BV (VB,VRB,VAR) | Reverse breakdown voltage
|
40 | |||
IBV | Current at breakdown voltage
|
1.0e-3 | 1.0e-4 | ||
NBV | Breakdown Emission Coefficient
|
- | N | 1.2 | |
IKF (IK) | Forward knee current
|
0.0 | 1.0e-3 | ||
IKR | Reverse knee current
|
0.0 | 1.0e-3 | ||
JTUN | Tunneling saturation current
|
0.0 | area | ||
JTUNSW | Tunneling sidewall saturation current
|
0.0 | perimeter | ||
NTUN | Tunneling emission coefficient
|
- | 30 | ||
XTITUN | Tunneling saturation current exponential
|
- | 3 | ||
KEG | EG correction factor for tunneling
|
- | 1.0 | ||
ISR | Recombination saturation current
|
1e-14 | 1pA | area | |
NR | Recombination current emission coefficient
|
- | 2 | 1.5 |
Name | Parameter
|
Units | Default | Example | Scale factor |
CJO (CJ0) | Zero-bias junction bottom-wall capacitance
|
0.0 | 2pF | area | |
CJP (CJSW) | Zero-bias junction sidewall capacitance
|
0.0 | .1pF | perimeter | |
FC | Coefficient for forward-bias depletion bottom-wall capacitance formula
|
- | 0.5 | - | |
FCS | Coefficient for forward-bias depletion sidewall capacitance formula
|
- | 0.5 | - | |
M (MJ) | Area junction grading coefficient
|
- | 0.5 | 0.5 | |
MJSW | Periphery junction grading coefficient
|
- | 0.33 | 0.5 | |
VJ (PB) | Junction potential
|
1 | 0.6 | ||
PHP | Periphery junction potential
|
1 | 0.6 | ||
TT | Transit-time
|
sec | 0 | 0.1ns |
Name | Parameter
|
Units | Default | Example | Scale factor |
LM | Length of metal capacitor
|
0.0 | 4um | SCALE | |
LP | Length of polysilicon capacitor
|
0.0 | 5um | SCALE | |
WM | Width of metal capacitor
|
0.0 | 2um | SCALE | |
WP | Width of polysilicon capacitor
|
0.0 | 4um | SCALE | |
XOM | Thickness of the metal to bulk oxide
|
1e-06 | - | ||
XOI | Thickness of the polysilicon to bulk oxide
|
1e-06 | - | ||
XM | Masking and etching effects in metal
|
0.0 | - | ||
XP | Masking and etching effects in polysilicon
|
0.0 | - | ||
XW | Masking and etching effects
|
m | 0.0 | - |
Name | Parameter
|
Units | Default | Example |
EG | Activation energy
|
1.11 | ||
GAP1 | First bandgap correction factor (TLEV=2)
|
eV | 7.02e-4 | |
GAP2 | Secnd bandgap correction factor (TLEV=2)
|
- | 1108 | |
TNOM (TREF) | Parameter measurement temperature
|
27 | 50 | |
TRS1 (TRS) | 1st order tempco for RS
|
0.0 | - | |
TRS2 | 2nd order tempco for RS
|
0.0 | - | |
TM1 | 1st order tempco for MJ
|
0.0 | - | |
TM2 | 2nd order tempco for MJ
|
0.0 | - | |
TTT1 | 1st order tempco for TT
|
0.0 | - | |
TTT2 | 2nd order tempco for TT
|
0.0 | - | |
XTI | Saturation current temperature exponent
|
- | 3.0 | |
TLEV | Diode temperature equation selector (0,1,2)
|
- | 0 | |
TLEVC | Diode capac. temperature equation selector
|
- | 0 | |
CTA (CTC) | Area junct. cap. temperature coefficient
|
0.0 | - | |
CTP | Perimeter junct. cap. temperature coefficient
|
0.0 | - | |
TCV | Breakdown voltage temperature coefficient
|
0.0 | - |
Name | Parameter | Units | Default | Example | Scale factor |
KF | Flicker noise coefficient | - | 0 | ||
AF | Flicker noise exponent | - | 1 |
DXXXXXXX n+ n- tj mname <off> <ic=vd> thermal
.model DPWR D (bv=16 is=1e-10 n=1.03 rth0=50 cth0=1u)
QXXXXXXX nc nb ne <ns> <tj> mname <area=val> <areac=val>
+ <areab=val> <m=val> <off> <ic=vbe,vce> <temp=val>
+ <dtemp=val>
Q23 10 24 13 QMOD IC=0.6, 5.0
Q50A 11 26 4 20 MOD1
Name | Parameters
|
Units | Default | Example | Scale factor |
SUBS | Substrate connection: 1 for vertical geometry, -1 for lateral geometry
|
1 | |||
IS | Transport saturation current
|
1.0e-16 | 1.0e-15 | area | |
IBE | Base-Emitter saturation current
|
0.0 | 1.0e-16 | area | |
IBC | Base-Collector saturation current
|
0.0 | 1.0e-16 | areab,areac | |
ISS | Reverse saturation current, substrate-to-collector for vertical device or substrate-to-base for lateral
|
0.0 | 1.0e-15 | area | |
BF | Ideal maximum forward beta.
|
- | 100 | 100 | |
NF | Forward current emission coefficient
|
- | 1.0 | 1 | |
VAF (VA) | Forward Early voltage
|
200 | |||
IKF | Corner for forward beta current roll-off
|
0.01 | area | ||
NKF(NK) | High current Beta rolloff exponent
|
- | 0.5 | 0.9 | |
ISE | B-E leakage saturation current.
|
0.0 | 1e-13 | area | |
NE | B-E leakage emission coefficient
|
- | 1.5 | 2 | |
BR | Ideal maximum reverse beta
|
- | 1 | 0.1 | |
NR | Reverse current emission coefficient
|
- | 1 | 1 | |
VAR (VB) | Reverse Early voltage
|
200 | |||
IKR | Corner for reverse beta high current roll-off
|
0.01 | area | ||
ISC | B-C leakage saturation current (scale is `areab’ for vertical devices and `areac’ for lateral)
|
0.0 | 1e-13 | areab,areac | |
NC | B-C leakage emission coefficient
|
- | 2 | 1.5 | |
RB | Zero bias base resistance
|
0 | 100 | 1/area | |
IRB | Current where base resistance falls halfway to its min value
|
0.1 | area | ||
RBM | Minimum base resistance at high currents
|
RB | 10 | 1/area | |
RE | Emitter resistance
|
0 | 1 | 1/area | |
RC | Collector resistance
|
0 | 10 | 1/area | |
CJE | B-E zero-bias depletion capacitance
|
0 | 2pF | area | |
VJE (PE) | B-E built-in potential
|
0.75 | 0.6 | ||
MJE (ME) | B-E junction exponential factor
|
- | 0.33 | 0.33 | |
TF | Ideal forward transit time
|
sec | 0 | 0.1ns | |
XTF | Coefficient for bias dependence of TF
|
- | 0 | ||
VTF | Voltage describing VBC dependence of TF
|
||||
ITF | High-current parameter for effect on TF
|
0 | - | area | |
PTF | Excess phase at freq=
Hz
|
deg | 0 | ||
CJC | B-C zero-bias depletion capacitance (scale is `areab’ for vertical devices and `areac’ for lateral)
|
0 | 2pF | areab,areac | |
VJC (PC) | B-C built-in potential
|
0.75 | 0.5 | ||
MJC | B-C junction exponential factor
|
- | 0.33 | 0.5 | |
XCJC | Fraction of B-C depletion capacitance connected to internal base node
|
- | 1 | ||
TR | Ideal reverse transit time
|
sec | 0 | 10ns | |
CJS | Zero-bias collector-substrate capacitance (scale is `areac’ for vertical devices and `areab’ for lateral)
|
0 | 2pF | areab,areac | |
VJS (PS) | Substrate junction built-in potential
|
0.75 | |||
MJS (MS) | Substrate junction exponential factor
|
- | 0 | 0.5 | |
XTB | Forward and reverse beta temperature exponent
|
- | 0 | ||
EG | Energy gap for temperature effect on IS
|
1.11 | |||
XTI | Temperature exponent for effect on IS
|
- | 3 | ||
KF | Flicker-noise coefficient
|
- | 0 | ||
AF | Flicker-noise exponent
|
- | 1 | ||
FC | Coefficient for forward-bias depletion capacitance formula
|
- | 0.5 | 0 | |
TNOM (TREF) | Parameter measurement temperature
|
27 | 50 | ||
TLEV | BJT temperature equation selector
|
- | 0 | ||
TLEVC | BJT capac. temperature equation selector
|
- | 0 | ||
TRE1 | 1st order temperature coefficient for RE
|
0.0 | 1e-3 | ||
TRE2 | 2nd order temperature coefficient for RE
|
0.0 | 1e-5 | ||
TRC1 | 1st order temperature coefficient for RC
|
0.0 | 1e-3 | ||
TRC2 | 2nd order temperature coefficient for RC
|
0.0 | 1e-5 | ||
TRB1 | 1st order temperature coefficient for RB
|
0.0 | 1e-3 | ||
TRB2 | 2nd order temperature coefficient for RB
|
0.0 | 1e-5 | ||
TRBM1 | 1st order temperature coefficient for RBM
|
0.0 | 1e-3 | ||
TRBM2 | 2nd order temperature coefficient for RBM
|
0.0 | 1e-5 | ||
TBF1 | 1st order temperature coefficient for BF
|
0.0 | 1e-3 | ||
TBF2 | 2nd order temperature coefficient for BF
|
0.0 | 1e-5 | ||
TBR1 | 1st order temperature coefficient for BR
|
0.0 | 1e-3 | ||
TBR2 | 2nd order temperature coefficient for BR
|
0.0 | 1e-5 | ||
TIKF1 | 1st order temperature coefficient for IKF
|
0.0 | 1e-3 | ||
TIKF2 | 2nd order temperature coefficient for IKF
|
0.0 | 1e-5 | ||
TIKR1 | 1st order temperature coefficient for IKR
|
0.0 | 1e-3 | ||
TIKR2 | 2nd order temperature coefficient for IKR
|
0.0 | 1e-5 | ||
TIRB1 | 1st order temperature coefficient for IRB
|
0.0 | 1e-3 | ||
TIRB2 | 2nd order temperature coefficient for IRB
|
0.0 | 1e-5 | ||
TNC1 | 1st order temperature coefficient for NC
|
0.0 | 1e-3 | ||
TNC2 | 2nd order temperature coefficient for NC
|
0.0 | 1e-5 | ||
TNE1 | 1st order temperature coefficient for NE
|
0.0 | 1e-3 | ||
TNE2 | 2nd order temperature coefficient for NE
|
0.0 | 1e-5 | ||
TNF1 | 1st order temperature coefficient for NF
|
0.0 | 1e-3 | ||
TNF2 | 2nd order temperature coefficient for NF
|
0.0 | 1e-5 | ||
TNR1 | 1st order temperature coefficient for IKF
|
0.0 | 1e-3 | ||
TNR2 | 2nd order temperature coefficient for IKF
|
0.0 | 1e-5 | ||
TVAF1 | 1st order temperature coefficient for VAF
|
0.0 | 1e-3 | ||
TVAF2 | 2nd order temperature coefficient for VAF
|
0.0 | 1e-5 | ||
TVAR1 | 1st order temperature coefficient for VAR
|
0.0 | 1e-3 | ||
TVAR2 | 2nd order temperature coefficient for VAR
|
0.0 | 1e-5 | ||
CTC | 1st order temperature coefficient for CJC
|
0.0 | 1e-3 | ||
CTE | 1st order temperature coefficient for CJE
|
0.0 | 1e-3 | ||
CTS | 1st order temperature coefficient for CJS
|
0.0 | 1e-3 | ||
TVJC | 1st order temperature coefficient for VJC
|
0.0 | 1e-5 | ||
TVJE | 1st order temperature coefficient for VJE
|
0.0 | 1e-3 | ||
TITF1 | 1st order temperature coefficient for ITF
|
0.0 | 1e-3 | ||
TITF2 | 2nd order temperature coefficient for ITF
|
0.0 | 1e-5 | ||
TTF1 | 1st order temperature coefficient for TF
|
0.0 | 1e-3 | ||
TTF2 | 2nd order temperature coefficient for TF
|
0.0 | 1e-5 | ||
TTR1 | 1st order temperature coefficient for TR
|
0.0 | 1e-3 | ||
TTR2 | 2nd order temperature coefficient for TR
|
0.0 | 1e-5 | ||
TMJE1 | 1st order temperature coefficient for MJE
|
0.0 | 1e-3 | ||
TMJE2 | 2nd order temperature coefficient for MJE
|
0.0 | 1e-5 | ||
TMJC1 | 1st order temperature coefficient for MJC
|
0.0 | 1e-3 | ||
TMJC2 | 2nd order temperature coefficient for MJC
|
0.0 | 1e-5 |
Name | Parameters
|
Units | Default | Example | Scale factor |
RCO | Epitaxial region resistance
|
0 | 0.45 | 1/area | |
VO | Carrier mobility knee voltage
|
V | 10 | 4.16 | |
GAMMA | Epitaxial region doping factor
|
1e-11 | 1.0e-15 | ||
QCO | Epitaxial region charge factor
|
C | 0.0 | 3.4E-11 | |
VG | Energy gap QS temp. depend.
|
V | 1.206 | 1.2 | |
CN | Temperature exponent of RCI
|
2.42 NPN 2.2 PNP | |||
D | Temperature exponent of VO
|
.87 NPN .52 PNP |
vc c 0 0
vb b 0 1
ve e 0 0
vs s 0 0
Q1 c b e s dt mod1 area=1
.model mod1 npn Level=4 selft=1 rth=100
Q1 c b e s dt mod2
.model mod2 npn Level=9 selft=1 rth=20
X1 dt tamb junction-ambient
VTamb tamb 0 30
.subckt junction-ambient jct amb
rjc jct 1 0.4
ccs 1 0 5m
rcs 1 2 0.1
csa 2 0 30m
rsa 2 amb 1.3
.ends
vc c 0 0
vb b 0 1
ve e 0 0
vs s 0 0
Q1 c b e s dt mod1 area=1
.model mod1 npn Level=8
JXXXXXXX nd ng ns mname <area> <off> <ic=vds,vgs> <temp=t>
J1 7 2 3 JM1 OFF
Name | Parameter
|
Units | Default | Example | Scaling factor |
VTO | Threshold voltage
|
-2.0 | -2.0 | ||
BETA | Transconductance parameter (
)
|
1.0e-4 | 1.0e-3 | area | |
LAMBDA | Channel-length modulation parameter (
)
|
0 | 1.0e-4 | ||
RD | Drain ohmic resistance
|
0 | 100 | 1/area | |
RS | Source ohmic resistance
|
0 | 100 | 1/area | |
CGS | Zero-bias G-S junction capacitance
|
0 | 5pF | area | |
CGD | Zero-bias G-D junction capacitance
|
0 | 1pF | area | |
PB | Gate junction potential
|
1 | 0.6 | ||
IS | Gate saturation current
|
1.0e-14 | 1.0e-14 | area | |
B | Doping tail parameter
|
- | 1 | 1.1 | |
KF | Flicker noise coefficient
|
- | 0 | ||
AF | Flicker noise exponent
|
- | 1 | ||
NLEV | Noise equation selector
|
- | 1 | 3 | |
GDSNOI | Channel noise coefficient for nlev=3
|
1.0 | 2.0 | ||
FC | Coefficient for forward-bias depletion capacitance formula
|
0.5 | |||
TNOM | Parameter measurement temperature
|
27 | 50 | ||
TCV | Threshold voltage temperature coefficient
|
0.0 | 0.01 | ||
VTOTC | Threshold voltage temperature coefficient (alternative model)
|
0.0 | -2.5m | ||
BEX | Mobility temperature exponent
|
- | 0.0 | 1.1 | |
BETATCE | Mobility temperature exponent (alternative model)
|
0.0 | -0.5 | ||
XTI | Gate saturation current temperature coefficient
|
- | 3.0 | ||
EG | Bandgap voltage
|
1.11 |
Name | Description | Units | Default |
ID | Device IDText | Text | PF1 |
ACGAM | Capacitance modulation | - | 0 |
BETA | Linear-region transconductance scale | - | |
CGD | Zero-bias gate-source capacitance | 0 | |
CGS | Zero-bias gate-drain capacitance | 0 | |
DELTA | Thermal reduction coefficient | 0 | |
FC | Forward bias capacitance parameter | - | 0.5 |
HFETA | High-frequency VGS feedback parameter | - | 0 |
HFE1 | HFGAM modulation by VGD | 0 | |
HFE2 | HFGAM modulation by VGS | 0 | |
HFGAM | High-frequency VGD feedback parameter | - | 0 |
HFG1 | HFGAM modulation by VSG | 0 | |
HFG2 | HFGAM modulation by VDG | 0 | |
IBD | Gate-junction breakdown current | 0 | |
IS | Gate-junction saturation current | ||
LFGAM | Low-frequency feedback parameter | - | 0 |
LFG1 | LFGAM modulation by VSG | 0 | |
LFG2 | LFGAM modulation by VDG | 0 | |
MVST | Subthreshold modulation | 0 | |
N | Gate-junction ideality factor | - | 1 |
P | Linear-region power-law exponent | - | 2 |
Q | Saturated-region power-law exponent | - | 2 |
RS | Source ohmic resistance | 0 | |
RD | Drain ohmic resistance | 0 | |
TAUD | Relaxation time for thermal reduction | 0 | |
TAUG | Relaxation time for gamma feedback | 0 | |
VBD | Gate-junction breakdown potential | 1 | |
VBI | Gate-junction potential | 1 | |
VST | Subthreshold potential | 0 | |
VTO | Threshold voltage | -2.0 | |
XC | Capacitance pinch-off reduction factor | - | 0 |
XI | Saturation-knee potential factor | - | 1000 |
Z | Knee transition parameter | - | 0.5 |
RG | Gate ohmic resistance | 0 | |
LG | Gate inductance | 0 | |
LS | Source inductance | 0 | |
LD | Drain inductance | 0 | |
CDSS | Fixed Drain-source capacitance | 0 | |
AFAC | Gate-width scale factor | - | 1 |
NFING | Number of gate fingers scale factor | - | 1 |
TNOM | Nominal Temperature (Not implemented) | 300 K | |
TEMP | Temperature | 300 K |
ZXXXXXXX ND NG NS MNAME <AREA> <OFF> <IC=VDS, VGS>
Z1 7 2 3 ZM1 OFF
Name | Parameter
|
Units | Default | Example | Area |
VTO | Pinch-off voltage
|
-2.0 | -2.0 | ||
BETA | Transconductance parameter
|
1.0e-4 | 1.0e-3 | * | |
B | Doping tail extending parameter
|
0.3 | 0.3 | * | |
ALPHA | Saturation voltage parameter
|
2 | 2 | * | |
LAMBDA | Channel-length modulation parameter
|
0 | 1.0e-4 | ||
RD | Drain ohmic resistance
|
0 | 100 | * | |
RS | Source ohmic resistance
|
0 | 100 | * | |
CGS | Zero-bias G-S junction capacitance
|
0 | 5pF | * | |
CGD | Zero-bias G-D junction capacitance
|
0 | 1pF | * | |
PB | Gate junction potential
|
1 | 0.6 | ||
KF | Flicker noise coefficient
|
- | 0 | ||
AF | Flicker noise exponent
|
- | 1 | ||
FC | Coefficient for forward-bias depletion capacitance formula
|
- | 0.5 |
z1 2 3 0 mesmod area=1.4
.model mesmod nmf level=1 rd=46 rs=46 vt0=-1.3
+ lambda=0.03 alpha=3 beta=1.4e-3
MXXXXXXX nd ng ns nb mname <m=val> <l=val> <w=val>
+ <ad=val> <as=val> <pd=val> <ps=val> <nrd=val>
+ <nrs=val> <off> <ic=vds, vgs, vbs> <temp=t>
M1 24 2 0 20 TYPE1
M31 2 17 6 10 MOSN L=5U W=2U
M1 2 9 3 0 MOSP L=10U W=5U AD=100P AS=100P PD=40U PS=40U
Name | Parameter | Units | Default | Example |
delvto (delvt0) | Threshold voltage shift | 0.0 | 0.07 | |
mulu0 | Low-field mobility multiplier (U0) | - | 1.0 | 0.9 |
Level | Name | Model | Version | Developer | References | Notes |
1 | MOS1 | Shichman-Hodges | - | Berkeley | This is the classical quadratic model. | |
2 | MOS2 | Grove-Frohman | - | Berkeley | Described in [2] | |
3 | MOS3 | Berkeley | A semi-empirical model (see [1]) | |||
4 | BSIM1 | Berkeley | Described in [3] | |||
5 | BSIM2 | Berkeley | Described in [5] | |||
6 | MOS6 | Berkeley | Described in [2] | |||
9 | MOS9 | Alan Gillespie | ||||
8, 49 | BSIM3v0 | 3.0 | Berkeley | extensions by Alan Gillespie | ||
8, 49 | BSIM3v1 | 3.1 | Berkeley | extensions by Serban Popescu | ||
8, 49 | BSIM3v32 | 3.2 - 3.2.4 | Berkeley | Multi version code | ||
8, 49 | BSIM3 | 3.3.0 | Berkeley | Described in [13] | ||
10, 58 | B4SOI | 4.3.1 | Berkeley | |||
14, 54 | BSIM4v5 | 4.0 - 4.5 | Berkeley | Multi version code | ||
14, 54 | BSIM4v6 | 4.6.2 | Berkeley | |||
14, 54 | BSIM4v7 | 4.7.0 | Berkeley | |||
14, 54 | BSIM4 | 4.8.2 | Berkeley | |||
55 | B3SOIFD | Berkeley | ||||
56 | B3SOIDD | Berkeley | ||||
57 | B3SOIPD | Berkeley | ||||
60 | STAG | SOI3 | Southampton | |||
68 | HiSIM2 | 2.8.0 | Hiroshima | |||
73 | HiSIM_HV | 1.2.4/2.2.0 | Hiroshima | High Voltage Version for LDMOS | ||
VDMOS | Power MOS | ngspice team | weak inversion, quasi saturation, self heating | |||
OSDI | see 9.2 | With its OSDI interface all MOS models written in Verilog-A and compiled with OpenVAF are available | ||||
Name | Parameter
|
Units | Default | Example |
---|---|---|---|---|
LEVEL | Model index
|
- | 1 | |
VTO | Zero-bias threshold voltage (
|
0.0 | 1.0 | |
KP | Transconductance parameter
|
2.0e-5 | 3.1e-5 | |
GAMMA | Bulk threshold parameter
|
0.0 | 0.37 | |
PHI | Surface potential (U)
|
0.6 | 0.65 | |
LAMBDA | Channel length modulation (MOS1 and MOS2 only) (
|
0.0 | 0.02 | |
RD | Drain ohmic resistance
|
0.0 | 1.0 | |
RS | Source ohmic resistance
|
0.0 | 1.0 | |
CBD | Zero-bias B-D junction capacitance
|
0.0 | 20fF | |
CBS | Zero-bias B-S junction capacitance
|
0.0 | 20fF | |
IS | Bulk junction saturation current (
)
|
1.0e-14 | 1.0e-15 | |
PB | Bulk junction potential
|
0.8 | 0.87 | |
CGSO | Gate-source overlap capacitance per meter channel width
|
0.0 | 4.0e-11 | |
CGDO | Gate-drain overlap capacitance per meter channel width
|
0.0 | 4.0e-11 | |
CGBO | Gate-bulk overlap capacitance per meter channel width
|
0.0 | 2.0e-11 | |
RSH | Drain and source diffusion sheet resistance
|
0.0 | 10 | |
CJ | Zero-bias bulk junction bottom cap. per sq-meter of junction area
|
0.0 | 2.0e-4 | |
MJ | Bulk junction bottom grading coeff.
|
- | 0.5 | 0.5 |
CJSW | Zero-bias bulk junction sidewall cap. per meter of junction perimeter
|
0.0 | 1.0e-9 | |
MJSW | Bulk junction sidewall grading coeff.
|
- | ||
JS | Bulk junction saturation current
|
|||
TOX | Oxide thickness
|
1.0e-7 | 1.0e-7 | |
NSUB | Substrate doping
|
0.0 | 4.0e15 | |
NSS | Surface state density
|
0.0 | 1.0e10 | |
NFS | Fast surface state density
|
0.0 | 1.0e10 | |
TPG | Type of gate material: +1 opp. to substrate, -1 same as substrate, 0 Al gate
|
- | 1.0 | |
XJ | Metallurgical junction depth
|
0.0 | 1M | |
LD | Lateral diffusion
|
0.0 | 0.8M | |
UO | Surface mobility
|
600 | 700 | |
UCRIT | Critical field for mobility degradation (MOS2 only)
|
1.0e4 | 1.0e4 | |
UEXP | Critical field exponent in mobility degradation (MOS2 only)
|
- | 0.0 | 0.1 |
UTRA | Transverse field coeff. (mobility) (deleted for MOS2)
|
- | 0.0 | 0.3 |
VMAX | Maximum drift velocity of carriers
|
0.0 | 5.0e4 | |
NEFF | Total channel-charge (fixed and mobile) coefficient (MOS2 only)
|
- | 1.0 | 5.0 |
KF | Flicker noise coefficient
|
- | 0.0 | 1.0e-26 |
AF | Flicker noise exponent
|
- | 1.0 | 1.2 |
NLEV | Noise equation selector
|
- | 1 | 3 |
GDSNOI | Channel noise coefficient for nlev=3
|
1.0 | 2.0 | |
FC | Coefficient for forward-bias depletion capacitance formula
|
- | 0.5 | |
DELTA | Width effect on threshold voltage (MOS2 and MOS3)
|
- | 0.0 | 1.0 |
THETA | Mobility modulation (MOS3 only)
|
0.0 | 0.1 | |
ETA | Static feedback (MOS3 only)
|
- | 0.0 | 1.0 |
KAPPA | Saturation field factor (MOS3 only)
|
- | 0.2 | 0.5 |
TNOM | Parameter measurement temperature
|
27 | 50 |
Name | Parameter
|
Units | l/w |
---|---|---|---|
VFB | Flat-band voltage
|
* | |
PHI | Surface inversion potential
|
* | |
K1 | Body effect coefficient
|
* | |
K2 | Drain/source depletion charge-sharing coefficient
|
- | * |
ETA | Zero-bias drain-induced barrier-lowering coefficient
|
- | * |
MUZ | Zero-bias mobility
|
||
DL | Shortening of channel
|
||
DW | Narrowing of channel
|
||
U0 | Zero-bias transverse-field mobility degradation coefficient
|
* | |
U1 | Zero-bias velocity saturation coefficient
|
* | |
X2MZ | Sens. of mobility to substrate bias at v=0
|
* | |
X2E | Sens. of drain-induced barrier lowering effect to substrate bias
|
* | |
X3E | Sens. of drain-induced barrier lowering effect to drain bias at
|
* | |
X2U0 | Sens. of transverse field mobility degradation effect to substrate bias
|
* | |
X2U1 | Sens. of velocity saturation effect to substrate bias
|
* | |
MUS | Mobility at zero substrate bias and at
|
||
X2MS | Sens. of mobility to substrate bias at
|
* | |
X3MS | Sens. of mobility to drain bias at
|
* | |
X3U1 | Sens. of velocity saturation effect on drain bias at Vds=Vdd
|
* | |
TOX | Gate oxide thickness
|
||
TEMP | Temperature where parameters were measured
|
||
VDD | Measurement bias range
|
||
CGDO | Gate-drain overlap capacitance per meter channel width
|
||
CGSO | Gate-source overlap capacitance per meter channel width
|
||
CGBO | Gate-bulk overlap capacitance per meter channel length
|
||
XPART | Gate-oxide capacitance-charge model flag
|
- | |
N0 | Zero-bias subthreshold slope coefficient
|
- | * |
NB | Sens. of subthreshold slope to substrate bias
|
- | * |
ND | Sens. of subthreshold slope to drain bias
|
- | * |
RSH | Drain and source diffusion sheet resistance
|
||
JS | Source drain junction current density
|
||
PB | Built in potential of source drain junction
|
||
MJ | Grading coefficient of source drain junction
|
- | |
PBSW | Built in potential of source, drain junction sidewall
|
||
MJSW | Grading coefficient of source drain junction sidewall
|
- | |
CJ | Source drain junction capacitance per unit area
|
||
CJSW | source drain junction sidewall capacitance per unit length
|
||
WDF | Source drain junction default width
|
||
DELL | Source drain junction length reduction
|
Release | Date | Notes
|
Version flag
|
BSIM3v3.0 | 10/30/1995 | 3.0
|
|
BSIM3v3.1 | 12/09/1996 | 3.1
|
|
BSIM3v3.2 | 06/16/1998 | Revisions available: BSIM3v3.2.2, BSIM3v3.2.3, and BSIM3v3.2.4
Parallel processing with OpenMP is available for BSIM3v3.2.4.
|
3.2, 3.2.2, 3.2.3, 3.2.4
|
BSIM3v3.3 | 07/29/2005 | Parallel processing with OpenMP is available for this model.
|
3.3.0
|
Release | Date | Notes | Version flag |
BSIM4.5.0 | 07/29/2005 | ** | 4.5.0 |
BSIM4.6.5 | 22/09/2009 | ** | 4.6.5 |
BSIM4.7.0 | 04/08/2011 | ** | 4.7 |
BSIM4.8.2 | 10/01/2020 | ** | 4.8 |
MXXXXXXX nd ng ns mname <m=val> <temp=t> <dtemp=t>
.model mname VDMOS <Pchan> <parameters>
M1 24 2 0 IXTH48P20P
.MODEL IXTH48P20P VDMOS Pchan Vds=200 VTO=-4 KP=10 Lambda=5m
+ Mtriode=0.3 Ksubthres=120m Rs=10m Rd=20m Rds=200e6
+ Cgdmax=6000p Cgdmin=100p A=0.25 Cgs=5000p Cjo=9000p
+ Is=2e-6 Rb=20m BV=200 IBV=250e-6 NBV=4 TT=260e-9
Name | Parameter
|
Units | Default | Example |
---|---|---|---|---|
m | device multiplier
|
- | 1 | - |
off | Device initially off
|
- | 0 | |
icvds | Initial D-S voltage
|
0.0 | ||
icvgs | Initial G-S voltage
|
0.0 | ||
temp | device temperature
|
27 | 100 | |
dtemp | device temperature difference
|
0.0 | 50 | |
ic | Vector of D-S, G-S voltages
|
0.0 | ||
thermal | Thermal model switch on/off
|
- | - |
Name | Parameter
|
Units | Default | Example |
---|---|---|---|---|
VDMOS | select VDMOS model
|
- | must given | - |
NCHAN | nch type transistor
|
- | default, if not given | - |
PCHAN | pch type transistor
|
- | required, if PMOS | - |
VTO | Zero-bias threshold voltage (
|
0.0 | 4 | |
KP | Transconductance parameter
|
1.0 | 5.9 | |
PHI | Surface potential
|
|||
LAMBDA | Channel length modulation (
|
0.0 | 0.001 | |
THETA | Vgs influence on mobility
|
0.0 | 0.015 | |
RD | Drain ohmic resistance
|
0.0 | 61m | |
RS | Source ohmic resistance
|
0.0 | 18m | |
RG | Gate ohmic resistance
|
0.0 | 3 | |
KF | Flicker noise coefficient
|
- | 0.0 | |
AF | Flicker noise exponent
|
- | 1.0 | |
TNOM | Parameter measurement temperature
|
27 | 25 | |
RQ | Quasi saturation resistance fitting parameter
|
0.0 | 0.5 | |
VQ | Quasi saturation voltage fitting parameter
|
0.0 | 100 | |
MTRIODE | Conductance multiplier in triode region
|
1.0 | 0.8 | |
SUBSHIFT | shift along gate voltage axis in the dual parameter subthreshold model
|
0.0 | ||
KSUBTHRES | slope in the single parameter subthreshold model
|
- | 0.1 | 0.27 |
BV | Vds breakdown voltage
|
|||
IBV | Current at Vds=bv
|
1.0e-10 | ||
NBV | Vds breakdown emission coefficient
|
- | 1.0 | |
RDS | Drain-source shunt resistance
|
1e7 | ||
RB | Body diode ohmic resistance
|
0.0 | 14m | |
N | Body diode emission coefficient
|
- | 1.0 | 1.1 |
TT | Body diode transit time
|
0.0 | ||
EG | Body diode activation energy for temperature effect on IS
|
1.11 | ||
XTI | Body diode saturation current temperature exponent
|
- | 3.0 | 3.2 |
IS | Body diode saturation current
|
1e-14 | 60p | |
VJ | Body diode junction potential
|
0.8 | ||
FC | Body diode coefficient for forward-bias depletion capacitance formula
|
- | 0.5 | |
CJO | Zero-bias body diode junction capacitance
|
0.0 | 1.5n | |
M | Body diode grading coefficient
|
- | 0.5 | 0.6 |
CGDMIN | Minimum non-linear G-D capacitance
|
0.0 | 10p | |
CGDMAX | Maximum non-linear G-D capacitance
|
0.0 | 2.45n | |
A | Non-linear Cgd capacitance parameter
|
- | 1 | 0.3 |
CGS | Gate-source capacitance
|
0.0 | 1.2n | |
TCVTH (VTOTC) | Linear Vth0 temperature coefficient
|
0.0 | 0.0065 | |
MU (BEX) | Exponent of gain temperature dependency
|
- | -1.5 | -1.27 |
TEXP0 | Drain resistance rd0 temperature exponent
|
- | 1.5 | |
TEXP1 | Drain resistance rd1 temperature exponent
|
- | 0.3 | |
TRD1 | Drain resistance linear temperature coefficient
|
0.0 | ||
TRD2 | Drain resistance quadratic temperature coefficient
|
0.0 | ||
TRG1 | Gate resistance linear temperature coefficient
|
0.0 | ||
TRG2 | Gate resistance quadratic temperature coefficient
|
0.0 | ||
TRS1 | Source resistance linear temperature coefficient
|
0.0 | ||
TRS2 | Source resistance quadratic temperature coefficient
|
0.0 | ||
TRB1 | Body resistance linear temperature coefficient
|
0.0 | ||
TRB2 | Body resistance quadratic temperature coefficient
|
0.0 | ||
TKSUBTHRES1 | Linear temperature coefficient of ksubthres
|
0.0 | ||
TKSUBTHRES2 | Quadratic temperature coefficient of ksubthres
|
0.0 | ||
RTHJC | Thermal resistance junction-case
|
1.0 | 0.4 | |
CTHJ | Thermal capacitance
|
10e-6 | 5e-3 | |
RTHCA | Thermal resistance case-ambient (w/o heatsink)
|
1000 |
MXXXXXXX nd ng ns tj tc mname thermal <m=val> <temp=t> <dtemp=t>
M1 24 2 0 tj tc IXTH48P20P thermal
rcs tc 1 0.1
csa 1 0 30m
rsa 1 amb 1.3
VTamb tamb 0 25
.MODEL IXTH48P20P VDMOS Pchan Vds=200 VTO=-4 KP=10 Lambda=5m
+ Mtriode=0.3 Ksubthres=120m Rs=10m Rd=20m Rds=200e6
+ Cgdmax=6000p Cgdmin=100p A=0.25 Cgs=5000p Cjo=9000p
+ Is=2e-6 Rb=20m BV=200 IBV=250e-6 NBV=4 TT=260e-9
+ Rthjc=0.4 Cthj=5e-3
a1 1 2 amp
.model amp gain(gain=5.0)
a1 %v(1) %v(2) amp
.model amp gain(gain=5.0)
AXXXXXXX <%v,%i,%vd,%id,%g,%gd,%h,%hd, or %d>
+ <[> <~><%v,%i,%vd,%id,%g,%gd,%h,%hd, or %d>
+ <NIN1 or +NIN1 -NIN1 or "null">
+ <~>...<NIN2.. <]> >
+ <%v,%i,%vd,%id,%g,%gd,%h,%hd,%d or %vnam>
+ <[> <~><%v,%i,%vd,%id,%g,%gd,%h,%hd,
or %d><NOUT1 or +NOUT1 -NOUT1>
+ <~>...<NOUT2.. <]>>
+ MODELNAME
.MODEL MODELNAME MODELTYPE
+ <( PARAMNAME1= <[> VAL1 <VAL2... <]>> PARAMNAME2..>)>
a1 [~1 2] 3 nand1
.model nand1 d_nand (rise_delay=0.1 fall_delay=0.2)
Port Type Modifiers | |
Modifier | Interpretation
|
%v | represents a single-ended voltage port - one node name or number is expected for each port.
|
%i | represents a single-ended current port - one node name or number is expected for each port.
|
%g | represents a single-ended voltage-input, current-output (VCCS) port - one node name or number is expected for each port. This type of port is automatically an input/output.
|
%h | represents a single-ended current-input, voltage-output (CCVS) port - one node name or number is expected for each port. This type of port is automatically an input/output.
|
%d | represents a digital port - one node name or number is expected for each port. This type of port may be either an input or an output.
|
%vnam | represents the name of a voltage source, the current through which is taken as an input. This notation is provided primarily in order to allow models defined using SPICE2G6 syntax to operate properly in XSPICE.
|
%vd | represents a differential voltage port - two node names or numbers are expected for each port.
|
%id | represents a differential current port - two node names or numbers are expected for each port.
|
%gd | represents a differential VCCS port - two node names or numbers are expected for each port.
|
%hd | represents a differential CCVS port - two node names or numbers are expected for each port.
|
a1 1 2 amp
.model amp gain(in_offset=0.1 gain=5.0
+ out_offset=-0.01)
a2 [1 2] 3 sum1
.model sum1 summer(in_offset=[0.1 -0.2] in_gain=[2.0 1.0]
+ out_gain=5.0 out_offset=-0.01)
a3 [1 2 3] 4 sigmult
.model sigmult mult(in_offset=[0.1 0.1 -0.1]
+ in_gain=[10.0 10.0 10.0] out_gain=5.0 out_offset=0.05)
.model mname modeltype(pname1=pval1 pname2=pval2 ... )
.model BSIMBULK_osdi_N bsimbulk TYPE=1 GEOMOD=0 RGEOMOD=0 ...
Ndevname node1 ... nodex mname pname1=pval1 pname2=pval2 ...
Np1 z a vdd vdd BSIMBULK_osdi_P l=0.1u w=1u
+ as=0.26235p ad=0.26235p ps=2.51u pd=2.51u
Nn1 z a vss vss BSIMBULK_osdi_N l=0.1u w=0.5u
+ as=0.131175p ad=0.131175p ps=1.52u pd=1.52u
U<name> <basic type> [(<parameter value>*)]
+<digital power node> <digital ground node> <node>*
+<timing model name> <I/O model name>
+[MNTYMXDLY=<delay select value>]
+[IO_LEVEL=<interface subcircuit select value>]
U2 AND(2) $G_DPWR $G_DGND 4 5 6
+ M2 IOM2 IO_LEVEL=0 MNTYMXDLY=2
.MODEL M2 UGATE ()
.MODEL IOM2 UIO (INLD=0 OUTLD=0 DRVH=50 DRVL=50
+ ATOD1="ATOD1" DTOA1="DTOD1" ATOD2="ATOD2" DTOA2="DTOD2"
+ ATOD3="ATOD3" DTOA3="DTOD3" ATOD4="ATOD4" DTOA4="DTOD4"
+ TSWLH1=0 TSWLH2=0 TSWLH3=0 TSWLH4=0
+ TSWHL1=0 TSWHL2=0 TSWHL3=0 TSWHL4=0 DIGPOWER="DIGPOWER")
* ------------------------- 74LV08A ------
* Quad 2-Input And Gate
*
* TI PDF File
* bss 2/21/03
*
.SUBCKT 74LV08A 1A 1B 1Y
+ optional: DPWR_3V=$G_DPWR_3V DGND_3V=$G_DGND_3V
+ params: MNTYMXDLY=0 IO_LEVEL=0
U1 and(2) DPWR_3V DGND_3V
+ 1A 1B 1Y
+ DLY_LV08 IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
.model DLY_LV08 ugate
+ (tplhTY=7.5ns tplhMX=12.3ns tphlTY=7.5ns tphlMX=12.3ns)
.ENDS 74LV08A
ngspice vlnggen source.v
ahdldevice [ inputs ... ] [ outputs ... ]dmod
.model dmod d_cosim simulation=”some/path/source”
ngspice vlnggen -- --timing pwm.v
iverilog -o adc adc.v
aivldevice [ inputs ... ] [ outputs ... ][ inouts ... ]dmod
.model dmod d_cosim simulation=”ivlng” sim_args=[“adc”]
.options opt1 opt2 ... (or opt=optval ...)
.options reltol=.005 trtol=8
.nodeset v(nodnum)=val v(nodnum)=val ...
.nodeset all=val
.nodeset v(12)=4.5 v(4)=2.23
.nodeset all=1.5
.ic v(nodnum)=val v(nodnum)=val ...
.ic v(11)=5 v(4)=-5 v(2)=2.2
.ac dec nd fstart fstop
.ac oct no fstart fstop
.ac lin np fstart fstop
.ac dec 10 1 10K
.ac dec 10 1K 100MEG
.ac lin 100 1 100HZ
Basic RC circuit
r 1 2 1.0
c 2 0 1.0
vin 1 0 dc 0 ac 1 $ <--- the ac source
.options noacct
.ac dec 10 .01 10
.plot ac vdb(2) xlog
.end
.dc srcnam vstart vstop vincr [src2 start2 stop2 incr2]
.dc VIN 0.25 5.0 0.25
.dc VDS 0 10 .5 VGS 0 5 1
.dc VCE 0 10 .25 IB 0 10u 1u
.dc RLoad 1k 2k 100
.dc TEMP -15 75 5
.disto dec nd fstart fstop <f2overf1>
.disto oct no fstart fstop <f2overf1>
.disto lin np fstart fstop <f2overf1>
.disto dec 10 1kHz 100MEG
.disto dec 10 1kHz 100MEG 0.9
.noise v(output <,ref>) src ( dec | lin | oct ) pts fstart fstop
+ <pts_per_summary>
.noise v(5) VIN dec 10 1kHz 100MEG
.noise v(5,3) V1 oct 8 1.0 1.0e6 1
.op
optran !noopiter gminsteps srcsteps tstep tstop supramp
optran 0 0 0 100n 10u 0
optran 1 1 1 100n 10u 0
.pz node1 node2 node3 node4 cur pol
.pz node1 node2 node3 node4 cur zer
.pz node1 node2 node3 node4 cur pz
.pz node1 node2 node3 node4 vol pol
.pz node1 node2 NODE3 node4 vol zer
.pz node1 node2 node3 node4 vol pz
.pz 1 0 3 0 cur pol
.pz 2 3 5 0 vol zer
.pz 4 1 4 1 cur pz
.SENS OUTVAR [< filter ...>] [DC]
.SENS OUTVAR [< filter ...>] AC DEC ND FSTART FSTOP
.SENS OUTVAR [< filter ...>] AC OCT NO FSTART FSTOP
.SENS OUTVAR [< filter ...>] AC LIN NP FSTART FSTOP
.SENS V(1,OUT)
.SENS V(OUT) AC DEC 10 100 100k
.SENS I(VTEST) rbias m*_* q*:*
.sp dec nd fstart fstop <donoise>
.sp oct no fstart fstop <donoise>
.sp lin np fstart fstop <donoise>
.sp dec 10 1 10K
.sp dec 10 1K 100MEG 1
.sp lin 100 1 100HZ
.tf outvar insrc
.tf v(5, 3) VIN
.tf i(VLOAD) VIN
.tran tstep tstop <tstart <tmax>> <uic>
.tran 1ns 100ns
.tran 1ns 1000ns 500ns
.tran 10ns 1us
* Shot noise test with B source, diode
* voltage on device (diode, forward)
Vdev out 0 DC 0 PULSE(0.4 0.45 10u)
* diode, forward direction, to be modeled with noise
D1 mess 0 DMOD
.model DMOD D IS=1e-14 N=1
X1 0 mess out ishot
* device between 1 and 2
* new output terminals of device including noise: 1 and 3
.subckt ishot 1 2 3
* white noise source with rms 1V
* 20000 sample points
VNG 0 11 DC 0 TRNOISE(1 1n 0 0)
*measure the current i(v1)
V1 2 3 DC 0
* calculate the shot noise
* sqrt(2*current*q*bandwidth)
BI 1 3 I=sqrt(2*abs(i(v1))*1.6e-19*1e7)*v(11)
.ends ishot
.tran 1n 20u
.control
run
plot (-1)*i(vdev)
.endc
.end
* white noise, 1/f noise, RTS noise
* voltage source
VRTS2 13 12 DC 0 trnoise(0 0 0 0 5m 18u 30u)
VRTS3 11 0 DC 0 trnoise(0 0 0 0 10m 20u 40u)
VALL 12 11 DC 0 trnoise(1m 1u 1.0 0.1m 15m 22u 50u)
VW1of 21 0 DC trnoise(1m 1u 1.0 0.1m)
* current source
IRTS2 10 0 DC 0 trnoise(0 0 0 0 5m 18u 30u)
IRTS3 10 0 DC 0 trnoise(0 0 0 0 10m 20u 40u)
IALL 10 0 DC 0 trnoise(1m 1u 1.0 0.1m 15m 22u 50u)
R10 10 0 1
IW1of 9 0 DC trnoise(1m 1u 1.0 0.1m)
Rall 9 0 1
* sample points
.tran 1u 500u
.control
run
plot v(13) v(21)
plot v(10) v(9)
.endc
.end
.pss gfreq tstab oscnob psspoints harms sciter steadycoeff <uic>
.pss 150 200e-3 2 1024 11 50 5e-3 uic
.pss 624e6 1u v_plus 1024 10 150 5e-3 uic
.pss 624e6 500n bout 1024 10 100 5e-3 uic
*input file
...
.tran 1ns 1000ns
...
*********************************
.control
run
write outputfile data
.endc
*********************************
.end
File: simple-meas-tran.sp
* Simple .measure examples
* transient simulation of two sine
* signals with different frequencies
vac1 1 0 DC 0 sin(0 1 1k 0 0)
vac2 2 0 DC 0 sin(0 1.2 0.9k 0 0)
.tran 10u 5m
*
.measure tran ... $ for the different inputs see below!
*
.control
run
plot v(1) v(2)
.endc
.end
.MEASURE {DC|AC|TRAN|SP} result TRIG trig_variable VAL=val
+ <TD=td> <CROSS=# | CROSS=LAST> <RISE=# | RISE=LAST>
+ <FALL=# | FALL=LAST> <TRIG AT=time> TARG targ_variable
+ VAL=val <TD=td> <CROSS=# | CROSS=LAST> <RISE=# |
+ RISE=LAST> <FALL=# | FALL=LAST> <TARG AT=time>
.MEASURE {DC|AC|TRAN|SP} result WHEN out_variable=val
+ <TD=td> <FROM=val> <TO=val> <CROSS=# | CROSS=LAST>
+ <RISE=# | RISE=LAST> <FALL=# | FALL=LAST>
.MEASURE {DC|AC|TRAN|SP} result
+ WHEN out_variable=out_variable2
+ <TD=td> <FROM=val> <TO=val> <CROSS=# | CROSS=LAST>
+ <RISE=# | RISE=LAST> <FALL=# | FALL=LAST>
.MEASURE {DC|AC|TRAN|SP} result FIND out_variable
+ WHEN out_variable2=val <TD=td> <FROM=val> <TO=val>
+ <CROSS=# | CROSS=LAST> <RISE=# | RISE=LAST>
+ <FALL=# | FALL=LAST>
.MEASURE {DC|AC|TRAN|SP} result FIND out_variable
+ WHEN out_variable2=out_variable3 <TD=td>
+ <CROSS=# | CROSS=LAST>
+ <RISE=#|RISE=LAST> <FALL=#|FALL=LAST>
.MEASURE {DC|AC|TRAN|SP} result FIND out_variable AT=val
.MEASURE {DC|AC|TRAN|SP} result
+ {AVG|MIN|MAX|PP|RMS|MIN_AT|MAX_AT}
+ out_variable <TD=td> <FROM=val> <TO=val>
.MEASURE {DC|AC|TRAN|SP} result INTEG<RAL> out_variable
+ <TD=td> <FROM=val> <TO=val>
.MEASURE {DC|AC|TRAN|SP} result param=’expression’
.MEASURE {DC|TRAN|AC|SP} result
+ FIND par(’expression’) AT=val
.MEASURE {DC|AC|TRAN|SP} result DERIV<ATIVE> out_variable
+ AT=val
.MEASURE {DC|AC|TRAN|SP} result DERIV<ATIVE> out_variable
+ WHEN out_variable2=val <TD=td>
+ <CROSS=# | CROSS=LAST> <RISE=#|RISE=LAST>
+ <FALL=#|FALL=LAST>
.MEASURE {DC|AC|TRAN|SP} result DERIV<ATIVE> out_variable
+ WHEN out_variable2=out_variable3
+ <TD=td> <CROSS=# | CROSS=LAST>
+ <RISE=#|RISE=LAST> <FALL=#|FALL=LAST>
.meas tran inv_delay2 trig v(in) val=’vp/2’ td=1n fall=1
+ targ v(out) val=’vp/2’ rise=1
.meas tran test_data1 trig AT = 1n targ v(out)
+ val=’vp/2’ rise=3
.meas tran out_slew trig v(out) val=’0.2*vp’ rise=2
+ targ v(out) val=’0.8*vp’ rise=2
.meas tran delay_chk param=’(inv_delay < 100ps) ? 1 : 0’
.meas tran skew when v(out)=0.6
.meas tran skew2 when v(out)=skew_meas
.meas tran skew3 when v(out)=skew_meas fall=2
.meas tran skew4 when v(out)=skew_meas fall=LAST
.meas tran skew5 FIND v(out) AT=2n
.meas tran v0_min min i(v0)
+ from=’dfall’ to=’dfall+period’
.meas tran v0_avg avg i(v0)
+ from=’dfall’ to=’dfall+period’
.meas tran v0_integ integ i(v0)
+ from=’dfall’ to=’dfall+period’
.meas tran v0_rms rms i(v0)
+ from=’dfall’ to=’dfall+period’
.meas dc is_at FIND i(vs) AT=1
.meas dc is_max max i(vs) from=0 to=3.5
.meas dc vds_at when i(vs)=0.01
.meas ac vout_at FIND v(out) AT=1MEG
.meas ac vout_atd FIND vdb(out) AT=1MEG
.meas ac vout_max max v(out) from=1k to=10MEG
.meas ac freq_at when v(out)=0.1
.meas ac vout_diff trig v(out) val=0.1 rise=1 targ v(out)
+ val=0.1 fall=1
.meas ac fixed_diff trig AT = 10k targ v(out)
+ val=0.1 rise=1
.meas ac vout_avg avg v(out) from=10k to=1MEG
.meas ac vout_integ integ v(out) from=20k to=500k
.meas ac freq_at2 when v(out)=0.1 fall=LAST
.meas ac bw_chk param=’(vout_diff < 100k) ? 1 : 0’
.meas ac vout_rms rms v(out) from=10 to=1G
op | conditions |
off | Vbe <= vbefwd and Vbc <= vbcfwd |
saturation | Vbe > vbefwd and Vbc > vbcfwd |
forward | Vbe > vbefwd and Vbc <= vbcfwd |
reverse | Vbe <= vbefwd and Vbc > vbcfwd |
.save vector vector vector ...
.save i(vin) node1 v(node2)
.save @m1[id] vsource#branch
.save all @m2[vdsat]
.print prtype ov1 <ov2 ... ov8>
.print tran v(4) i(vin)
.print dc v(2) i(vsrc) v(23, 17)
.print ac vm(4, 2) vr(7) vp(8, 3)
V(N1<,N2>) | specifies the voltage difference between nodes N1 and N2. If N2 (and the preceding comma) is omitted, ground (0) is assumed. See the print command in the previous section for more details. For compatibility with SPICE2, the following five additional values can be accessed for the ac analysis by replacing the `V’ in V(N1,N2) with:
|
||||||||||
|
|||||||||||
I(VXXXXXXX) | specifies the current flowing in the independent voltage source named VXXXXXXX. Positive current flows from the positive node, through the source, to the negative node. (Not yet implemented: For the ac analysis, the corresponding replacements for the letter I may be made in the same way as described for voltage outputs.)
|
.plot pltype ov1 <(plo1, phi1)> <ov2 <(plo2, phi2)> ... ov8>
.plot dc v(4) v(5) v(1)
.plot tran v(17, 5) (2, 5) i(vin) v(17) (1, 9)
.plot ac vm(5) vm(31, 24) vdb(5) vp(5)
.plot disto hd2 hd3(R) sim2
.plot tran v(5, 3) v(4) (0, 5) v(7) (0, 10)
.four freq ov1 <ov2 ov3 ...>
.four 100K v(5)
.probe alli
.probe I(device)
.probe I(device,node)
* measure current at every node of each device in the circuit
.probe <alli>
* measure current at node 1 of a two-terminal device
.probe I(R1)
* measure current at all nodes of a subcircuit invocation
.probe I(XU1)
* measure current at node 3 of a multi-terminal device M4
.probe I(MQ4,3)
r1#branch
mq4:s#branch
...
ra#branch : current, real, 14579 long
rb#branch : current, real, 14579 long
rl#branch : current, real, 14579 long
time : time, real, 14579 long [default scale]
xu1:cont#branch : current, real, 14579 long
xu1:disc#branch : current, real, 14579 long
xu1:gnd#branch : current, real, 14579 long
xu1:out#branch : current, real, 14579 long
xu1:reset#branch : current, real, 14579 long
xu1:thres#branch : current, real, 14579 long
xu1:trig#branch : current, real, 14579 long
xu1:vcc#branch : current, real, 14579 long
xu2:1#branch : current, real, 14579 long
xu2:19#branch : current, real, 14579 long
...
.probe v(node1)
.probe vd(device:node1:node2)
.probe vd(device1:node1, device2:node2)
* voltage at node named nR1
.probe v(nR1)
* voltage across a two-terminal device named R1
.probe vd(R1)
* voltage at instance node 1 of device m4
.probe vd(m4:1:0)
* voltage between nodes 1 and 3 of device m4
.probe vd(m4:1:3)
* voltage between node 1 of device m4 and node 3 of device m5
.probe vd(m4:1, m5:3)
* m4, m5 are MOS devices, so the following is equivalent:
.probe vd(m4:d, m5:s)
nR1
vd_R1
vd_m4:d:0
vd_m4:d:s
vd_m3:d_m5:s
.probe p(device)
* power dissipation of a subcircuit device
.probe p(XU1)
* power dissipation in a MOS transistor
.probe p(MQ1)
xu1:power
mq1:power
par(’expression’)
output=par(’expression’) $ not in .measure ac
.four 1001 sq1=par(’v(1)*v(1)’)
.measure tran vtest find par(’(v(2)*v(1))’) AT=2.3m
.print tran output=par(’v(1)/v(2)’) v(1) v(2)
.plot dc v(1) diff=par(’(v(4)-v(2))/0.01’) out222
*measure current through R1
V1 1 0 1
R1 1 0 5
R2 1 0 10
* will become
V1 1 0 1
R1 1 11 5
Vmeas 11 0 dc 0
R2 1 0 10
*measure current through R1 and R2
V1 1 0 1
R1 1 0 5
R2 1 0 10
.options savecurrents
*measure all currents of MOS1, BSIM3 and BSIM4 transistors
.options savecurrents_mos1
.options savecurrents_bsim3
.options savecurrents_bsim4
ngspice [ -o logfile] [ -r rawfile] [ -b ] [ -i ] [ input files ]
ngnutmeg [ - ] [ datafile ... ]
Option | Long option | Meaning
|
- | Don’t try to load the default data file ("rawspice.raw") if no other files are given (ngnutmeg only, obsolete).
|
|
-n | --no-spiceinit | Don’t try to source the file .spiceinit upon start-up. Normally ngspice seeks to find it according to the search folder sequence described in 12.6.
|
-t TERM | --terminal=TERM | The program is being run on a terminal with mfb name term (obsolete).
|
-b | --batch | Run in batch mode. Ngspice reads the default input source (e.g. keyboard) or reads the given input file and performs the analyses specified; output is either Spice2-like line-printer plots ("ascii plots") or a ngspice rawfile. See the following section for details. Note that if the input source is not a terminal (e.g. using the IO redirection notation of "<") ngspice defaults to batch mode (-i overrides). This option is valid for ngspice only.
|
-s | --server | Run in server mode. This is like batch mode, except that a temporary rawfile is used and then written to the standard output, preceded by a line with a single "@", after the simulation is done. This mode is used by the ngspice daemon. This option is valid for ngspice only.
Example for using pipes from the console window:
cat adder.cir|ngspice -s|more
|
-i | --interactive | Run in interactive mode. This is useful if the standard input is not a terminal but interactive mode is desired. Command completion is not available unless the standard input is a terminal, however. This option is valid for ngspice only.
|
-r FILE | --rawfile=FILE | Use rawfile as the default file into which the results of the simulation are saved. This option is valid for ngspice only.
|
-p | --pipe | Allow a program (e.g., xcircuit) to act as a GUI frontend for ngspice through a pipe. Thus ngspice will assume that the input pipe is a tty and allow running in interactive mode.
|
-o FILE | --output=FILE | All logs generated during a batch run (-b) will be saved in outfile.
|
-h | --help | A short help statement of the command line syntax.
|
-v | --version | Prints a version information.
|
-a | --autorun | Start simulation immediately, as if a control section
.control
run
.endc
had been added to the input file.
|
--soa-log=FILE | output from Safe Operating Area (SOA) check
|
|
-D | --define | Set a variable (13.8.1), to be used in a .control section.
-D var1 will set a boolean variable named var1,
-D var2=7 will set a variable with its value.
|
* ADDER - 4 BIT ALL-NAND-GATE BINARY ADDER
.control
save vcc#branch
run
plot vcc#branch
rusage all
.endc
* ADDER - 4 BIT ALL-NAND-GATE BINARY ADDER
.control
save vcc#branch
run
write adder.raw vcc#branch
quit
.endc
* ADDER - 4 BIT ALL-NAND-GATE BINARY ADDER
.control
save vcc#branch
tran 1n 500n
plot vcc#branch
rusage time
.endc
* Standard ngspice init file
alias exit quit
alias acct rusage all
** set the number of threads in openmp
** (to the number of physical cores)
** default (if compiled with --enable-openmp) is: 2
set num_threads=8
if $?sharedmode
unset interactive
unset moremode
else
set interactive
set x11lineararcs
end
* comment out if central osdi management is set up
* unset osdi_enabled
* Load the codemodels
if $?xspice_enabled
codemodel ../lib/spice/spice2poly.cm
codemodel ../lib/spice/analog.cm
codemodel ../lib/spice/digital.cm
codemodel ../lib/spice/xtradev.cm
codemodel ../lib/spice/xtraevt.cm
codemodel ../lib/spice/table.cm
end
* Load the OpenVAF/OSDI models
if $?osdi_enabled
osdi ../lib/ngspice/BSIMBULK107.osdi
osdi ../lib/ngspice/BSIMCMG.osdi
osdi ../lib/ngspice/psp103_nqs.osdi
osdi ../lib/ngspice/vbic_4T_et_cf.osdi
end
* .spiceinit for use with Skywater PDK and ngspice KLU
set ngbehavior=hsa ; set compatibility for reading
; PDK libs
set skywaterpdk ; omit some time consuming checks
; during lib loading
set ng_nomodcheck ; don’t check the model parameters
option noinit ; don’t print operating point data
option klu ; select KLU as matrix solver
optran 0 0 0 100p 2n 0 ; don’t use dc operating point,
; but transient op
* User defined ngspice init file
set filetype=ascii
*set ngdebug
*set outputpath=C:\Spice64\out
set ngbehavior = ltpsa
option sparse
cat input.cir|ngspice -s|less
test -s
v1 1 0 1
r1 1 0 2k
.options filetype=ascii
.save i(v1)
.dc v1 -1 1 0.5
.end
cat pipe-circuit.cir | ngspice -p
*pipe-circuit.cir
source circuit.cir
tran 10u 2m
write pcir.raw all
* Circuit.cir
V1 n0 0 SIN(0 10 1kHz)
C1 n1 n0 3.3nF
R1 0 n1 1k
.end
#!/usr/bin/env bash
NGSPICE_COMMAND="ngspice"
rm input.fifo
rm output.fifo
mkfifo input.fifo
mkfifo output.fifo
$NGSPICE_COMMAND -p -i <input.fifo >output.fifo &
exec 3>input.fifo
echo "I can write to input.fifo"
echo "Start processing..."
echo ""
echo "source circuit.cir" >&3
echo "unset askquit" >&3
echo "set nobreak" >&3
echo "tran 0.01ms 0.1ms">&3
echo "print n0" >&3
echo "quit" >&3
echo "Try to open output.fifo ..."
exec 4<output.fifo
echo "I can read from output.fifo"
echo "Ready to read..."
while read output
do
echo $output
done <&4
exec 3>&-
exec 4>&-
echo "End processing"
* Circuit.cir
V1 n0 0 SIN(0 10 1kHz)
C1 n1 n0 3.3nF
R1 0 n1 1k
.end
Flag | Ref. | Short description |
a | complete netlist transformed | |
ps | 12.14.5 | PSPICE compatibility |
hs | 12.14.10 | HSPICE compatibility |
spe | 12.14.9 | Spectre compatibility |
lt | 12.14.6 | LTSPICE compatibility |
s3 | Spice3 compatibility | |
ll | all (currently not used) | |
ki | 12.14.8 | KiCad compatibility |
eg | EAGLE compatibility | |
mc | for ’make check’ |
parameter sweep
* resistive divider, R1 swept from start_r to stop_r
* replaces .STEP R1 1k 10k 1k
R1 1 2 1k
R2 2 0 1k
VDD 1 0 DC 1
.dc VDD 0 1 .1
.control
let start_r = 1k
let stop_r = 10k
let delta_r = 1k
let r_act = start_r
* loop
while r_act le stop_r
alter r1 r_act
run
write dc-sweep.out v(2)
set appendwrite
let r_act = r_act + delta_r
end
plot dc1.v(2) dc2.v(2) dc3.v(2) dc4.v(2) dc5.v(2)
+ dc6.v(2) dc7.v(2) dc8.v(2) dc9.v(2) dc10.v(2)
.endc
.end
R1 1 0 4K7 ; 4.7k
R2 1 0 4R7 ; 4.7
R3 1 0 R47 ; 0.47
R4 1 0 470R ; 470
R5 1 0 47K ; 47k
R6 1 0 47K3 ; 47.3k
R7 1 0 470K ; 470k
R8 1 0 4Meg7 tc1=1e-6 tc2=1e-9 dtemp=6
* ; 4.7Meg <-- Not defined in the RKM notation
R9 1 0 4L7 ; 4.7m
R10 1 0 470L ; 470m
R11 1 0 4M7 ; 4.7m <-- This deviates fom the RKM notation
C1 1 0 4p7 ; 4.7p
C2 1 0 4n7 ; 4.7n
C3 1 0 4u7 ; 4.7u
C4 1 0 4m7 ; 4.7m
C5 1 0 4F7 ; 4.7f <-- This deviates fom the RKM notation
C6 1 0 47p3 ; 4.73p
C7 1 0 470p ; 470p
C8 1 0 4u76 tc1=1e-6 tc2=1e-9 dtemp=6
* ; 4.76u
C9 1 0 4m7 ; 4.7m
C10 1 0 470nF ; 470n
C11 1 0 47fF ; 47f <-- This deviates fom the RKM notation
+ - * / ^ % ,
Operator | Synonym |
gt | > |
lt | < |
ge | >= |
le | <= |
ne | <> |
and | & |
or | | |
not | ! |
eq | = |
Name
|
Function
|
mag(vector)
|
Magnitude of vector (same as abs(vector)).
|
ph(vector)
|
Phase of complex vector, in radians.
|
cph(vector)
|
Phase of complex vector, in radians. Continuous values, no discontinuity at ±
.
|
unwrap(vector)
|
Phase of vector with real phase vector in degrees as input and output. Continuous values, no discontinuity at ±180.
|
j(vector)
|
i (sqrt(-1)) times vector.
|
real(vector)
|
The real component of vector.
|
imag(vector)
|
The imaginary part of vector.
|
conj(vector)
|
The complex conjugate of a vector
|
db(vector)
|
20 log10(mag(vector)).
|
log10(vector)
|
The logarithm (base 10) of vector.
|
ln(vector)
|
The natural logarithm (base e) of vector.
|
exp(vector)
|
e to the vector power.
|
abs(vector)
|
The absolute value of vector (same as mag).
|
sqrt(vector)
|
The square root of vector.
|
sin(vector)
|
The sine of vector.
|
cos(vector)
|
The cosine of vector.
|
tan(vector)
|
The tangent of vector.
|
atan(vector)
|
The inverse tangent of vector.
|
sinh(vector)
|
The hyperbolic sine of vector.
|
cosh(vector)
|
The hyperbolic cosine of vector.
|
tanh(vector)
|
The hyperbolic tangent of vector.
|
atanh(vector)
|
The inverse hyperbolic tangent of vector.
|
floor(vector)
|
Largest integer that is less than or equal to vector.
|
ceil(vector)
|
Smallest integer that is greater than or equal to vector.
|
norm(vector)
|
The vector normalized to 1 (i.e, the largest magnitude of any component is 1).
|
mean(vector)
|
The result is a scalar (a length 1 vector) that is the mean of the elements of vector (elements values added, divided by number of elements).
|
avg(vector)
|
The average of a vector.
Returns a vector where each element is the mean of the preceding elements of the input vector (including the actual element). |
stddev(vector)
|
The result is a scalar (a length 1 vector) that is the standard deviation of the elements of vector .
|
group_delay(vector)
|
Calculates the group delay
. Input is the complex vector of a system transfer function versus frequency, resembling damping and phase per frequency value. Output is a vector of group delay values (real values of delay times) versus frequency.
|
vector(number)
|
The result is a vector of length number, with elements 0, 1, ... number - 1. If number is a vector then just the first element is taken, and if it isn’t an integer then the floor of the magnitude is used.
|
cvector(number)
|
Return a vector of length number, containing complex elements, with the real part values increasing from 0 to number-1, the imaginary values are set to 0.
|
unitvec(number)
|
The result is a vector of length number, all elements having a value 1.
|
Name
|
Function
|
length(vector)
|
The length of vector.
|
interpolate(plot.vector)
|
The result of interpolating the named vector onto the scale of the current plot. This function uses the variable polydegree to determine the degree of interpolation.
|
integ(vector)
|
Integrates over the given vector (versus the real component of the scale vector), using the trapeziodal method. The result is another vector, showing the integral up to the current scale value. See also 11.4.8 for measuring the integral sum for a section of a vector, and 8.2.17 for integration on the fly during a transient simulation.
|
deriv(vector)
|
Calculates the derivative of the given vector. This uses numeric differentiation by interpolating a polynomial. The degree of the polynomal may be set by the variable dpolydegree (default is 2). The procedure may not produce satisfactory results (particularly with iterated differentiation). The implementation only calculates the derivative with respect to the real component of that vector’s scale.
|
vecd(vector)
|
Compute the differential of a vector.
|
vecmin(vector)
|
Returns the value of the vector element with minimum value. Same as minimum.
|
minimum(vector)
|
Returns the value of the vector element with minimum value. Same as vecmin.
|
vecmax(vector)
|
Returns the value of the vector element with maximum value. Same as maximum.
|
maximum(vector)
|
Returns the value of the vector element with maximum value. Same as vecmax.
|
fft(vector)
|
fast fourier transform (13.5.33)
|
ifft(vector)
|
inverse fast fourier transform (13.5.33)
|
sortorder(vector)
|
Returns a vector with the positions of the elements in a real vector after they have been sorted into increasing order using a stable method (qsort).
|
timer(vector)
|
Returns CPU-time minus the value of the first vector element.
|
clock(vector)
|
Returns wall-time minus the value of the first vector element.
|
Name
|
Function
|
rnd(vector)
|
A vector with each component a random integer between 0 and the absolute value of the input vector’s corresponding integer element value.
|
sgauss(vector)
|
Returns a vector of random numbers drawn from a Gaussian distribution (real value, mean = 0 , standard deviation = 1). The length of the vector returned is determined by the input vector. The contents of the input vector will not be used. A call to sgauss(0) will return a single value of a random number as a vector of length 1.
|
sunif(vector)
|
Returns a vector of random real numbers uniformly distributed in the interval [-1 .. 1[. The length of the vector returned is determined by the input vector. The contents of the input vector will not be used. A call to sunif(0) will return a single value of a random number as a vector of length 1.
|
poisson(vector)
|
Returns a vector with its elements being integers drawn from a Poisson distribution. The elements of the input vector (real numbers) are the expected numbers
. Complex vectors are allowed, real and imaginary values are treated separately.
|
exponential(vector)
|
Returns a vector with its elements (real numbers) drawn from an exponential distribution. The elements of the input vector are the respective mean values (real numbers). Complex vectors are allowed, real and imaginary values are treated separately.
|
cos(TIME) + db(v(3))
sin(cos(log([1 2 3 4 5 6 7 8 9 10])))
TIME * rnd(v(9)) - 15 * cos(vin#branch) ^ [7.9e5 8]
not ((ac3.FREQ[32] & tran1.TIME[10]) gt 3)
(sunif(0) ge 0) ? 1.0 : 2.0
mag(fft(v(18)))
Name | Description | Value |
pi | 3.14159... | |
e | (the base of natural logarithms) | 2.71828... |
c | (the speed of light) | 299,792,458 |
i | i (the square root of -1) | |
kelvin | (absolute zero in centigrade) | -273.15 |
echarge | q (the charge of an electron) | 1.60219e-19 C |
boltz | k (Boltzmann’s constant) | 1.38062e-23 |
planck | h (Planck’s constant) | 6.62607e-34 J s |
yes | boolean | 1 |
no | boolean | 0 |
TRUE | boolean | 1 |
FALSE | boolean | 0 |
.control
pre_set strict_errorhandling
unset ngdebug
*save outputs and specials
save x1.x1.x1.7 V(9) V(10) V(11) V(12) V(13)
run
display
* plot the inputs, use offset to plot on top of each other
plot v(1) v(2)+4 v(3)+8 v(4)+12 v(5)+16 v(6)+20 v(7)+24 v(8)+28
* plot the outputs, use offset to plot on top of each other
plot v(9) v(10)+4 v(11)+8 v(12)+12 v(13)+16
.endc
ac ( DEC | OCT | LIN ) N Fstart Fstop
* AC test
Iin 1 0 AC 1
R1 1 2 100
L1 2 0 1
.control
AC LIN 101 10 10K
plot v(2) $ real part !
plot mag(v(2)) $ magnitude
plot db(v(2)) $ same as vdb(2)
plot imag(v(2)) $ imaginary part of v(2)
plot real(v(2)) $ same as plot v(2)
plot phase(v(2)) $ phase in rad
plot cph(v(2)) $ phase in rad, continuous beyond pi
plot 180/PI*phase(v(2)) $ phase in degrees
set units = degrees
plot phase(v(2)) $ phase in degrees
.endc
.end
alias [word] [text ...]
alter dev = <expression>
alter dev param = <expression>
alter @dev[param] = <expression>
alter device value
alter device parameter value [ parameter value ]
alter vd = 0.1
alter vg dc = 0.6
alter @m1[w]= 15e-06
alter @vg[sin] [ -1 1.5 2MEG ]
alter @Vi[pwl] = [ 0 1.2 100p 0 ]
let newfreq = 10k
alter @vg[sin] [ -1 1.5 $&newfreq ] $ vector
set newperiod = 150u
alter @Vi[pwl] = [ 0 1.2 $newperiod 0 ] $ variable
alter m.xm1.msub1 w = 20u
alter @m.xm1.msub1[w] = 20u
altermod mod param = <expression>
altermod @mod[param] = <expression>
altermod nc1 tox = 10e-9
altermod @nc1[tox] = 10e-9
altermod mod1 [mod2 .. mod15] file = <model file name>
altermod mod1 [mod2 .. mod15] file <model file name>
altermod nc1 file = BSIM3_nmos.mod
altermod nc1 pc1 file BSIM4_mos.mod
alterparam paramname=pvalue
alterparam subname paramname=pvalue
.param npar = 5
...
alterparam npar = 7 $ change npar from 5 to 7
reset
.subckt sname
.param subpar = 13
...
.ends
...
alterparam sname subpar = 11 $ change subpar from 13 to 11
reset
asciiplot plotargs
aspice input-file [output-file]
bg_ctrl
bg_halt
bg_run
bug
cd [directory]
cdump
let mc_runs=5
let run=0
...
define agauss(nom, avar, sig) (nom + avar/sig * sgauss(0))
define limit(nom, avar) (nom + ((sgauss(0) >=0) ? avar : -avar))
dowhile run < mc_runs
alter c1=unif(1e-09, 0.1)
...
ac oct 100 250k 10meg
meas ac bw trig vdb(out) val=-10 rise=1 targ vdb(out)
+ val=-10 fall=1
set run="$&run"
...
let run=run + 1
end
plot db({$scratch}.allv)
echo
print {$scratch}.bwh
cdump
circbyline line
circbyline test circuit
circbyline v1 1 0 1
circbyline r1 1 0 1
circbyline .dc v1 0.5 1.5 0.1
circbyline .end
run
plot i(v1)
codemodel [library file]
compose name values value1 [ value2 ... ]
compose name start=val stop=val step=val
compose name center=val span=val step=val
compose name lin=val center=val span=val
compose name lin=val <start=val> <stop=val> <step=val>
compose name (log=val | dec=val | oct=val) start=val stop=val
compose name (log=val | dec=val | oct=val) center=val span=val
compose name gauss=val <mean=val> <sd=val>
compose name unif=val <mean=val> <span=val>
compose name unif=val start=val stop=val
compose event-node-name xspice
compose parameter-name device
start | Value of name[0] (default: 0) | |
stop | Last value of name | |
step | Difference between successive elements of the linearly spaced vector (default: 1) | |
lin | Number of points, linearly spaced | |
log | Number of points, logarithmically spaced | |
dec | Number of points per decade, logarithmically spaced | |
oct | Number of points per octave, logarithmically spaced | |
center | Where to center the range of points | |
span | Size of the range of points (default for uniform distribution: 1) | |
gauss | Number of points, Gaussian distributed | |
mean | Mean value of the Gaussian (default 0) or uniform distribution (default 0.5) | |
sd | Standard deviation for the Gaussian distribution (default 1) | |
unif | Number of points, uniformly distributed |
let cut-tstart = time1
let cut-tstop = time2
cutout
dc Source Vstart Vstop Vincr [ Source2 Vstart2 Vstop2 Vincr2 ]
define function(arg1, arg2, ...) expression
define max(x,y) (x > y) * x + (x <= y) * y
define min(x,y) (x < y) * x + (x >= y) * y
define limit(nom, avar) (nom + ((sgauss(0) >= 0) ? avar : -avar))
deftype [v | p] typename abbrev
deftype v capacitance F
settype capacitance moscap
plot moscap vs v(cc)
delete [ debug-number ... ]
destroy [plotnames | all]
devhelp [-csv] [-type] [-flags] [device_name [parameter]]
devhelp
devhelp resistor
devhelp capacitor ic
devhelp -flags -type bjt
diff plot1 plot2 [vec ...]
display [varname ...]
echo [-n] [text | $variable | $&vector] ...
edit [ file-name ]
edisplay
eprint node [node]
eprint node [node] > nodeout.txt $ output redirected
eprvcd [-t unit][-a] node1 node2 .. noden [ > filename ]
esave all | none | node ...
esave none
fclose handle
fft vector1 [vector2] ...
ngspice 8 -> setplot tran1
ngspice 9 -> linearize V(2)
ngspice 9 -> set specwindow=blackman
ngspice 10 -> fft V(2)
ngspice 11 -> plot mag(V(2))
fopen handle file_name [mode]
fourier fundamental_frequency [expression ...]
* do the transient analysis
tran 1n 1m
* do the fourier analysis
fourier 3.34e6 v(2) v(3) $ first call
fourier 100e6 v(2) v(3) $ second call
* get individual values
let newt1 = fourier11[0][1]
let newt2 = fourier11[1][1]
let newt3 = fourier11[2][1]
let newt4 = fourier12[0][4]
let newt5 = fourier12[1][4]
let newt6 = fourier12[2][4]
* plot magnitude of second expression (v(3))
* from first call versus frequency
plot fourier12[1] vs fourier12[0]
fread result handle [length]
getcwd
gnuplot file plotargs
hardcopy file plotargs
history [-r] [number]
!! | The preceding event. Typing ’!!’ is an easy way to reissue the previous command.
|
!n | Event number n.
|
!-n | The nth previous event. For example, !-1 refers to the immediately preceding event and is equivalent to !!.
|
!str | The unique previous event whose name starts with str.
|
!?str[?] | The unique previous event containing the string str. The closing ’?’ can be omitted if it is followed by a newline.
|
:r | Removes the trailing .str extension from the first selected word.
|
:h | Removes a trailing path name component from the first selected word.
|
:t | Removes all leading path name components from the first selected word.
|
:e | Remove all but the trailing suffix.
|
:p | Print the new command but do not execute it.
|
s/old/new | Substitute new for the first occurrence of old in the event line. Any delimiter may be used in place of `/’. The delimiter may be quoted in old and new with a single backslash. If `&’ appears in new, it is replaced by old. A single backslash will quote the `&’. The final delimiter is optional if it is the last character on the input line.
|
& | Repeat the previous substitution.
|
g a | Cause changes to be applied over the entire event line. Used in conjunction with `s’, as in gs/old/new/, or with `&’.
|
G | Apply the following `s’ modifier once to each word in the event.
|
:0 | The command name
|
[:]^ | The first argument
|
[:]$ | The last argument
|
:n | The nth argument (n
1)
|
:n1-n2 | Words n1 through n2
|
[:]* | Words 1 through $
|
:x* | Words x through $
|
:x- | Words x through ($ - 1)
|
[:]-x | Words 0 through x
|
[:]% | The word matched by the last ?str? search used
|
~ | Expands to the home directory
|
* | Matches any string of characters in a filename
|
? | Matches any single character in a filename
|
[] | Matches any of the characters enclosed in a filename
|
- | Used within [] to specify a range of characters. For example, [b-k] matches on any character between and including ‘b’ through to ‘k’.
|
^ | If the ^ is included within [] as the first character, then it negates the following characters matching on anything but those. For example, [^agm] would match on anything other than ‘a’, ‘g’ and ‘m’. [^a-zA-Z] would match on anything other than an alphabetic character.
|
Left/Right arrow | Move one character to the left or right |
Home/End | Move to beginning or end of line |
Up/Down arrow | Cycle through the history buffer |
C-_- | Undo last editing command |
C-r | Incremental search backward |
TAB | completion of a file name |
C-ak | Erase the command line (kill) |
C-y | Retrieve last kill (yank) |
C-u | Erase from cursor to start of line |
inventory
iplot [-d delay] [-w width][ node ...]
jobs
let name = expr
let a = j(vector(10))reshape a [2][5]let a[0][0] = (pi,pi)
compose a values (pi, pi) (1,1) (2,sqrt(7)) (boltz,e)reshape a [2][2]
linearize vec ...
ngspice 8 -> setplot tran1
ngspice 9 -> linearize V(2)
ngspice 9 -> set specwindow=blackman
ngspice 10 -> fft V(2)
ngspice 11 -> plot mag(V(2))tstep
* original time scale by .tran command is from 0 to 16ns
save out25 out50
run
plot out25 out50
let lin-tstart = 4n $ skip the start-up phase
let lin-tstop = 14n $ end earlier(just for demonstration)
let lin-tstep = 5p
linearize out25 out50
plot out25 out50
listing [logical] [physical] [deck] [expand] [runnable] [param]
source d:\myngspice\inputs\decade_counter.cir
listing r > $inputdir/decade_counter_runnable.cir
load [filename] ...
mc_source
MEAS {DC|AC|TRAN|SP} result TRIG trig_variable VAL=val <TD=td>
<CROSS=# | CROSS=LAST> <RISE=#|RISE=LAST> <FALL=#|FALL=LAST>
<TRIG AT=time> TARG targ_variable VAL=val <TD=td>
<CROSS=# | CROSS=LAST> <RISE=#|RISE=LAST>
<FALL=#|FALL=LAST> <TRIG AT=time>
let vdiff = v(n1)-v(n0)
meas tran vtest find vdiff at=0.04e-3
*the following will not do here:
*meas tran vtest find par(’v(n1)-v(n0)’) at=0.04e-3
mdump <filename>
mrdump <filename>
* Dump matrix and RHS values after 10 and 20 steps
* of a transient simulation
source rc.cir
step 10
mdump m1.txt
mrdump mr1.txt
step 10
mdump m2.txt
mrdump mr2.txt
* just to continue to the end
step 10000
.control
tran 1e-6 1e-3
write test_tran.raw
noise V(out) vinp dec 333 1 1e8 16
print inoise_total onoise_total
*first option to get all of the output (two files)
setplot noise1
write test_noise1.raw all
setplot noise2
write test_noise2.raw all
* second option (all in one raw-file)
write testall.raw noise1.all noise2.all
.endc
op
option [option=val] [option=val] ...
.control
set noinit
option trtol=1
echo
echo trtol=1
run
rusage traniter trantime
reset
option trtol=3
echo
echo trtol=3
run
rusage traniter trantime
reset
option trtol=5
echo
echo trtol=5
run
rusage traniter trantime
reset
option trtol=7
echo
echo trtol=7
run
rusage traniter trantime
plot tran1.v(out25) tran1.v(out50) v(out25) v(out50)
.endc
plot expr1 [vs scale_expr1] [expr2 [vs scale_expr2]] ...
[ylimit ylo yhi] [xlimit xlo xhi] [xindices xilo xihi]
[xcompress comp] [xdelta xdel] [ydelta ydel]
[xlog] [ylog] [loglog] [nogrid]
[linplot] [combplot] [pointplot] [nointerp] [retraceplot]
[polar] [smith] [smithgrid]
[xlabel word] [ylabel word] [title word]
[samep] [linear] [kicad] [plainplot] [digitop]
[all] [allv] [alli] [ally] [alle]
pre_<command>
pre_unset ngdebug
pre_set strict_errorhandling
pre_codemodel mymod.cm
pre_osdi osdi_libs/bsimbulk107.osdi osdi_libs/psp103.osdi
print [col] [line] expr ...
print all
set width=300
print v(1) > outfile.out
psd ave vector1 [vector2] ...
quit
quit [exitcode]
rehash
remcirc
remzerovec
reset
reshape vector vector ...
or
reshape vector vector ... [ dimension, dimension, ... ]
or
reshape vector vector ... [ dimension ][ dimension ] ...
* generate vector with all (here 30) elements
let newvec=vector(30)
* reshape vector to format 3 x 10
reshape newvec [3][10]
* access elements of the reshaped vector
print newvec[0][9]
print newvec[1][5]
let newt = newvec[2][4]
let ntasks=12 ; vector
set nparams=3 ; variable
let p=vector(36) ; new vector
reshape p[$&ntasks][$nparams] ; create format 12 x 3
resume
rspice <input file>
run [rawfile]
rusage [resource ...]
save [all | outvec ...]
save vd_node vs#branch v(vs_node) i(vs2)
save all @mn1[gm]
save 3 x1.x2.x1.x2.8 v.x1.x1.x1.vmeas#branch
save @m.xmos3.mn1[gm]
save none
sens output_variable [filter ...]
sens out_var [filter ...] ac (DEC|OCT|LIN) N Fstart Fstop
set [word]
set [word = value] ...
set [word = ( list of values )] ...
set invar < infile.txt
echo $invar
echo $invar[2]
echo $invar[5]
* testing set input from file
3
NeXt
4
5 and 7
setcs [word]
setcs [word = value] ...
setcirc [circuit number]
setplot
setplot [plotname]
setplot previous
setplot next
setplot new
setscale [vector1] [vector2]
setseed [number]
settype type vector ...
Type | Unit | Type | Unit | |
notype | - | pole | - | |
time | s | zero | - | |
frequency | Hz | s-param | - | |
voltage | V | temp-sweep | Celsius | |
current | A | res-sweep | Ohms | |
voltage-density | V/ | impedance | Ohms | |
current-density | A/ | admittance | S | |
voltage^2-density | V²/ | power | W | |
current^2-density | A²/ | phase | Degree | |
temperature | Celsius | decibel | dB | |
charge | C | capacitance | F |
shell [ command ]
shift [varname] [number]
show devices [ : parameters ] , ...
showmod models [ : parameters ] , ...
showmod #cmosn #cmosp : lkvth0 vth0
netlist for default bipolar transistor
Q1 cc bb ee defbip
.model defbip npn
.control
op
showmod q1
.endc
snload circuit-file file
* SCRIPT: ADDER - 4 BIT BINARY
* script to reload circuit and continue the simulation
* begin with editing the file location
* to be started with ’ngspice adder_snload.script’
.control
* cd to where all files are located
cd D:\Spice_general\ngspice\examples\snapshot
* load circuit and snpashot file
snload adder_mos_circ.cir adder500.snap
* continue simulation
resume
* plot some node voltages
plot v(10) v(11) v(12)
.endc
snsave file
Example input file for snsave
* load a circuit (including transistor models and .tran command)
* starts transient simulation until stop point
* store intermediate data to file
* begin with editing the file location
* to be run with ’ngspice adder_mos.cir’
.include adder_mos_circ.cir
.control
*cd to where all files are located
cd D:\Spice_general\ngspice\examples\snapshot
unset askquit
set noinit
*interrupt condition for the simulation
stop when time > 500n
* simulate
run
* store snapshot to file
snsave adder500.snap
quit
.endc
.END
source infile
sp dec nd fstart fstop <donoise>
sp oct no fstart fstop <donoise>
sp lin np fstart fstop <donoise>
sp dec 10 1 10K
sp dec 10 1K 100MEG 1
sp lin 100 1 100HZ
spec start_freq stop_freq step_freq vector [vector ...]
ngspice 13 -> linearize
ngspice 14 -> set specwindow = "blackman"
ngspice 15 -> spec 10 1000000 1000 v(out)
ngspice 16 -> plot mag(v(out))
status
step [ number ]
stop [ after n] [ when value cond value ] ...
Symbol | Alias | Meaning |
= | eq | equal to |
<> | ne | not equal |
> | gt | greater than |
< | lt | less than |
>= | ge | greater than or equal to |
<= | le | less than or equal to |
strcmp _flag $string1 "string2"
strslice result input offset length
strstr result “$haystack” needle
sysinfo
ngspice 1 -> sysinfo
OS: CYGWIN_NT-5.1 1.5.25(0.156/4/2) 2008-06-12 19:34
CPU: Intel(R) Pentium(R) 4 CPU 3.40GHz
Logical processors: 2
Total DRAM available = 1535.480469 MB.
DRAM currently available = 984.683594 MB.
ngspice 2 ->
tf output_node input_source
* Tf test circuit
vs 1 0 dc 5
r1 1 2 100
r2 2 3 50
r3 3 0 150
r4 2 0 200
.control
tf v(3,5) vs
print all
.endc
.end
trace [ node ...]
tran Tstep Tstop [ Tstart [ Tmax ] ] [ UIC ]
transpose vector vector ...
ngspice > dc vgg 0 5 1 vdd 0 5 1
ngspice > plot i(vdd)
ngspice > reshape all [6,6]
ngspice > transpose i(vdd) v(drain)
ngspice > plot i(vdd) vs v(drain)[0]
unalias [word ...]
undefine [function ...]
undefine *
unlet [vector ...]
unset [word ...]
unset *
version [-s | -f | <version id>]
ngspice 10 -> version
******
** ngspice-39 : Circuit level simulation program
** The U. C. Berkeley CAD Group
** Copyright 1985-1994, Regents of the University
of California.
** Copyright 2001-2023, The ngspice team.
** Please get your ngspice manual from
https://ngspice.sourceforge.io/docs.html
** Please file your bug-reports at
https://ngspice.sourceforge.io/bugrep.html
** Creation Date: Mar 7 2023 17:25:48
******
ngspice 2 ->
ngspice 11 -> version 14
Note: rawfile is version 14 (current version is 39)
ngspice 12 -> version 39
ngspice 13 ->
Note for developers: The option listing returned when version is called with the -f flag is built at compile time using #ifdef blocks. When new compile switches are added, if you want them to appear on the list, you have to modify the code in misccoms.c.
where
<set wr_singlescale>
<set wr_vecnames>
<option numdgt=7>
...
wrdata [file] [vecs]
0.000000e+00 -1.845890e-06 0.000000e+00 0.000000e+00
7.629471e+06 4.243518e-06 7.629471e+06 -4.930171e-06
1.525894e+07 -5.794628e-06 1.525894e+07 4.769020e-06
2.288841e+07 5.086875e-06 2.288841e+07 -3.670687e-06
3.051788e+07 -3.683623e-06 3.051788e+07 1.754215e-06
3.814735e+07 1.330798e-06 3.814735e+07 -1.091843e-06
4.577682e+07 -3.804620e-07 4.577682e+07 2.274678e-06
5.340630e+07 9.047444e-07 5.340630e+07 -3.815083e-06
6.103577e+07 -2.792511e-06 6.103577e+07 4.766727e-06
6.866524e+07 5.657498e-06 6.866524e+07 -2.397679e-06
....
write [file] [exprs]
wrnodev [file]
* Intermediate Transient Solution
* Circuit: KiCad schematic
* Recorded at simulation time: 3.9
.ic v(net-_d1a1-pad2_) = -31.2016
.ic v(-32) = -32
.ic v(out) = -0.267414
.ic v(net-_q5-pad2_) = -26.5798
.ic v(q5tj) = 132.521
.ic v(q5tc) = 105.091
...
stop when time=3.9
tran 20u 6
wrnodev $inputdir/F5ic1.txt
resume
wrnodev $inputdir/F5ic2.txt
...
.include F5ic1.txt
...
wrs2p [file]
!2-port S-parameter file
!Title: test for scattering parameters
!Generated by ngspice at Sat Oct 16 13:51:18 2010
# Hz S RI R 50
!freq ReS11 ImS11 ReS21
2.500000e+06 -1.358762e-03 -1.726349e-02 9.966563e-01
5.000000e+06 -5.439573e-03 -3.397117e-02 9.867253e-01 ...
while condition
statement
...
end
let loopindex = 0
while loopindex < 5
echo index is $&loopindex
let loopindex = loopindex + 1
end
repeat [number]
statement
...
end
* plain number
repeat 3
echo How many loops? Count yourself!
end
echo
* variable
set loops = 7
repeat $loops
echo How many loops? $loops
end
echo
* vector
let loopvec = 4
repeat $&loopvec
echo How many loops? $&loopvec
end
dowhile condition
statement
...
end
let loopindex = 0
dowhile loopindex <> 5
echo index is $&loopindex
let loopindex = loopindex + 1
end
foreach var value ...
statement
...
end
foreach val -40 -20 0 20 40
echo var is $val
end
echo
set myvariable = ( -4 -2 0 2 4 )
foreach var $myvariable
echo var is $var
end
echo
let myvec = vector(5)
foreach var $&myvec
echo var is $var
end
if condition
statement
...
else
statement
...
end
foreach val -40 -20 0 20 40
if $val < 0
echo variable $val is less than 0
else
echo variable $val is greater than or equal to 0
end
end
echo
let vec = 1
if vec = 1 ; if $&vec = 1 is possible as well
echo vec is $&vec
end
label word
goto word
if (1)
...
goto gohere
...
label gohere
end
continue [n]
break [n]
* test node names from subcircuits
Xsub1 a b sub1
.subckt sub1 n11 n12
Xsub2 n11 n12 sub2
R11 n11 int1 1k
R12 n12 int1 1k
.ends
.subckt sub2 n21 n22
R21 n21 int2 1k
R22 n22 int2 1k
.ends
.end
r.xsub1.xsub2.r21 a xsub1.xsub2.int2 1k
r.xsub1.xsub2.r22 b xsub1.xsub2.int2 1k
r.xsub1.r11 a xsub1.int1 1k
r.xsub1.r12 b xsub1.int1 1k
Test sequences for ngspice control structures
*vectors are used (except foreach)
*start in interactive mode
.control
* test sequence for while, dowhile
let loop = 0
echo
echo enter loop with "$&loop"
dowhile loop < 3
echo within dowhile loop "$&loop"
let loop = loop + 1
end
echo after dowhile loop "$&loop"
echo
let loop = 0
while loop < 3
echo within while loop "$&loop"
let loop = loop + 1
end
echo after while loop "$&loop"
let loop = 3
echo
echo enter loop with "$&loop"
dowhile loop < 3
echo within dowhile loop "$&loop" $ output expected
let loop = loop + 1
end
echo after dowhile loop "$&loop"
echo
let loop = 3
while loop < 3
echo within while loop "$&loop" $ no output expected
let loop = loop + 1
end
echo after while loop "$&loop"
* test for while, repeat, if, break
let loop = 0
while loop < 4
let index = 0
repeat
let index = index + 1
if index > 4
break
end
end
echo index "$&index" loop "$&loop"
let loop = loop + 1
end
* test sequence for foreach
echo
foreach outvar 0 0.5 1 1.5
echo parameters: $outvar $ foreach parameters are variables,
$ not vectors!
end
* test for if ... else ... end
echo
let loop = 0
let index = 1
dowhile loop < 10
let index = index * 2
if index < 128
echo "$&index" lt 128
else
echo "$&index" ge 128
end
let loop = loop + 1
end
* simple test for label, goto
echo
let loop = 0
label starthere
echo start "$&loop"
let loop = loop + 1
if loop < 3
goto starthere
end
echo end "$&loop"
* test for label, nested goto
echo
let loop = 0
label starthere1
echo start nested "$&loop"
let loop = loop + 1
if loop < 3
if loop < 3
goto starthere1
end
end
echo end "$&loop"
* test for label, goto
echo
let index = 0
label starthere2
let loop = 0
echo We are at start with index "$&index" and loop "$&loop"
if index < 6
label inhere
let index = index + 1
if loop < 3
let loop = loop + 1
if index > 1
echo jump2
goto starthere2
end
end
echo jump
goto inhere
end
echo We are at end with index "$&index" and loop "$&loop"
* test goto in while loop
let loop = 0
if 1 $ outer loop to allow nested forward label ’endlabel’
while loop < 10
if loop > 5
echo jump
goto endlabel
end
let loop = loop + 1
end
echo before $ never reached
label endlabel
echo after "$&loop"
end
* test for using variables, simple test for label, goto
set loop = 0
label starthe
echo start $loop
let loop = $loop + 1 $ expression needs vector at lhs
set loop = "$&loop" $ convert vector contents to variable
if $loop < 3
goto starthe
end
echo end $loop
.endc
* test for script ’spectrum’
.control
load ring51_41.out
spectrum 10MEG 2500MEG 1MEG v(out25) v(out50)
.endc
* agauss test in ngspice
* generate a sequence of gaussian distributed random numbers.
* test the distribution by sorting the numbers into
* a histogram (buckets)
.control
define agauss(nom, avar, sig) (nom + avar/sig * sgauss(0))
let mc_runs = 200
let run = 0
let no_buck = 8 $ number of buckets
let bucket = unitvec(no_buck) $ each element contains 1
let delta = 3e-11 $ width of each bucket, depends
$ on avar and sig
let lolimit = 1e-09 - 3*delta
let hilimit = 1e-09 + 3*delta
dowhile run < mc_runs
let val = agauss(1e-09, 1e-10, 3) $ get the random number
if (val < lolimit)
let bucket[0] = bucket[0] + 1 $ ’lowest’ bucket
end
let part = 1
dowhile part < (no_buck - 1)
if ((val < (lolimit + part*delta)) &
+ (val > (lolimit + (part-1)*delta)))
let bucket[part] = bucket[part] + 1
break
end
let part = part + 1
end
if (val > hilimit)
* ’highest’ bucket
let bucket[no_buck - 1] = bucket[no_buck - 1] + 1
end
let run = run + 1
end
let part = 0
dowhile part < no_buck
let value = bucket[part] - 1
set value = "$&value"
* print the bucket’s contents
echo $value
let part = part + 1
end
.endc
.end
parameter sweep
* resistive divider, R1 swept from start_r to stop_r
VDD 1 0 DC 1
R1 1 2 1k
R2 2 0 1k
.control
let start_r = 1k
let stop_r = 10k
let delta_r = 1k
let r_act = start_r
* loop
while r_act le stop_r
alter r1 r_act
op
print v(2)
let r_act = r_act + delta_r
end
.endc
.end
** MOSFET Gain Stage (AC):
** Benchmarking Implementation of BSIM4.0.0
** by Weidong Liu 5/16/2000.
** output redirection into file
M1 3 2 0 0 N1 L=1u W=4u
Rsource 1 2 100k
Rload 3 vdd 25k
Vdd vdd 0 1.8
Vin 1 0 1.2 ac 0.1
.control
ac dec 10 100 1000Meg
plot v(2) v(3)
let flen = length(frequency) $ length of the vector
let loopcounter = 0
echo output test > text.txt $ start new file test.txt
* loop
while loopcounter lt flen
let vout2 = v(2)[loopcounter] $ generate a single point
$ complex vector
let vout2re = real(vout2) $ generate a single point
$ real vector
let vout2im = imag(vout2) $ generate a single point
$ imaginary vector
let vout3 = v(3)[loopcounter] $ generate a single
$ point complex vector
let vout3re = real(vout3) $ generate a single point
$ real vector
let vout3im = imag(vout3) $ generate a single point
$ imaginary vector
let freq = frequency[loopcounter] $ generate a single point vector
echo bbb "$&freq" "$&vout2re" "$&vout2im"
+ "$&vout3re" "$&vout3im" >> text.txt
$ append text and
$ data to file
$ (continued from line above)
let loopcounter = loopcounter + 1
end
.endc
.MODEL N1 NMOS LEVEL=14 VERSION=4.8.1 TNOM=27
.end
shell echo $HOME
/home/holger
set myvar2=`/bin/bash -c "echo $HOME"`
echo $myvar2
/home/holger
***** Single NMOS Transistor (Id-Vd), BSIM3V3
*
*** circuit description ***
m1 2 1 3 0 n1 L=0.6u W=10.0u
vgs 1 0 3.5
vds 2 0 3.5
vss 3 0 0
*
.control
dc vds 0 3.5 0.05 vgs 0 3.5 0.5
plot vss#branch
.endc
*
* UCB parameters BSIM3v3.2
.include ../Exam_BSIM3/Modelcards/modelcard.nmos
.include ../Exam_BSIM3/Modelcards/modelcard.pmos
*
.end
.control
run
* white background
set color0=white
* black grid and text (only needed with X11, automatic with MS Win)
set color1=black
* wider plot lines
set xbrushwidth=2
plot vss#branch
.endc
.control
set svg_intopts = ( 512 384 20 0 1 2 0 )
setcs svg_stropts = ( blue Arial Arial )
.endc
.control
* simulation commands here
set hcopydevtype = svg
set svg_intopts = ( 512 384 20 0 1 2 0 )
setcs svg_stropts = ( yellow Arial Arial )
set color1=blue
set color2=green
hardcopy plot_1.svg vss#branch title ’Plot no. 4’
+ xlabel ’Drain voltage’ ylabel ’Drain current’
* plot to screen commands here
.endc
* for MS Windows only
if $oscompiled = 1 | $oscompiled = 8
shell Start plot_1.svg
else
* for CYGWIN, Linux
shell feh --magick-timeout 1 plot_1.svg &
end
.control
* simulation commands here
set gnuplot_terminal=png/quit
gnuplot plot_1 vss#branch vss2#branch
+ title ’Drain current versus drain voltage’
+ xlabel ’Drain voltage / V’ ylabel ’Drain current / uA’
* plot to screen commands here
.endc
* for MS Windows only
if $oscompiled = 1 | $oscompiled = 8
shell Start c:\"program files"\irfanview\i_view64.exe plot_1.png
else
* for CYGWIN, Linux
shell feh --magick-timeout 1 plot_1.png &
end
eprvcd [-t unit][-a] node1 node2 .. noden [ > filename ]
eprvcd 1 2 3 4 5 6 7 8 s0 s1 s2 s3 c3 > adder_x.vcd
* plotting the vcd file (e.g. with GTKWave)
* For Windows: returns control to ngspice
if $oscompiled = 1 | $oscompiled = 8
shell start gtkwave adder_x.vcd --script nggtk.tcl
else
* for CYGWIN, Linux, others
shell gtkwave adder_x.vcd --script nggtk.tcl &
end
# tcl script for gtkwave: show vcd file data created by ngspice
set nfacs [ gtkwave::getNumFacs ]
for {set i 0} {$i < $nfacs } {incr i} {
set facname [ gtkwave::getFacName $i ]
set num_added [ gtkwave::addSignalsFromList $facname ]
}
gtkwave::/Edit/UnHighlight_All
gtkwave::/Time/Zoom/Zoom_Full
* create a new file and write to it
echo new file > nfile.txt
* append line to existing file
echo second line >> nfile.txt
* variable
setcs myvar=great
set empty=""
* vector
let lineno=1
* empty line
echo
* vectors and variables may be included
echo This is a $myvar output with $&lineno line(s).
* no line feed, empty var to allow blank
echo -n This is still a $myvar output $empty
echo with $&lineno line(s).
print [col] [line] expr ...
print v(1) 3*v(2)
gnuplot file plotargs
gnuplot temp vss#branch vss2#branch
+ title ’Drain current versus drain voltage’
+ xlabel ’Drain voltage / V’ ylabel ’Drain current / uA’
gnuplot newplot vss#branch vss2#branch
+ title ’Drain current versus drain voltage’
+ xlabel ’Drain voltage / V’ ylabel ’Drain current / uA’
gnuplot file xycontour expr
****** jfet1.cir ******
*Two-dimensional Junction Field-Effect Transistor (JFET)
VDD 1 0 0.5V
VGG 2 0 -1.0v AC 1V
VSS 3 0 0.0V
QJ1 1 2 3 M_NJF AREA=1 SAVE
.MODEL M_NJF NBJT LEVEL=2
+ options jfet defw=10.0um
+ output rootfile="./j1root/" psi n.conc p.conc phin phip equ.psi vac.psi
+ x.mesh w=0.2 h.e=0.001 r=1.8
+ x.mesh w=0.8 h.s=0.001 h.m=0.1 r=2.0
+ x.mesh w=0.8 h.e=0.001 h.m=0.1 r=2.0
+ x.mesh w=0.2 h.s=0.001 r=1.8
+ y.mesh w=0.2 h.e=0.01 r=1.8
+ y.mesh w=0.8 h.s=0.01 h.m=0.1 r=1.8
+
+ domain num=1 mat=1
+ material num=1 silicon
+
+ elec num=1 x.l=0.0 x.h=0.0 y.l=0.0 y.h=1.0
+ elec num=2 x.l=0.5 x.h=1.5 y.l=0.0 y.h=0.0
+ elec num=3 x.l=2.0 x.h=2.0 y.l=0.0 y.h=1.0
+
+ doping unif n.type conc=3.0e15
+ doping unif p.type conc=2.0e17 x.l=0.2 x.h=1.8 y.h=0.2
+
+ models bgn srh auger conctau concmob fieldmob ^aval
.option bypass=1 temp=27
.control
dc vgg 0.0 -2.0001 -0.1
print i(vss)
load ./j1root/DC.12.qj1
shell ’sleep 1’
gnuplot gplot1 xycontour phin
shell ’sleep 1’
gnuplot gplot2 xycontour sqrt((ex * ex) + (ey * ey))
shell ’sleep 1’
set gnuplot_terminal=png/quit
gnuplot gplot3 xycontour phin
shell ’sleep 1’
gnuplot gplot4 xycontour sqrt((ex * ex) + (ey * ey))
shell ’sleep 1’
quit
.endc
.end
typedef struct vector_info {
char *v_name; /* Same as so_vname */
int v_type; /* Same as so_vtype */
short v_flags; /* Flags (a combination of VF_*) */
double *v_realdata; /* Real data */
ngcomplex_t *v_compdata;/* Complex data */
int v_length; /* Length of the vector */
} vector_info, *pvector_info;
typedef struct vecinfo
{
int number; /* number of vector, as position in the
linked list of vectors, starts with 0 */
char *vecname; /* name of the actual vector */
bool is_real; /* TRUE if the actual vector has real data */
void *pdvec; /* a void pointer to struct dvec *d, the
actual vector */
void *pdvecscale; /* a void pointer to struct dvec *ds,
the scale vector */
} vecinfo, *pvecinfo;
typedef struct vecinfoall
{
/* the plot */
char *name;
char *title;
char *date;
char *type;
int veccount;
/* the data as an array of vecinfo with
length equal to the number of vectors
in the plot */
pvecinfo *vecs;
} vecinfoall, *pvecinfoall;
typedef struct vecvalues {
char* name; /* name of a specific vector */
double creal; /* actual data value */
double cimag; /* actual data value */
NG_BOOL is_scale; /* if ’name’ is the scale vector */
NG_BOOL is_complex; /* if the data are complex numbers */
} vecvalues, *pvecvalues;
typedef struct vecvaluesall {
int veccount; /* number of vectors in plot */
int vecindex; /* index of actual set of vectors, i.e.
the number of accepted data points */
pvecvalues *vecsa; /* values of actual set of vectors,
indexed from 0 to veccount - 1 */
} vecvaluesall, *pvecvaluesall;
ngSpice_Command("source ../examples/adder_mos.cir");
ngSpice_Command("circbyline fail test");
ngSpice_Command("circbyline V1 1 0 1");
ngSpice_Command("circbyline R1 1 0 1");
ngSpice_Command("circbyline .dc V1 0 1 0.1");
ngSpice_Command("circbyline .end");
circarray = (char**)malloc(sizeof(char*) * 7);
circarray[0] = strdup("test array");
circarray[1] = strdup("V1 1 0 1");
circarray[2] = strdup("R1 1 2 1");
circarray[3] = strdup("C1 2 0 1 ic=0");
circarray[4] = strdup(".tran 10u 3 uic");
circarray[5] = strdup(".end");
circarray[6] = NULL;
ngSpice_Circ(circarray);
ngSpice_Command("bg_run");
...
ngSpice_Command("bg_halt");
...
ngSpice_Command("bg_resume");
ngSpice_Command("write testout.raw V(2)");
ngSpice_Command("print V(2)");
blt::vector create Iex
spice::vectoblt Vex#branch Iex
load /somepath/libspice.so
package require spice
spice::source testCapa.cir
spice::spicetoblt example...
blt::graph .cimvd -title "Cim = f(Vd)"
pack .cimvd
.cimvd element create line1 -xdata Vcmd -ydata Cim
package require spice
# Test of virtual capacitor circuit
# Vary the control voltage and log the resulting capacitance
spice::source "testCapa.cir"
set n 30 set dv 0.2
set vmax [expr $dv/2]
set vmin [expr -1 * $dv/2]
set pas [expr $dv/ $n]
blt::vector create Ctmp
blt::vector create Cim
blt::vector create check
blt::vector create Vcmd
blt::graph .cimvd -title "Cim = f(Vd)"
blt::graph .checkvd -title "Rim = f(Vd)"
blt::vector create Iex
blt::vector create freq
blt::graph .freqanal -title "Analyse frequentielle"
#
# First simulation: A simple AC plot
#
set v [expr {$vmin + $n * $pas / 4}]
spice::alter vd = $v
spice::op
spice::ac dec 10 100 100k
spice::vectoblt {Vex#branch} Iex
spice::vectoblt {frequency} freq
pack .freqanal
.freqanal element create line1 -xdata freq -ydata Iex
#
# Second simulation: Capacitance versus voltage control
# for {set i 0} {[expr $n - $i]} {incr i }
# { set v [expr {$vmin + $i * $pas}]
spice::alter vd = $v
spice::op spice::ac dec 10 100 100k
spice::let Cim = real(mean(Vex#branch/(2*Pi*i*frequency*(V(5)-V(6)))))
spice::vectoblt Cim Ctmp
Cim append $Ctmp(0:end)
spice::let err = real(mean(sqrt((Vex#branch-
(2*Pi*i*frequency*Cim*V(5)-V(6)))^2)))
spice::vectoblt err Ctmp check
append $Ctmp(0:end)
FALTA ALGO... Vcmd append $v }
pack .cimvd
.cimvd element create line1 -xdata Vcmd -ydata Cim
pack .checkvd
.checkvd element create line1 -xdata Vcmd -ydata check
./testbench3.tcl
#!/bin/sh
# WishFix \
exec wish "$0" ${1+"$@"}
#
#
#
package require spice
source differentiate.tcl
proc temperatures_calc {temp_inf temp_sup points} {
set tstep [ expr " ( $temp_sup - $temp_inf ) / $points " ]
set t $temp_inf
set temperatures ""
for { set i 0 } { $i < $points } { incr i } {
set t [ expr { $t + $tstep } ]
set temperatures "$temperatures $t"
}
return $temperatures }
proc thermistance_calc { res B points } {
set tzero 273.15
set tref 25
set thermistance ""
foreach t $points {
set res_temp [expr " $res *
+ exp ( $B * ( 1 / ($tzero + $t) -
+ 1 / ( $tzero + $tref ) ) ) " ]
set thermistance "$thermistance $res_temp"
}
return $thermistance }
proc tref_calc { points } {
set tref ""
foreach t $points {
set tref "$tref[expr "6*(2.275-0.005*($t-20))-9"]"
}
return $tref }
### NOTE:
### As component values are modified by a spice::alter
### Component values can be considered as global variable.
### R10 and R12 are not passed to iteration function
### because it is expected to be correct, i.e. to
### have been modified soon before
proc iteration { t } { set tzero 273.15 spice::alter
r11 = [ thermistance_calc 10000 3900 $t ]
# Temperature simulation often crashes. Comment it out...
#spice::set temp = [ expr " $tzero + $t " ]
spice::op
spice::vectoblt vref_temp tref_tmp
### NOTE:
### As the library is executed once for the
### whole script execution, it is important to manage the memory
### and regularly destroy unused data set. The data
### computed here will not be reused. Clean it
spice::destroy all return [ tref_tmp range 0 0 ] }
proc cost { r10 r12 } {
tref_blt length 0
spice::alter r10 = $r10
spice::alter r12 = $r12
foreach point [ temperatures_blt range 0
+ [ expr " [temperatures_blt length ] - 1" ] ] {
+ tref_blt append [ iteration $point ]
}
set result [ blt::vector expr " 1000 *
sum(( tref_blt - expected_blt )^2 )" ]
disp_curve $r10 $r12
return $result }
proc disp_curve { r10 r12 }
+ { .g configure -title "Valeurs optimales: R10 = $r10 R12 = $r12" }
#
# Optimization
# blt::vector create tref_tmp
blt::vector create tref_blt
blt::vector create expected_blt
blt::vector create temperatures_blt temperatures_blt
append [ temperatures_calc -25 75 30 ] expected_blt
append [ tref_calc [temperatures_blt range 0
+ [ expr " [ temperatures_blt length ] - 1" ] ] ]
blt::graph .g
pack .g -side top -fill both -expand true
.g element create real -pixels 4 -xdata temperatures_blt
+ -ydata tref_blt
.g element create expected -fill red -pixels 0 -dashes
+ dot -xdata temperatures_blt -ydata expected_blt
spice::source FB14.cir
set r10r12 [ ::math::optimize::minimumSteepestDescent
+ cost { 10000 10000 } 0.1 50 ]
regexp {([0-9.]*) ([0-9.]*)} $r10r12 r10r12 r10 r12
#
# Results
# spice::alter r10 = $r10
spice::alter r12 = $r12
foreach point [ temperatures_blt range 0
+ [ expr " [temperatures_blt length ] - 1" ] ] {
tref_blt append [ iteration $point ]
}
disp_curve $r10 $r12
#!/bin/sh
# WishFix \
exec wish -f "$0" ${1+"$@"}
###
package require BLT package require spice
namespace import blt::*
wm title . "Vector Test script"
wm geometry . 800x600+40+40 pack propagate . false
stripchart .chart
pack .chart -side top -fill both -expand true
.chart axis configure x -title "Time" spice::source example.cir
spice::bg
run after 1000 vector
create a0 vector
create b0 vectorry
create a1 vector
create b1 vector
create stime
proc bltupdate {} {
puts [spice::spice_data]
spice::spicetoblt a0 a0
spice::spicetoblt b0 b0
spice::spicetoblt a1 a1
spice::spicetoblt b1 b1
spice::spicetoblt time stime
after 100 bltupdate }
bltupdate .chart element create a0 -color red -xdata
+ stime -ydata a0
.chart element create b0 -color blue -xdata stime -ydata b0
.chart element create a1 -color yellow -xdata stime -ydata a1
.chart element create b1 -color black -xdata stime -ydata b1
A Berkeley SPICE3 compatible circuit
*
* This circuit contains only Berkeley SPICE3 components.
*
* The circuit is an AC coupled transistor amplifier with
* a sinewave input at node "1", a gain of approximately -3.9,
* and output on node "coll".
*
.tran 1e-5 2e-3
*
vcc vcc 0 12.0
vin 1 0 0.0 ac 1.0 sin(0 1 1k)
ccouple 1 base 10uF
rbias1 vcc base 100k
rbias2 base 0 24k
q1 coll base emit generic
rcollector vcc coll 3.9k
remitter emit 0 1k
*
.model generic npn
*
.end
SIMPLE DIFFERENTIAL PAIR
VCC 7 0 12
VEE 8 0 -12
VIN 1 0 AC 1
RS1 1 2 1K
RS2 6 0 1K
Q1 3 2 4 MOD1
Q2 5 6 4 MOD1
RC1 7 3 10K
RC2 7 5 10K
RE 4 8 10K
.MODEL MOD1 NPN BF=50 VAF=50 IS=1.E-12 RB=100 CJC=.5PF TF=.6NS
.TF V(5) VIN
.AC DEC 10 1 100MEG
.END
MOS OUTPUT CHARACTERISTICS
.OPTIONS NODE NOPAGE
VDS 3 0
VGS 2 0
M1 1 2 0 0 MOD1 L=4U W=6U AD=10P AS=10P
* VIDS MEASURES ID, WE COULD HAVE USED VDS,
* BUT ID WOULD BE NEGATIVE
VIDS 3 1
.MODEL MOD1 NMOS VTO=-2 NSUB=1.0E15 UO=550
.DC VDS 0 10 .5 VGS 0 5 1
.END
SIMPLE RTL INVERTER
VCC 4 0 5
VIN 1 0 PULSE 0 5 2NS 2NS 2NS 30NS
RB 1 2 10K
Q1 3 2 0 Q1
RC 3 4 1K
.MODEL Q1 NPN BF 20 RB 100 TF .1NS CJC 2PF
.DC VIN 0 5 0.1
.TRAN 1NS 100NS
.END
ADDER - 4 BIT ALL-NAND-GATE BINARY ADDER
*** SUBCIRCUIT DEFINITIONS
.SUBCKT NAND 1 2 3 4
* NODES: INPUT(2), OUTPUT, VCC
Q1 9 5 1 QMOD
D1CLAMP 0 1 DMOD
Q2 9 5 2 QMOD
D2CLAMP 0 2 DMOD
RB 4 5 4K
R1 4 6 1.6K
Q3 6 9 8 QMOD
R2 8 0 1K
RC 4 7 130
Q4 7 6 10 QMOD
DVBEDROP 10 3 DMOD
Q5 3 8 0 QMOD
.ENDS NAND
.SUBCKT ONEBIT 1 2 3 4 5 6
* NODES: INPUT(2), CARRY-IN, OUTPUT, CARRY-OUT, VCC
X1 1 2 7 6 NAND
X2 1 7 8 6 NAND
X3 2 7 9 6 NAND
X4 8 9 10 6 NAND
X5 3 10 11 6 NAND
X6 3 11 12 6 NAND
X7 10 11 13 6 NAND
X8 12 13 4 6 NAND
X9 11 7 5 6 NAND
.ENDS ONEBIT
.SUBCKT TWOBIT 1 2 3 4 5 6 7 8 9
* NODES: INPUT - BIT0(2) / BIT1(2), OUTPUT - BIT0 / BIT1,
* CARRY-IN, CARRY-OUT, VCC
X1 1 2 7 5 10 9 ONEBIT
X2 3 4 10 6 8 9 ONEBIT
.ENDS TWOBIT
.SUBCKT FOURBIT 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
* NODES: INPUT - BIT0(2) / BIT1(2) / BIT2(2) / BIT3(2),
* OUTPUT - BIT0 / BIT1 / BIT2 / BIT3, CARRY-IN, CARRY-OUT, VCC
X1 1 2 3 4 9 10 13 16 15 TWOBIT
X2 5 6 7 8 11 12 16 14 15 TWOBIT
.ENDS FOURBIT
*** DEFINE NOMINAL CIRCUIT
.MODEL DMOD D
.MODEL QMOD NPN(BF=75 RB=100 CJE=1PF CJC=3PF)
VCC 99 0 DC 5V
VIN1A 1 0 PULSE(0 3 0 10NS 10NS 10NS 50NS)
VIN1B 2 0 PULSE(0 3 0 10NS 10NS 20NS 100NS)
VIN2A 3 0 PULSE(0 3 0 10NS 10NS 40NS 200NS)
VIN2B 4 0 PULSE(0 3 0 10NS 10NS 80NS 400NS)
VIN3A 5 0 PULSE(0 3 0 10NS 10NS 160NS 800NS)
VIN3B 6 0 PULSE(0 3 0 10NS 10NS 320NS 1600NS)
VIN4A 7 0 PULSE(0 3 0 10NS 10NS 640NS 3200NS)
VIN4B 8 0 PULSE(0 3 0 10NS 10NS 1280NS 6400NS)
X1 1 2 3 4 5 6 7 8 9 10 11 12 0 13 99 FOURBIT
RBIT0 9 0 1K
RBIT1 10 0 1K
RBIT2 11 0 1K
RBIT3 12 0 1K
RCOUT 13 0 1K
*** (FOR THOSE WITH MONEY (AND MEMORY) TO BURN)
.TRAN 1NS 6400NS
.END
ADDER - 4 BIT ALL-NAND-GATE BINARY ADDER
*** SUBCIRCUIT DEFINITIONS
.SUBCKT NAND in1 in2 out VDD
* NODES: INPUT(2), OUTPUT, VCC
M1 out in2 Vdd Vdd p1 W=7.5u L=0.35u pd=13.5u ad=22.5p
+ ps=13.5u as=22.5p
M2 net.1 in2 0 0 n1 W=3u L=0.35u pd=9u ad=9p
+ ps=9u as=9p
M3 out in1 Vdd Vdd p1 W=7.5u L=0.35u pd=13.5u ad=22.5p
+ ps=13.5u as=22.5p
M4 out in1 net.1 0 n1 W=3u L=0.35u pd=9u ad=9p
+ ps=9u as=9p
.ENDS NAND
.SUBCKT ONEBIT 1 2 3 4 5 6 AND
X2 1 7 8 6 NAND
X3 2 7 9 6 NAND
X4 8 9 10 6 NAND
X5 3 10 11 6 NAND
X6 3 11 12 6 NAND
X7 10 11 13 6 NAND
X8 12 13 4 6 NAND
X9 11 7 5 6 NAND
.ENDS ONEBIT
.SUBCKT TWOBIT 1 2 3 4 5 6 7 8 9
* NODES: INPUT - BIT0(2) / BIT1(2), OUTPUT - BIT0 / BIT1,
* CARRY-IN, CARRY-OUT, VCC
X1 1 2 7 5 10 9 ONEBIT
X2 3 4 10 6 8 9 ONEBIT
.ENDS TWOBIT
.SUBCKT FOURBIT 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
*NODES: INPUT - BIT0(2) / BIT1(2) / BIT2(2) / BIT3(2),
* OUTPUT - BIT0 / BIT1 / BIT2 / BIT3, CARRY-IN,
* CARRY-OUT, VCC
X1 1 2 3 4 9 10 13 16 15 TWOBIT
X2 5 6 7 8 11 12 16 14 15 TWOBIT
.ENDS FOURBIT
*** POWER
VCC 99 0 DC 3.3V
*** INPUTS
VIN1A 1 0 DC 0 PULSE(0 3 0 5NS 5NS 20NS 50NS)
VIN1B 2 0 DC 0 PULSE(0 3 0 5NS 5NS 30NS 100NS)
VIN2A 3 0 DC 0 PULSE(0 3 0 5NS 5NS 50NS 200NS)
VIN2B 4 0 DC 0 PULSE(0 3 0 5NS 5NS 90NS 400NS)
VIN3A 5 0 DC 0 PULSE(0 3 0 5NS 5NS 170NS 800NS)
VIN3B 6 0 DC 0 PULSE(0 3 0 5NS 5NS 330NS 1600NS)
VIN4A 7 0 DC 0 PULSE(0 3 0 5NS 5NS 650NS 3200NS)
VIN4B 8 0 DC 0 PULSE(0 3 0 5NS 5NS 1290NS 6400NS)
*** DEFINE NOMINAL CIRCUIT
X1 1 2 3 4 5 6 7 8 9 10 11 12 0 13 99 FOURBIT
.option acct
.save V(1) V(2) V(3) V(4) V(5) V(6) V(7) V(8) $ INPUTS
.save V(9) V(10) V(11) V(12) V(13) $ OUTPUTS
.TRAN 1NS 6400NS
* use BSIM3 model with default parameters
.model n1 nmos level=49 version=3.3.0
.model p1 pmos level=49 version=3.3.0
.END
Transmission-line inverter
v1 1 0 pulse(0 1 0 0.1n)
r1 1 2 50
x1 2 0 0 4 tline
r2 4 0 50
.subckt tline 1 2 3 4
t1 1 2 3 4 z0=50 td=1.5ns
t2 2 0 4 0 z0=100 td=1ns
.ends tline
.tran 0.1ns 20ns
.end
Built-in function | Notes
|
gauss(nom, rvar, sigma) | nominal value plus variation drawn from Gaussian distribution with mean 0 and standard deviation rvar (relative to nominal), divided by sigma
|
agauss(nom, avar, sigma) | nominal value plus variation drawn from Gaussian distribution with mean 0 and standard deviation avar (absolute), divided by sigma
|
unif(nom, rvar) | nominal value plus relative variation (to nominal) uniformly distributed between +/-rvar
|
aunif(nom, avar) | nominal value plus absolute variation uniformly distributed between +/-avar
|
limit(nom, avar) | nominal value +/-avar, depending on random number in [-1, 1] being > 0 or < 0
|
* random number tests
.param aga = agauss(1,2,3)
.param aga2=’2*aga’
.param lim=limit(0,1.2)
.func rgauss(a,b,c) ’5*agauss(a,b,c)’
* always same value as defined above
v1 1 0 ’lim’
v2 2 0 ’lim’
* may be a different value
v3 3 0 ’limit(0,1.2)’
* always new random values
v11 11 0 ’agauss(1,2,3)’
v12 12 0 ’agauss(1,2,3)’
v13 13 0 ’agauss(1,2,3)’
* same value as defined above
v14 14 0 ’aga’
v15 15 0 ’aga’
v16 16 0 ’aga2’
* using .func, new random values
v17 17 0 ’rgauss(0,2,3)’
v18 18 0 ’rgauss(0,2,3)’
.op
.control
run
print v(1) v(2) v(3) v(11) v(12) v(13)
print v(14) v(15) v(16) v(17) v(18)
.endc
.end
* random resistor
.param res = 10k
.param ttime=12000m
.param varia=100
.param ttime10 = ’ttime/varia’
* random control voltage (Gaussian distribution)
VR2 r2 0 dc 0 trrandom (2 ’ttime10’ 0 1)
* behavioral resistor
R2 4 6 R = ’res + 0.033 * res*V(r2)’
Name | Function
|
rnd(vector) | A vector with each component a random integer between 0 and the absolute value of the input vector’s corresponding integer element value.
|
sgauss(vector) | Returns a vector of random numbers drawn from a Gaussian distribution (real value, mean = 0 , standard deviation = 1). The length of the vector returned is determined by the input vector. The contents of the input vector will not be used. A call to sgauss(0) will return a single value of a random number as a vector of length 1..
|
sunif(vector) | Returns a vector of random real numbers uniformly distributed in the interval [-1 .. 1]. The length of the vector returned is determined by the input vector. The contents of the input vector will not be used. A call to sunif(0) will return a single value of a random number as a vector of length 1.
|
poisson(vector) | Returns a vector with its elements being integers drawn from a Poisson distribution. The elements of the input vector (real numbers) are the expected numbers
. Complex vectors are allowed, real and imaginary values are treated separately.
|
exponential(vector) | Returns a vector with its elements (real numbers) drawn from an exponential distribution. The elements of the input vector are the respective mean values (real numbers). Complex vectors are allowed, real and imaginary values are treated separately.
|
* monte carlo
V1 1 0 1
R1 1 0 rmod
.model rmod res (r={gauss(2, 0.03, 1)} TC1=3.3e-3)
R2 1 0 rmod
R3 1 0 R = {gauss(2, 0.03, 1)}
R4 1 0 R = {gauss(2, 0.03, 1)}
.save @R1[i] @R2[i] @R3[i] @R4[i]
* monte carlo result (current through R)
@r1[i] = 5.044575e-01
@r2[i] = 5.044575e-01
@r3[i] = 5.418674e-01
@r4[i] = 4.942051e-01
Perform Monte Carlo simulation in ngspice
V1 N001 0 AC 1 DC 0
R1 N002 N001 141
*
C1 OUT 0 1e-09
L1 OUT 0 10e-06
C2 N002 0 1e-09
L2 N002 0 10e-06
L3 N003 N002 40e-06
C3 OUT N003 250e-12
*
R2 0 OUT 141
*
.control
let mc_runs = 100
let run = 1
set curplot = new $ create a new plot
set scratch = $curplot $ store its name to ’scratch’
*
define unif(nom, var) (nom + nom*var * sunif(0))
define aunif(nom, avar) (nom + avar * sunif(0))
define gauss(nom, var, sig) (nom + nom*var/sig * sgauss(0))
define agauss(nom, avar, sig) (nom + avar/sig * sgauss(0))
*
dowhile run <= mc_runs
* alter c1 = unif(1e-09, 0.1)
* alter l1 = aunif(10e-06, 2e-06)
* alter c2 = aunif(1e-09, 100e-12)
* alter l2 = unif(10e-06, 0.2)
* alter l3 = aunif(40e-06, 8e-06)
* alter c3 = unif(250e-12, 0.15)
alter c1 = gauss(1e-09, 0.1, 3)
alter l1 = agauss(10e-06, 2e-06, 3)
alter c2 = agauss(1e-09, 100e-12, 3)
alter l2 = gauss(10e-06, 0.2, 3)
alter l3 = agauss(40e-06, 8e-06, 3)
alter c3 = gauss(250e-12, 0.15, 3)
ac oct 100 250K 10Meg
set run ="$&run" $ create a variable from the vector
set dt = $curplot $ store the current plot to dt
setplot $scratch $ make ’scratch’ the active plot
* store the output vector to plot ’scratch’
let vout{$run}={$dt}.v(out)
setplot $dt $ go back to the previous plot
let run = run + 1
end
plot db({$scratch}.all)
.endc
.end
# This file: pl-v4mag.p
# ngspice file OpWien.sp
# ngspice command:
# gnuplot pl4mag v4mag xlimit 500 1500
# a gnuplot manual:
# http://www.duke.edu/~hpgavin/gnuplot.html
# Gauss function to be fitted
f1(x)=(c1/(a1*sqrt(2*3.14159))*exp(-((x-b1)**2)/(2*a1**2)))
# Gauss function to plot start graph
f2(x)=(c2/(a2*sqrt(2*3.14159))*exp(-((x-b2)**2)/(2*a2**2)))
# start values
a1=50 ; b1=900 ; c1=50
# keep start values in a2, b2, c2
a2=a1 b2=b1 ; c2=c1
# curve fitting
fit f1(x) ’pl4mag.data’ using 1:2 via a1, b1, c1
# plot original and fitted curves with new a1, b1, c1
plot "pl4mag.data" using 1:2 with lines, f1(x), f2(x)
Small Signal Amplifier
*
* This circuit simulates a simple small signal amplifier.
*
Vin Input 0 0 SIN(0 .1 500Hz)
R_source Input Amp_In 100
C1 Amp_In 0 1uF
R_Amp_Input Amp_In 0 1MEG
E1 (Amp_Out 0) (Amp_In 0) -10
R_Load Amp_Out 0 1000
.Tran 1.0u 0.01
.end
Small Signal Amplifier with Limit Diodes
*
* This circuit simulates a small signal amplifier
* with a diode limiter.
*
.dc Vin -1 1 .05
Vin Input 0 DC 0
R_source Input Amp_In 100
D_Neg 0 Amp_In 1n4148
D_Pos Amp_In 0 1n4148
C1 Amp_In 0 1uF
X1 Amp_In 0 Amp_Out Amplifier
R_Load Amp_Out 0 1000
.model 1n4148 D (is=2.495e-09 rs=4.755e-01 n=1.679e+00
+ tt=3.030e-09 cjo=1.700e-12 vj=1 m=1.959e-01 bv=1.000e+02
+ ibv=1.000e-04)
.subckt Amplifier Input Common Output
E1 (Output Common) (Input Common) -10
R_Input Input Common 1meg
.ends Amplifier
.end
.model 1n4148 D (is=2.495e-09 rs=4.755e-01 n=1.679e+00
+ tt=3.030e-09 cjo=1.700e-12 vj=1 m=1.959e-01
+ bv=1.000e+02 ibv=1.000e-04)
X1 Amp_In 0 Amp_Out
.subckt <Name> <Node1> <Node2> <Node3> ...
.ends <Name>
Small Signal Amplifier
*
* This circuit simulates a small signal amplifier
* with a diode limiter.
*
.dc Vin -1 1 .05
Vin Input 0 DC 0
R_source Input Amp_In 100
D_Neg 0 Amp_In 1n4148
D_Pos Amp_In 0 1n4148
C1 Amp_In 0 1uF
A1 Amp_In 0 Amp_Out Amplifier
R_Load Amp_Out 0 1000
.model 1n4148 D (is=2.495e-09 rs=4.755e-01 n=1.679e+00
+ tt=3.030e-09 cjo=1.700e-12 vj=1 m=1.959e-01 bv=1.000e+02
+ ibv=1.000e-04)
.model Amplifier Amp (gain = -10 in_offset = 1e-3
+ rin = 1meg rout = 0.4)
.end
Supply ramping option
*
* This circuit demonstrates the use of the option
* "ramptime" that ramps independent sources and the
* capacitor and inductor initial conditions from
* zero to their final value during the time period
* specified.
*
*
.tran 0.1 5
.option ramptime=0.2
* a1 1 0 cap
.model cap capacitor (c=1000uf ic=1)
r1 1 0 1k
*
a2 2 0 ind
.model ind inductor (l=1H ic=1)
r2 2 0 1.0
*
v1 3 0 1.0
r3 3 0 1k
*
i1 4 0 1e-3
r4 4 0 1k
*
v2 5 0 0.0 sin(0 1 0.3 0 0 45.0)
r5 5 0 1k
*
.end
Code Model Test: new xxor
*
*** analysis type ***
.tran .01s 4s
*
*** input sources ***
*
v2 200 0 DC PWL( (0 0.0) (2 0.0) (2.0000000001 1.0) (3 1.0) )
*
v1 100 0 DC PWL( (0 0.0) (1.0 0.0) (1.0000000001 1.0) (2 1.0)
+ (2.0000000001 0.0) (3 0.0) (3.0000000001 1.0) (4 1.0) )
*
*** resistors to ground ***
r1 100 0 1k
r2 200 0 1k
*
*** adc_bridge blocks ***
aconverter [200 100] [2 1] adc_bridge1
.model adc_bridge1 adc_bridge (in_low=0.1 in_high=0.9
+ rise_delay=1.0e-12 fall_delay=1.0e-12)
*
*** xor block ***
a7 [1 2] 70 d_xor1
.model d_xor1 d_xxor (rise_delay=1.0e-6 fall_delay=2.0e-6
+ input_load=1.0e-12)
*
*** dac_bridge blocks ****
abridge1 [70] [out] dac1
.model dac1 dac_bridge(out_low = 0.7 out_high = 3.5
+ out_undef = 2.2 input_load = 5.0e-12 t_rise = 50e-9
+ t_fall = 20e-9)
*
*** simulation and plotting ***
.control
run
plot allv
.endc
*
.end
A transistor amplifier circuit
*
.tran 1e-5 2e-3
*
vin 1 0 0.0 ac 1.0 sin(0 1 1k)
*
ccouple 1 in 10uF
rzin in 0 19.35k
*
aamp in aout gain_block
.model gain_block gain (gain = -3.9 out_offset = 7.003)
*
rzout aout coll 3.9k
rbig coll 0 1e12
*
.end
Mixed IO types
* This circuit contains a mixture of IO types, including
* analog, digital, user-defined (real), and ’null’.
*
* The circuit demonstrates the use of the digital and
* user-defined node capability to model system-level designs
* such as sampled-data filters. The simulated circuit
* contains a digital oscillator enabled after 100us. The
* square wave oscillator output is divided by 8 with a
* ripple counter. The result is passed through a digital
* filter to convert it to a sine wave.
*
.tran 1e-5 1e-3
*
v1 1 0 0.0 pulse(0 1 1e-4 1e-6)
r1 1 0 1k
*
abridge1 [1] [enable] atod
.model atod adc_bridge
*
aclk [enable clk] clk nand
.model nand d_nand (rise_delay=1e-5 fall_delay=1e-5)
*
adiv2 div2_out clk NULL NULL NULL div2_out dff
adiv4 div4_out div2_out NULL NULL NULL div4_out dff
adiv8 div8_out div4_out NULL NULL NULL div8_out dff
.model dff d_dff
abridge2 div8_out enable filt_in node_bridge2
.model node_bridge2 d_to_real (zero=-1 one=1)
*
xfilter filt_in clk filt_out dig_filter
*
abridge3 filt_out a_out node_bridge3
.model node_bridge3 real_to_v
*
rlpf1 a_out oa_minus 10k
*
xlpf 0 oa_minus lpf_out opamp
*
rlpf2 oa_minus lpf_out 10k
clpf lpf_out oa_minus 0.01uF
***************************************
.subckt dig_filter filt_in clk filt_out
.model n0 real_gain (gain=1.0)
.model n1 real_gain (gain=2.0)
.model n2 real_gain (gain=1.0)
.model g1 real_gain (gain=0.125)
.model zm1 real_delay
.model d0a real_gain (gain=-0.75)
.model d1a real_gain (gain=0.5625)
.model d0b real_gain (gain=-0.3438)
.model d1b real_gain (gain=1.0)
*
an0a filt_in x0a n0
an1a filt_in x1a n1
an2a filt_in x2a n2
*
az0a x0a clk x1a zm1
az1a x1a clk x2a zm1
*
ad0a x2a x0a d0a
ad1a x2a x1a d1a
*
az2a x2a filt1_out g1
az3a filt1_out clk filt2_in zm1
*
an0b filt2_in x0b n0
an1b filt2_in x1b n1
an2b filt2_in x2b n2
*
az0b x0b clk x1b zm1
az1b x1b clk x2b zm1
*
ad0 x2b x0b d0b
ad1 x2b x1b d1b
*
az2b x2b clk filt_out zm1
.ends dig_filter
.subckt opamp plus minus out
*
r1 plus minus 300k
a1 %vd (plus minus) outint lim
.model lim limit (out_lower_limit = -12 out_upper_limit = 12
+ fraction = true limit_range = 0.2 gain=300e3)
r3 outint out 50.0
r2 out 0 1e12
*
.ends opamp
*
.end
Default Types | ||
Type | Description | Valid Directions |
d | digital | any |
g | conductance (VCCS) | inout |
gd | differential conductance (VCCS) | inout |
h | resistance (CCVS) | inout |
hd | differential resistance (CCVS) | inout |
i | current | in or out |
id | differential current | in or out |
v | voltage | in or out |
vd | differential voltage | in or out |
<identifier> | user-defined type | any |
/* Define local pointer variable */
double *local.x;
/* Allocate storage to be referenced by the static variable x. */
/* Do this only if this is the initial call of the code model. */
if (INIT == TRUE) {
STATIC_VAR(x) = calloc(size, sizeof(double));
}
/* Assign the value from the static pointer value to the local */
/* pointer variable. */
local_x = STATIC_VAR(x);
/* Assign values to first two members of the array */
local_x[0] = 1.234;
local_x[1] = 5.678;
void code.model(ARGS) /* private structure accessed by
accessor macros */
{
/* The following code fragments are intended to show how
information in the argument list is accessed. The reader
should not attempt to relate one fragment to another.
Consider each fragment as a separate example.
*/
double p,/* variable for use in the following code fragments */
x, /* variable for use in the following code fragments */
y; /* variable for use in the following code fragments */
int i, /* indexing variable for use in the following */
j; /* indexing variable for use in the following */
UDN_Example_Type *a_ptr, /* A pointer used to access a
User-Defined Node type */
*y_ptr; /* A pointer used to access a
User-Defined Node type */
/* Initializing and outputting a User-Defined Node result */
if(INIT) {
OUTPUT(y) = malloc(sizeof(user.defined.struct));
y_ptr = OUTPUT(y);
y_ptr->component1 = 0.0;
y_ptr->component2 = 0.0;
}
else {
y_ptr = OUTPUT(y);
y_ptr->component1 = x1;
y_ptr->component2 = x2;
}
/* Determining analysis type */
if(ANALYSIS == AC) {
/* Perform AC analysis-dependent operations here */
}
/* Accessing a parameter value from the .model card */
p = PARAM(gain);
/* Accessing a vector parameter from the .model card */
for(i = 0; i < PARAM_SIZE(in_offset); i++)
p = PARAM(in_offset[i]);
/* Accessing the value of a simple real-valued input */
x = INPUT(a);
/* Accessing a vector input and checking for null port */
if( ! PORT_NULL(a))
for(i = 0; i < PORT_SIZE(a); i++)
x = INPUT(a[i]);
/* Accessing a digital input */
x = INPUT(a);
/* Accessing the value of a User-Defined Node input... */
/* This node type includes two elements in its definition. */
a_ptr = INPUT(a);
x = a_ptr->component1;
y = a_ptr->component2;
/* Outputting a simple real-valued result */
OUTPUT(out1) = 0.0;
/* Outputting a vector result and checking for null */
if( ! PORT_NULL(a))
for(i = 0; i < PORT_SIZE(a); i++)
OUTPUT(a[i]) = 0.0;
/* Outputting the partial of output out1 w.r.t. input a */
PARTIAL(out1,a) = PARAM(gain);
/* Outputting the partial of output out2(i) w.r.t. input b(j) */
for(i = 0; i < PORT_SIZE(out2); i++) {
for(j = 0; j < PORT_SIZE(b); j++) {
PARTIAL(out2[i],b[j]) = 0.0;
}
}
/* Outputting gain from input c to output out3 in an
AC analysis */
complex_gain_real = 1.0;
complex_gain_imag = 0.0;
AC_GAIN(out3,c) = complex_gain;
/* Outputting a digital result */
OUTPUT_STATE(out4) = ONE;
/* Outputting the delay for a digital or user-defined output */
OUTPUT_DELAY(out5) = 1.0e-9;
}
Name | Type | Args | Description
|
AC_GAIN | Complex_t | y[i],x[i] | AC gain of output y with respect to input x.
|
ANALYSIS | enum | <none> | Type of analysis: DC, AC, TRANSIENT.
|
ARGS | Mif_Private_t | <none> | Standard argument to all code model function.
|
CALLBACK | Mif_Callback_t | <none> | Pointer to callback function
|
CALL_TYPE | enum | <none> | Type of model evaluation call: ANALOG or EVENT.
|
INIT | Boolean_t | <none> | Is this the first call to the model?
|
INPUT | double, int or void* | name[i] | Value of analog input port, or value of structure pointer for User-Defined Node port.
|
INPUT_STATE | enum | name[i] | State of a digital input: ZERO, ONE, or UNKNOWN.
|
INPUT_STRENGTH | enum | name[i] | Strength of digital input: STRONG, RESISTIVE, HI IMPEDANCE, or UNDETERMINED.
|
INPUT_TYPE | char* | name[i] | The port type of the input.
|
LOAD | double | name[i] | The digital load value placed on a port by this model.
|
MESSAGE | char* | name[i] | A message output by a model on an event-driven node.
|
OUTPUT | double, int or void* | name[i] | Value of the analog output port or value of structure pointer for User-Defined Node port.
|
OUTPUT_CHANGED | Boolean_t | name[i] | Has a new value been assigned to this event-driven output by the model?
|
OUTPUT_DELAY | double | name[i] | Delay in seconds for an event-driven output.
|
OUTPUT_STATE | enum | name[i] | State of a digital output: ZERO, ONE, or UNKNOWN.
|
OUTPUT_STRENGTH | enum | name[i] | Strength of digital output: STRONG, RESISTIVE, HI_IMPEDANCE, or UNDETERMINED.
|
OUTPUT_TYPE | char* | name[i] | The port type of the output.
|
PARAM | CD | name[i] | Value of the parameter.
|
PARAM_NULL | Boolean_t | name[i] | Was the parameter not included on the SPICE .model card ?
|
PARAM_SIZE | int | name | Size of parameter vector.
|
PARTIAL | double | y[i],x[i] | Partial derivative of output y with respect to input x.
|
PORT_NULL | Mif_Boolean_t | name | Has this port been specified as unconnected?
|
PORT_SIZE | int | name | Size of port vector.
|
RAD_FREQ | double | <none> | Current analysis frequency in radians per second.
|
STATIC_VAR | CD | name | Value of a static variable.
|
STATIC_VAR_SIZE | int | name | Size of static var vector (currently unused).
|
T(n) | int | index | Current and previous analysis times (T(0) = current analysis time, T(1) = previous analysis time).
|
TEMPERATURE | double | <none> | Current analysis temperature.
|
TIME | double | <none> | Current analysis time (same as T(0) for ANALOG calls). In EVENT calls it is the event time and may lie between T(1) and T(0).
|
TOTAL_LOAD | double | name[i] | The total of all loads on the node attached to this event driven port.
|
Name | Type | Description
|
MALLOCED_PTR | void * | Assign pointer to allocated structure to this macro
|
STRUCT_PTR | void * | A pointer to a structure of the defined type
|
STRUCT_PTR_1 | void * | A pointer to a structure of the defined type
|
STRUCT_PTR_2 | void * | A pointer to a structure of the defined type
|
EQUAL | Mif_Boolean_t | Assign TRUE or FALSE to this macro according to the results of structure comparison
|
INPUT_STRUCT_PTR | void * | A pointer to a structure of the defined type
|
OUTPUT_STRUCT_PTR | void * | A pointer to a structure of the defined type
|
INPUT_STRUCT_PTR_ARRAY | void ** | An array of pointers to structures of the defined type
|
INPUT_STRUCT_PTR_ARRAY_SIZE | int | The size of the array
|
STRUCT_MEMBER_ID | char * | A string naming some part of the structure
|
PLOT_VAL | double | The value of the specified structure member for plotting purposes
|
PRINT_VAL | char * | The value of the specified structure member for printing purposes
|
#include <stdio.h>
#include "ngspice/cm.h"
#include "ngspice/evtudn.h"
void *tmalloc(size_t);
#define TMALLOC(t,n) (t*) tmalloc(sizeof(t)*(size_t)(n))
/* macro to ignore unused variables and parameters */
#define NG_IGNORE(x) (void)x
/* ************************************************* */
static void udn_int_create(CREATE_ARGS)
{
/* Malloc space for an int */
MALLOCED_PTR = TMALLOC(int, 1);
}
/* ************************************************* */
static void udn_int_dismantle(DISMANTLE_ARGS)
{
NG_IGNORE(STRUCT_PTR);
/* Do nothing. There are no internally malloc’ed
things to dismantle */
}
/* ************************************************* */
static void udn_int_initialize(INITIALIZE_ARGS)
{
int *int_struct = (int *) STRUCT_PTR;
/* Initialize to zero */
*int_struct = 0;
}
/* ************************************************* */
static void udn_int_invert(INVERT_ARGS)
{
int *int_struct = (int *) STRUCT_PTR;
/* Invert the state */
*int_struct = -(*int_struct);
}
/* ************************************************* */
static void udn_int_copy(COPY_ARGS)
{
int *int_from_struct = (int *) INPUT_STRUCT_PTR;
int *int_to_struct = (int *) OUTPUT_STRUCT_PTR;
/* Copy the structure */
*int_to_struct = *int_from_struct;
}
/* ************************************************* */
static void udn_int_resolve(RESOLVE_ARGS)
{
int **array = (int**)INPUT_STRUCT_PTR_ARRAY;
int *out = (int *) OUTPUT_STRUCT_PTR;
int num_struct = INPUT_STRUCT_PTR_ARRAY_SIZE;
int sum;
int i;
/* Sum the values */
for(i = 0, sum = 0; i < num_struct; i++)
sum += *(array[i]);
/* Assign the result */
*out = sum;
}
/* ************************************************* */
static void udn_int_compare(COMPARE_ARGS)
{
int *int_struct1 = (int *) STRUCT_PTR_1;
int *int_struct2 = (int *) STRUCT_PTR_2;
/* Compare the structures */
if((*int_struct1) == (*int_struct2))
EQUAL = TRUE;
else
EQUAL = FALSE;
}
/* ************************************************* */
static void udn_int_plot_val(PLOT_VAL_ARGS)
{
int *int_struct = (int *) STRUCT_PTR;
NG_IGNORE(STRUCT_MEMBER_ID);
/* Output a value for the int struct */
PLOT_VAL = *int_struct;
}
/* ************************************************* */
static void udn_int_print_val(PRINT_VAL_ARGS)
{
int *int_struct = (int *) STRUCT_PTR;
NG_IGNORE(STRUCT_MEMBER_ID);
/* Allocate space for the printed value */
PRINT_VAL = TMALLOC(char, 30);
/* Print the value into the string */
sprintf(PRINT_VAL, "%8d", *int_struct);
}
/* ************************************************* */
static void udn_int_ipc_val(IPC_VAL_ARGS)
{
/* Simply return the structure and its size */
IPC_VAL = STRUCT_PTR;
IPC_VAL_SIZE = sizeof(int);
}
Evt_Udn_Info_t udn_int_info = {
"int",
"integer valued data",
NULL,
udn_int_create,
udn_int_dismantle,
udn_int_initialize,
udn_int_invert,
udn_int_copy,
udn_int_resolve,
udn_int_compare,
udn_int_plot_val,
udn_int_print_val,
udn_int_ipc_val
};
.MODEL M_NUMERICAL NUPD LEVEL=2
+ cardnamel numberl=val1 (number2 val2), (number3 = val3)
+ cardname2 numberl=val1 string1 = name1
+
+ cardname3 numberl=val1, flag1, ^flag2
+ + number2=val2, flag3
dl 1 2 M_NUMERICAL area=lOOpm^2 ic.file = "diode.IC"
boundary domain [bounding-box] [properties]
interface domain neighbor [bounding-box] [properties]
Name | Type | Description | Units |
Domain | Integer | ID number of primary domain | |
Neighbor | Integer | ID number of neighboring domain | |
X.Low | Real | Lowest X location of bounding box | |
: IX.Low | Integer | Lowest X mesh-index of bounding box | |
X.High | Real | Highest X location of bounding box | |
: IX.High | Integer | Highest X mesh-index of bounding box | |
Y.Low | Real | Lowest Y location of bounding box | |
: IY.Low | Integer | Lowest Y mesh-index of bounding box | |
Y.High | Real | Highest Y location of bounding box | |
: IY.High | Integer | Highest Y mesh-index of bounding box | |
Qf | Real | Fixed interface charge | |
SN | Real | Surface recombination velocity - electrons | |
SP | Real | Surface recombination velocity - holes | |
Layer.Width | Real | Width of surface layer |
interface dom=l neigh=2 sn=l.Oe4 sp=l.Oe4
interface dom=l neigh=2 x.l=l.l x.h=2.9 layer.w=0.01
interface dom=l neigh=% x.l=l.l x.h=2.9 layer.w=0.0
comment [text]
* [text]
$ [text]
# [text]
* CIDER and SPICE would ignore this input line
$ CIDER and PISCES would ignore this , but SPICE wouldn’t
# CIDER and Linux Shell scripts would ignore this input line
contact number [workfunction]
Name | Type | Description |
Number | Integer | ID number of the electrode |
Work-function | Real | Work-function of electrode material. ( eV ) |
contact num=2 workf=5.29
domain number material [position]
region number material [position]
Name | Type | Description |
Number | Integer | ID number of this domain |
Material | Integer | ID number of material used by this domain |
X.Low | Real | Lowest X location of domain box, ( ) |
: IX.Low | Integer | Lowest X mesh-index of domain box |
X.High | Real | Highest X location of domain box, ( ) |
: IX-High | Integer | Highest X mesh-index of domain box |
Y.Low | Real | Lowest Y location of domain box, ( ) |
: IY.Low | Integer | Lowest Y mesh-index of domain box |
Y.High | Real | Highest Y location of domain box, ( ) |
: IY.High | Integer | Highest Y mesh-index of domain box |
domain num=l material=l x.l=O.O x.h=4.0 y.l=O.O y.h=2.0
domain n=l m=l y.l=O.O
domain n=2 m=2 y.h=O.O
doping [domains] profile-type [lateral-profile-type] [axis]
[impurity-type1 [constant-box] [profile-specifications]
Name | Type | Description |
Domains | Int List | List of domains to dope |
Uniform : | Flag | Primary profile type |
Linear : | ||
Erfc : | ||
Exponential : | ||
Suprem3 : | ||
Ascii : | ||
Ascii Suprem3 | ||
InFile | String | Name of Suprem3, Ascii or Ascii Suprem3 input file |
Lat.Rotate : | Flag | Lateral profile type |
Lat.Unif : | ||
Lat.Lin : | ||
Lat.Gauss : | ||
Lat.Erfc : | ||
Lat.Exp | ||
X.Axis:Y.Axis | Flag | Primary profile direction |
N.Type : P.Type : | Flag | Impurity type |
Donor : Acceptor : | ||
Phosphorus : | ||
Arsenic : | ||
Antimony : | ||
Boron | ||
X.Low | Real | Lowest X location of constant box, ( ) |
X.High | Real | Highest X location of constant box, ( ) |
Y.Low | Real | Lowest Y location of constant box, ( ) |
Y.High | Real | Highest Y location of constant box, ( ) |
Conic | Peak.conic | Real | Dopant concentration, ( ) |
Location | Range | Real | Location of profile edge/peak, ( ) |
Char.Length | Real | Characteristic length of profile, ( ) |
Ratio.Lat | Real | Ratio of lateral to primary distances |
doping uniform p.type conc=l.0el6
doping gauss lat.rotate n.type conc=l.0el9
+ x.l=0.0 x.h=0.5 y.l=0.0 y.h=0.2 ratio=0.7
doping gauss lat.erfc conc=l.0el9
+ x.l=0.0 x.h=0.5 y.l=0.0 y.h=0.2 ratio=0.7
doping ascii suprem3 infile=implant.s3 lat.unif boron
+ x.l=1.0 x.h=3.0 y.l=0.0
electrode [number] [position]
Name | Type | Description |
Number | Integer | ID number of this domain |
X.Low | Real | Lowest X location of electrode, ( ) |
: IX.Low | Integer | Lowest X mesh-index of electrode |
X.High | Real | Highest X location of electrode, ( ) |
: IX.High | Integer | Highest X mesh-index of electrode |
Y.Low | Real | Lowest Y location of electrode, ( ) |
: IY.Low | Integer | Lowest Y mesh-index of electrode |
Y.High | Real | Highest Y location of electrode, ( ) |
: IY.High | Integer | Highest Y mesh-index of electrode |
* DRAIN
electrode x.l=0.0 x.h=0.5 y.l=0.0 y.h=0.0
* GATE
electrode x.l=1.0 x.h=3.0 iy.l=0 iy.h=0
* SOURCE
electrode x.l=3.0 x.h=4.0 y.l=0.0 y.h=0.0
* BULK
electrode x.l=0.0 x.h=4.0 y.l=2.0 y.h=2.0
* EMITTER
electrode num=3 x.l=1.0 x.h=2.0 y.l=0.0 y.h=0.0
* BASE
electrode num=2 x.l=0.0 x.h=0.5 y.l=0.0 y.h=0.0
electrode num=2 x.l=2.5 x.h=3.0 y.l=0.0 y.h=0.0
* COLLECTOR
electrode num=1 x.l=0.0 x.h=3.0 y.l=1.0 y.h=1.0
end
material number type [physical-constants]
Name | Type | Description |
Number | Integer | ID number of this material |
Semiconductor : Silicon | Flag | Type of this material |
: Polysilicon : GaAs | ||
: Insulator : Oxide | ||
: Nitride | ||
Affinity | Real | Electron affinity (eV) |
Permittivity | Real | Dielectric permittivity ( ) |
Nc | Real | Conduction band density ( ) |
Nv | Real | Valence band density ( ) |
Eg | Real | Energy band gap (eV) |
dEg.dT | Real | Bandgap narrowing with temperature ( ) |
Eg.Tref | Real | Bandgap reference temperature, ( °K ) |
dEg.dN | Real | Bandgap narrowing with N doping, ( ) |
Eg.Nref | Real | Bandgap reference concentration - N type, ( ) |
dEg.dP | Real | Bandgap narrowing with P doping, ( ) |
Eg.Pref | Real | Bandgap reference concentration - P type, ( ) |
TN | Real | SRH lifetime - electrons, (sec) |
SRH.Nref | Real | SRH reference concentration - electrons ( |
TP | Real | SRH lifetime - holes, (sec) |
SRH.Pref | Real | SRH reference concentration - holes ( |
CN | Real | Auger coefficient - electrons ( ) |
CP | Real | Auger coefficient - holes ( ) |
ARichN | Real | Richardson constant - electrons, ( ) |
ARichP | Real | Richardson constant - holes, ( ) |
material num=1 silicon eg=1.12 deg.dt=4.7e-4 eg.tref=640.0
material num=2 silicon tn=1ps tp=1ps
method [types] [parameters]
Name | Type | Description |
OneCarrier | Flag | Solve for majority carriers only |
AC analysis | String | AC analysis method, ( either DIRECT or SOR) |
NoMobDeriv | Flag | Ignore mobility derivatives |
Frequency | Real | AC analysis frequency, ( Hz ) |
ItLim | Integer | Newton iteration limit |
DevTol | Real | Maximum residual error in device equations |
method onec ac.an=direct
method devtol=1e-10 itlim=15
mobility material [carrier] [parameters] [models] [initialize]
Name | Type | Description |
Material | Integer | ID number of material |
Electron : Hole | Flag | Mobile carrier |
Majority : Minority | Flag | Mobile carrier type |
MUS | Real | Maximum surface mobility, ( cm2/Vs ) |
EC.A | Real | Surface mobility 1st-order critical field, ( V/cm ) |
EC.B | Real | Real Surface mobility 2nd-order critical field, ( V2/cm2 ) |
MuMax | Real | Maximum bulk mobility, ( cm2/Vs ) |
MuMin | Real | Minimum bulk mobility, ( cm2/Vs) |
NtRef | Real | Ionized impurity reference concentration, ( cm-3 ) |
NtExp | Real | Ionized impurity exponent |
Vsat | Real | Saturation velocity, ( cm/s ) |
Vwarm | Real | Warm carrier reference velocity, ( cm/s ) |
ConcModel | String | Ionized impurity model, ( CT, AR, UF, SG, Dr GA ) |
FieldModel | String | Velocity saturation model, ( CT, AR, SG, or GA ) |
Init | Flag | Copy model-specific defaults |
mobility mat=l concmod=sg fieldmod=sg
mobility mat=l elec major mumax=1000.0 mumin=l00.0
+ ntref=l.0el6 ntexp=0.8 vsat=l.0e7 vwarm=3.0e6
mobility mat=l elec minor mumax=1000.0 mumin=200.O
+ ntref=l.0el7 ntexp=0.9
mobility mat=l hole major mumax=500.0 mumin=50.0
+ ntref=l.0el6 ntexp=0.7 vsat=8.0e6 vwarm=l.0e6
mobility mat=l hole minor mumax=500.0 mumin=150.0
+ ntref=l.0el7 ntexp=0.8
mobility mat=l elec mus=800.0 ec.a=3.0e5 ec.b=9.0e5
mobility mat=l init elec major fieldmodel=sg
mobility mat=l init hole major fieldmodel=sg
mobility mat=l fieldmodel=ga
models [model flags]
Name | Type | Description |
BGN | Flag | Bandgap narrowing |
SRH | Flag | Shockley-Reed-Hall recombination |
ConcTau | Flag | Concentration-dependent SRH lifetimes |
Auger | Flag | Auger recombination |
Avalanche | Flag | Local avalanche generation |
TempMob | Flag | Temperature-dependent mobility |
ConcMob | Flag | Concentration-dependent mobility |
FieldMob | Flag | Lateral-field-dependent mobility |
TransMob | Flag | Transverse-field-dependent surface mobility |
SurfMob | Flag | Activate surface mobility model |
models bgn srh conctau auger aval
models surfmob transmob fieldmob ^aval
options [device-type] [initial-state] [dimensions]
[measurement-temperature]
Name | Type | Description |
Resistor | Flag | Resistor |
: Capacitor | Flag | Capacitor |
: Diode | Flag | Diode |
: Bipolar|BJT | Flag | Bipolar transistor |
: MOSFET | Flag | MOS field-effect transistor |
: JFET | Flag | Junction field-effect transistor |
: MESFET | Flag | MES field-effect transistor |
IC.File | String | Initial-conditions filename |
Unique | Flag | Append instance name to filename |
DefA | Real | Default Mask Area, (m²) |
DefW | Real | Default Mask Width, (m) |
DefL | Real | Default Mask Length, (m) |
Base.Area | Real | lD BJT base area relative to emitter area |
Base.Length | Real | Real lD BJT base contact length, (µm) |
Base.Depth | Real | lD BJT base contact depth, (µm) |
TNom | Real | Nominal measurement temperature, (°C) |
options bipolar defl=1.0
options base.area=0.1 base.depth=0.2 base.len=1.5
options unique ic.file="OP1"
output [debugging-flags] [general-info] [saved-solutions]
Name | Type | Description |
All.Debug | Flag | Debug all analyses |
OP.Debug | Flag | .OP analyses |
DC.Debug | Flag | .DC analyses |
TRAN.Debug | Flag | .TRAN analyses |
AC.Debug | Flag | .AC analyses |
PZ.Debug | Flag | .PZ analyses |
Material | Flag | Physical material information |
Statistics | Resources | Flag | Resource usage information |
RootFile | String | Root of output file names |
Psi | Flag | Potential ( V ) |
Equ.Psi | Flag | Equilibrium potential ( V ) |
Vac.Psi | Flag | Vacuum potential ( V ) |
Doping | Flag | Net doping ( cm³ ) |
N.Conc | Flag | Electron concentration ( cm³ ) |
P.Conc | Flag | Hole concentration ( cm³ ) |
PhiN | Flag | Electron quasi-fermi potential ( V ) |
PhiP | Flag | Hole quasi-fermi potential ( V ) |
PhiC | Flag | Conduction band potential ( V ) |
PhiV | Flag | Valence band potential ( V ) |
E.Field | Flag | Electric field ( V/cm ) |
JC | Flag | Conduction current density ( A/cm² ) |
JD | Flag | Displacement current density ( A/cm² ) |
JN | Flag | Electron current density ( A/cm² ) |
JP | Flag | Hole current density ( A/cm² ) |
JT | Flag | Total current density ( A/cm² ) |
Unet | Flag | Net recombination ( 1/cm³ s ) |
MuN | Flag | Electron mobility (low-field) ( cm²/Vs ) |
MuP | Flag | Hole mobility (low-field) ( cm²/Vs ) |
output all.debug mater stat
output phin phjp phic phiv vac.psi
output psi n.conc p.conc ^e.f ^jn ^jp ^jd
title [text]
title L=1.0um NMOS Device, 1.0um BiCMOS Process
x.mesh position numbering-method [spacing-parameters]
y.mesh position numbering-method [spacing-parameters]
Name | Type | Description |
Location | Real | Location of this mesh line, ( µm ) |
:Width | Real | Width between this and previous mesh lines, ( µm ) |
Number | Node | Integer | Number of this mesh line |
:Ratio | Real | Ratio of sizes of adjacent spaces |
H.Start | H1 | Real | Space size at start of interval, ( µm ) |
H.End | H2 | Real | Space size at end of interval, ( µm ) |
H.Max | H3 | Real | Maximum space size inside interval, ( µm ) |
x.mesh loc=0.0 n=1
x.mesh loc=5.0 n=50
x.mesh w=0.75 h.e=0.001 h.m=0.l ratio=1.5
x.mesh w=2.25 h.s=0.001 h.m=0.l ratio=1.5
y.mesh loc=-0.04 node=1
y.mesh loc=0.0 node=6
y.mesh width=0.5 h.start=0.001 h.max=.05 ratio=2.0
y.mesh width=2.5 h.start=0.05 ratio=2.0
.MODEL model-name NUMD [level]
+ ...
DXXXXXXX nl n2 model-name [geometry] [temperature] [initial-conditions]
.SAVE [small-signal values]
Name | Type | Description |
Level | Integer | Dimensionality of numerical model |
Area | Real | Multiplicative area factor |
W | Real | Multiplicative width factor |
Temp | Real | Element operating temperature |
IC.File | String | Initial-conditions filename |
Off | Flag | Device initially in OFF state |
gIJ | Flag | Conductance element , ( ) |
cIJ | Flag | Capacitance element , ( F ) |
yIJ | Flag | Admittance element , ( ) |
DSWITCH 1 2 M_SWITCH_DIODE AREA=2
.MODEL M_SWITCH_DIODE NUMD
+ options defa=1p ...
+ ...
DMOSCAP 11 12 M_MOSCAP W=20um IC=3v
.MODEL M_MOSCAP NUMD LEVEL=2
+ options moscap defw=1m
+ ...
D1 POSN NEGN POWERMOD AREA=2 W=6um TEMP=100.0
.MODEL POWERMOD NUMD LEVEL=2
+ ...
.SAVE @d1[g11] @d1[g12] @d1[g21] @d1[g22]
.SAVE @d1[c11] @d1[c12] @d1[c21] @d1[c22]
.SAVE @d1[y11] @d1[y12] @d1[y21] @d1[y22]
.MODEL model-name NBJT [level]
+ ...
QXXXXXXX nl n2 n3 model-name [geometry]
+ [temperature] [initial-conditions]
.SAVE [small-signal values]
Name | Type | Description |
Level | Integer | Dimensionality of numerical model |
Area | Real | Multiplicative area factor |
W | Real | Multiplicative width factor |
Temp | Real | Element operating temperature |
IC.File | String | Initial-conditions filename |
Off | Flag | Device initially in OFF state |
gIJ | Flag | Conductance element , ( ) |
cIJ | Flag | Capacitance element , ( F ) |
yIJ | Flag | Admittance element , ( ) |
Q2 1 2 3 M_BJT AREA=4
.SAVE @q2[g11] @q2[g12] @q2[g22]
QJ1 11 12 13 M_JFET W=5um IC.FILE="IC.jfet"
.MODEL M_JFET NBJT LEVEL=2
+ options jfet
+ ...
Q2 NC2 NB2 NE2 BJTMOD AREA=1
Q3 NC3 NB3 NE3 BJTMOD AREA=1
.MODEL BJTMOD NBJT LEVEL=2
+ options defw=2um
+ * Define half of the device now
+ ...
.MODEL model-name NUMOS [level]
+ ...
MXXXXXXX nl n2 n3 n4 model-name [geometry]
+ [temperature] [initial-conditions]
.SAVE [small-signal values]
Name | Type | Description |
Level | Integer | Dimensionality of numerical model |
Area | Real | Multiplicative area factor |
W | Real | Multiplicative width factor |
L | Real | Unused length factor |
Temp | Real | Element operating temperature |
IC.File | String | Initial-conditions filename |
Off | Flag | Device initially in OFF state |
gIJ | Flag | Conductance element , ( ) |
cIJ | Flag | Capacitance element , ( F ) |
yIJ | Flag | Admittance element , ( ) |
M1 1 2 3 4 M_NMOS_1UM W=5um L=1um IC.FILE="NM1.vth"
.MODEL MNMOS_1UM NUMOS
+ * Description of a lum device
+ ...
.SAVE @m1[y11] @m1[y12] @ml[y14]
.SAVE @m1[y21] @m1[y22] @ml[y24]
.SAVE @m1[y41] @m1[y42] @ml[y44]
MQ1 NC NB NE NS N_BJT
.MODEL M_BJT NUMOS LEVEL=2
+ options bipolar defw=5um
+ ...
save @m1[cgs]
plot @m1[cgs]
@device_identifier.subcircuit_name.<subcircuit_name_nn>
+.device_name[parameter]
* transistor output characteristics
* two nested subcircuits
vdd d1 0 2.0
vss vsss 0 0
vsig g1 vsss 0
xmos1 d1 g1 vsss level1
.subckt level1 d3 g3 v3
xmos2 d3 g3 v3 level2
.ends
.subckt level2 d4 g4 v4
m1 d4 g4 v4 v4 nmos w=1e-5 l=3.5e-007
.ends
.dc vdd 0 5 0.1 vsig 0 5 1
.control
save all @m.xmos1.xmos2.m1[vdsat]
run
plot vss#branch $ current measured at the top level
plot @m.xmos1.xmos2.m1[vdsat]
.endc
.MODEL NMOS NMOS LEVEL = 8
+VERSION = 3.2.4 TNOM = 27 TOX = 7.4E-9
.end
# | Name | Direction | Type | Description
|
1 | resistance (r) | InOut | real | Resistance
|
10 | ac | InOut | real | AC resistance value
|
8 | temp | InOut | real | Instance operating temperature
|
14 | dtemp | InOut | real | Instance temperature difference with the rest of the circuit
|
3 | l | InOut | real | Length
|
2 | w | InOut | real | Width
|
12 | m | InOut | real | Multiplication factor
|
16 | tc | InOut | real | First order temp. coefficient
|
16 | tc1 | InOut | real | First order temp. coefficient
|
17 | tc2 | InOut | real | Second order temp. coefficient
|
13 | scale | InOut | real | Scale factor
|
15 | noisy (noise) | InOut | integer | Resistor generate noise
|
5 | sens_resist | In | flag | flag to request sensitivity WRT resistance
|
6 | i | Out | real | Current
|
7 | p | Out | real | Power
|
206 | sens_dc | Out | real | dc sensitivity
|
201 | sens_real | Out | real | dc sensitivity and real part of ac sensitivity
|
202 | sens_imag | Out | real | dc sensitivity and imag part of ac sensitivity
|
203 | sens_mag | Out | real | ac sensitivity of magnitude
|
204 | sens_ph | Out | real | ac sensitivity of phase
|
205 | sens_cplx | Out | complex | ac sensitivity
|
# | Name | Direction | Type | Description |
103 | rsh | InOut | real | Sheet resistance |
106 | narrow | InOut | real | Narrowing of resistor |
106 | dw | InOut | real | |
109 | short | InOut | real | Shortening of resistor |
109 | dlr | InOut | real | |
101 | tc1 | InOut | real | First order temp. coefficient |
102 | tc2 | InOut | real | Second order temp. coefficient |
104 | defw | InOut | real | Default device width |
104 | w | InOut | real | Default device width |
105 | l | InOut | real | Default device length |
110 | kf | InOut | real | Flicker noise coefficient |
111 | af | InOut | real | Flicker noise exponent |
108 | tnom | InOut | real | Parameter measurement temperature |
107 | r | InOut | real | Resistance |
107 | res | InOut | real | Resistance |
wf | InOut | real | Flicker noise width exponent | |
lf | InOut | real | Flicker noise length exponent | |
ef | InOut | real | Flicker noise frequency exponent | |
r | In | flag | Device is a resistor model |
# | Name | Direction | Type | Description
|
1 | capacitance | InOut | real | Device capacitance
|
1 | cap | InOut | real | Device capacitance
|
1 | c | InOut | real | Device capacitance
|
2 | ic | InOut | real | Initial capacitor voltage
|
8 | temp | InOut | real | Instance operating temperature
|
9 | dtemp | InOut | real | Instance temperature difference from the rest of the circuit
|
3 | w | InOut | real | Device width
|
4 | l | InOut | real | Device length
|
11 | m | InOut | real | Parallel multiplier
|
10 | scale | InOut | real | Scale factor
|
5 | sens_cap | In | flag | flag to request sens. WRT cap.
|
6 | i | Out | real | Device current
|
7 | p | Out | real | Instantaneous device power
|
206 | sens_dc | Out | real | dc sensitivity
|
201 | sens_real | Out | real | real part of ac sensitivity
|
202 | sens_imag | Out | real | dc sens. & imag part of ac sens.
|
203 | sens_mag | Out | real | sensitivity of ac magnitude
|
204 | sens_ph | Out | real | sensitivity of ac phase
|
205 | sens_cplx | Out | complex | ac sensitivity
|
# | Name | Direction | Type | Description |
112 | cap | InOut | real | Model capacitance |
101 | cj | InOut | real | Bottom Capacitance per area |
102 | cjsw | InOut | real | Sidewall capacitance per meter |
103 | defw | InOut | real | Default width |
113 | defl | InOut | real | Default length |
105 | narrow | InOut | real | width correction factor |
106 | short | InOut | real | length correction factor |
107 | tc1 | InOut | real | First order temp. coefficient |
108 | tc2 | InOut | real | Second order temp. coefficient |
109 | tnom | InOut | real | Parameter measurement temperature |
110 | di | InOut | real | Relative dielectric constant |
111 | thick | InOut | real | Insulator thickness |
104 | c | In | flag | Capacitor model |
# | Name | Direction | Type | Description
|
1 | inductance | InOut | real | Inductance of inductor
|
2 | ic | InOut | real | Initial current through inductor
|
5 | sens_ind | In | flag | flag to request sensitivity WRT inductance
|
9 | temp | InOut | real | Instance operating temperature
|
10 | dtemp | InOut | real | Instance temperature difference with the rest of the circuit
|
8 | m | InOut | real | Multiplication Factor
|
11 | scale | InOut | real | Scale factor
|
12 | nt | InOut | real | Number of turns
|
3 | flux | Out | real | Flux through inductor
|
4 | v | Out | real | Terminal voltage of inductor
|
4 | volt | Out | real | |
6 | i | Out | real | Current through the inductor
|
6 | current | Out | real | |
7 | p | Out | real | instantaneous power dissipated by the inductor
|
206 | sens_dc | Out | real | dc sensitivity sensitivity
|
201 | sens_real | Out | real | real part of ac sensitivity
|
202 | sens_imag | Out | real | dc sensitivity and imag part of ac sensitivty
|
203 | sens_mag | Out | real | sensitivity of AC magnitude
|
204 | sens_ph | Out | real | sensitivity of AC phase
|
205 | sens_cplx | Out | complex | ac sensitivity
|
# | Name | Direction | Type | Description |
100 | ind | InOut | real | Model inductance |
101 | tc1 | InOut | real | First order temp. coefficient |
102 | tc2 | InOut | real | Second order temp. coefficient |
103 | tnom | InOut | real | Parameter measurement temperature |
104 | csect | InOut | real | Inductor cross section |
105 | length | InOut | real | Inductor length |
106 | nt | InOut | real | Model number of turns |
107 | mu | InOut | real | Relative magnetic permeability |
108 | l | In | flag | Inductor model |
# | Name | Direction | Type | Description |
401 | k | InOut | real | Mutual inductance |
401 | coefficient | InOut | real | |
402 | inductor1 | InOut | instance | First coupled inductor |
403 | inductor2 | InOut | instance | Second coupled inductor |
404 | sens_coeff | In | flag | flag to request sensitivity WRT coupling factor |
606 | sens_dc | Out | real | dc sensitivity |
601 | sens_real | Out | real | real part of ac sensitivity |
602 | sens_imag | Out | real | dc sensitivity and imag part of ac sensitivty |
603 | sens_mag | Out | real | sensitivity of AC magnitude |
604 | sens_ph | Out | real | sensitivity of AC phase |
605 | sens_cplx | Out | complex | mutual model parameters: |
# | Name | Direction | Type | Description |
2 | i | In | parsetree | Current source |
1 | v | In | parsetree | Voltage source |
7 | i | Out | real | Current through source |
6 | v | Out | real | Voltage across source |
3 | pos_node | Out | integer | Positive Node |
4 | neg_node | Out | integer | Negative Node |
# | Name | Direction | Type | Description |
1 | dc | InOut | real | DC value of source |
2 | acmag | InOut | real | AC magnitude |
3 | acphase | InOut | real | AC phase |
5 | pulse | In | real vector | Pulse description |
6 | sine | In | real vector | Sinusoidal source description |
6 | sin | In | real vector | Sinusoidal source description |
7 | exp | In | real vector | Exponential source description |
8 | pwl | In | real vector | Piecewise linear description |
9 | sffm | In | real vector | Single freq. FM description |
21 | am | In | real vector | Amplitude modulation description |
10 | neg_node | Out | integer | Negative node of source |
11 | pos_node | Out | integer | Positive node of source |
12 | acreal | Out | real | AC real part |
13 | acimag | Out | real | AC imaginary part |
14 | function | Out | integer | Function of the source |
15 | order | Out | integer | Order of the source function |
16 | coeffs | Out | real vector | Coefficients of the source |
20 | v | Out | real | Voltage across the supply |
17 | p | Out | real | Power supplied by the source |
4 | ac | In | real vector | AC magnitude,phase vector |
1 | c | In | real | Current through current source |
22 | current | Out | real | Current in DC or Transient mode |
18 | distof1 | In | real vector | f1 input for distortion |
19 | distof2 | In | real vector | f2 input for distortion |
# | Name | Direction | Type | Description |
1 | dc | InOut | real | D.C. source value |
3 | acmag | InOut | real | A.C. Magnitude |
4 | acphase | InOut | real | A.C. Phase |
5 | pulse | In | real vector | Pulse description |
6 | sine | In | real vector | Sinusoidal source description |
6 | sin | In | real vector | Sinusoidal source description |
7 | exp | In | real vector | Exponential source description |
8 | pwl | In | real vector | Piecewise linear description |
9 | sffm | In | real vector | Single freq. FM descripton |
22 | am | In | real vector | Amplitude modulation descripton |
16 | pos_node | Out | integer | Positive node of source |
17 | neg_node | Out | integer | Negative node of source |
11 | function | Out | integer | Function of the source |
12 | order | Out | integer | Order of the source function |
13 | coeffs | Out | real vector | Coefficients for the function |
14 | acreal | Out | real | AC real part |
15 | acimag | Out | real | AC imaginary part |
2 | ac | In | real vector | AC magnitude, phase vector |
18 | i | Out | real | Voltage source current |
19 | p | Out | real | Instantaneous power |
20 | distof1 | In | real vector | f1 input for distortion |
21 | distof2 | In | real vector | f2 input for distortion |
23 | r | In | real | pwl repeat start time value |
24 | td | In | real | pwl delay time value |
# | Name | Direction | Type | Description |
1 | gain | InOut | real | Gain of source |
2 | control | InOut | instance | Name of controlling source |
6 | sens_gain | In | flag | flag to request sensitivity WRT gain |
4 | neg_node | Out | integer | Negative node of source |
3 | pos_node | Out | integer | Positive node of source |
7 | i | Out | real | CCCS output current |
9 | v | Out | real | CCCS voltage at output |
8 | p | Out | real | CCCS power |
206 | sens_dc | Out | real | dc sensitivity |
201 | sens_real | Out | real | real part of ac sensitivity |
202 | sens_imag | Out | real | imag part of ac sensitivity |
203 | sens_mag | Out | real | sensitivity of ac magnitude |
204 | sens_ph | Out | real | sensitivity of ac phase |
205 | sens_cplx | Out | complex | ac sensitivity |
# | Name | Direction | Type | Description |
1 | gain | InOut | real | Transresistance (gain) |
2 | control | InOut | instance | Controlling voltage source |
7 | sens_trans | In | flag | flag to request sens. WRT transimpedance |
3 | pos_node | Out | integer | Positive node of source |
4 | neg_node | Out | integer | Negative node of source |
8 | i | Out | real | CCVS output current |
10 | v | Out | real | CCVS output voltage |
9 | p | Out | real | CCVS power |
206 | sens_dc | Out | real | dc sensitivity |
201 | sens_real | Out | real | real part of ac sensitivity |
202 | sens_imag | Out | real | imag part of ac sensitivity |
203 | sens_mag | Out | real | sensitivity of ac magnitude |
204 | sens_ph | Out | real | sensitivity of ac phase |
205 | sens_cplx | Out | complex | ac sensitivity |
# | Name | Direction | Type | Description |
1 | gain | InOut | real | Transconductance of source (gain) |
8 | sens_trans | In | flag | flag to request sensitivity WRT transconductance |
3 | pos_node | Out | integer | Positive node of source |
4 | neg_node | Out | integer | Negative node of source |
5 | cont_p_node | Out | integer | Positive node of contr. source |
6 | cont_n_node | Out | integer | Negative node of contr. source |
2 | ic | In | real | Initial condition of controlling source |
9 | i | Out | real | Output current |
11 | v | Out | real | Voltage across output |
10 | p | Out | real | Power |
206 | sens_dc | Out | real | dc sensitivity |
201 | sens_real | Out | real | real part of ac sensitivity |
202 | sens_imag | Out | real | imag part of ac sensitivity |
203 | sens_mag | Out | real | sensitivity of ac magnitude |
204 | sens_ph | Out | real | sensitivity of ac phase |
205 | sens_cplx | Out | complex | ac sensitivity |
# | Name | Direction | Type | Description |
1 | gain | InOut | real | Voltage gain |
9 | sens_gain | In | flag | flag to request sensitivity WRT gain |
2 | pos_node | Out | integer | Positive node of source |
3 | neg_node | Out | integer | Negative node of source |
4 | cont_p_node | Out | integer | Positive node of contr. source |
5 | cont_n_node | Out | integer | Negative node of contr. source |
7 | ic | In | real | Initial condition of controlling source |
10 | i | Out | real | Output current |
12 | v | Out | real | Output voltage |
11 | p | Out | real | Power |
206 | sens_dc | Out | real | dc sensitivity |
201 | sens_real | Out | real | real part of ac sensitivity |
202 | sens_imag | Out | real | imag part of ac sensitivity |
203 | sens_mag | Out | real | sensitivity of ac magnitude |
204 | sens_ph | Out | real | sensitivity of ac phase |
205 | sens_cplx | Out | complex | ac sensitivity |
# | Name | Direction | Type | Description |
1 | pos_nodes | InOut | string vector | in nodes |
2 | neg_nodes | InOut | string vector | out nodes |
3 | dimension | InOut | integer | number of coupled lines |
4 | length | InOut | real | length of lines |
# | Name | Direction | Type | Description |
101 | r | InOut | real vector | resistance per length |
104 | l | InOut | real vector | inductance per length |
102 | c | InOut | real vector | capacitance per length |
103 | g | InOut | real vector | conductance per length |
105 | length | InOut | real | length |
106 | cpl | In | flag | Device is a cpl model |
# | Name | Direction | Type | Description |
6 | v1 | InOut | real | Initial voltage at end 1 |
8 | v2 | InOut | real | Initial voltage at end 2 |
7 | i1 | InOut | real | Initial current at end 1 |
9 | i2 | InOut | real | Initial current at end 2 |
10 | ic | In | real vector | Initial condition vector:v1,i1,v2,i2 |
13 | pos_node1 | Out | integer | Positive node of end 1 of t-line |
14 | neg_node1 | Out | integer | Negative node of end 1 of t.line |
15 | pos_node2 | Out | integer | Positive node of end 2 of t-line |
16 | neg_node2 | Out | integer | Negative node of end 2 of t-line |
# | Name | Direction | Type | Description
|
0 | ltra | InOut | flag | LTRA model
|
1 | r | InOut | real | Resistance per meter
|
2 | l | InOut | real | Inductance per meter
|
3 | g | InOut | real | |
4 | c | InOut | real | Capacitance per meter
|
5 | len | InOut | real | length of line
|
11 | rel | Out | real | Rel. rate of change of deriv. for bkpt
|
12 | abs | Out | real | Abs. rate of change of deriv. for bkpt
|
28 | nocontrol | InOut | flag | No timestep control
|
32 | steplimit | InOut | flag | always limit timestep to 0.8*(delay of line)
|
33 | nosteplimit | InOut | flag | don’t always limit timestep to 0.8*(delay of line)
|
34 | lininterp | InOut | flag | use linear interpolation
|
35 | quadinterp | InOut | flag | use quadratic interpolation
|
36 | mixedinterp | InOut | flag | use linear interpolation if quadratic results look unacceptable
|
46 | truncnr | InOut | flag | use N-R iterations for step calculation in LTRAtrunc
|
47 | truncdontcut | InOut | flag | don’t limit timestep to keep impulse response calculation errors low
|
42 | compactrel | InOut | real | special reltol for straight line checking
|
43 | compactabs | InOut | real | special abstol for straight line checking
|
# | Name | Direction | Type | Description |
1 | z0 | InOut | real | Characteristic impedance |
1 | zo | InOut | real | |
4 | f | InOut | real | Frequency |
2 | td | InOut | real | Transmission delay |
3 | nl | InOut | real | Normalized length at frequency given |
5 | v1 | InOut | real | Initial voltage at end 1 |
7 | v2 | InOut | real | Initial voltage at end 2 |
6 | i1 | InOut | real | Initial current at end 1 |
8 | i2 | InOut | real | Initial current at end 2 |
9 | ic | In | real vector | Initial condition vector:v1,i1,v2,i2 |
10 | rel | Out | real | Rel. rate of change of deriv. for bkpt |
11 | abs | Out | real | Abs. rate of change of deriv. for bkpt |
12 | pos_node1 | Out | integer | Positive node of end 1 of t. line |
13 | neg_node1 | Out | integer | Negative node of end 1 of t. line |
14 | pos_node2 | Out | integer | Positive node of end 2 of t. line |
15 | neg_node2 | Out | integer | Negative node of end 2 of t. line |
18 | delays | Out | real vector | Delayed values of excitation |
# | Name | Direction | Type | Description |
1 | pos_node | In | integer | Positive node of txl |
2 | neg_node | In | integer | Negative node of txl |
3 | length | InOut | real | length of line |
# | Name | Direction | Type | Description |
101 | r | InOut | real | resistance per length |
104 | l | InOut | real | inductance per length |
102 | c | InOut | real | capacitance per length |
103 | g | InOut | real | conductance per length |
105 | length | InOut | real | length |
106 | txl | In | flag | Device is a txl model |
# | Name | Direction | Type | Description |
1 | l | InOut | real | Length of transmission line |
2 | n | InOut | real | Number of lumps |
3 | pos_node | Out | integer | Positive node of URC |
4 | neg_node | Out | integer | Negative node of URC |
5 | gnd | Out | integer | Ground node of URC |
# | Name | Direction | Type | Description |
101 | k | InOut | real | Propagation constant |
102 | fmax | InOut | real | Maximum frequency of interest |
103 | rperl | InOut | real | Resistance per unit length |
104 | cperl | InOut | real | Capacitance per unit length |
105 | isperl | InOut | real | Saturation current per length |
106 | rsperl | InOut | real | Diode resistance per length |
107 | urc | In | flag | Uniform R.C. line model |
# | Name | Direction | Type | Description |
2 | off | InOut | flag | Device initially off |
3 | icvbe | InOut | real | Initial B-E voltage |
4 | icvce | InOut | real | Initial C-E voltage |
1 | area | InOut | real | (Emitter) Area factor |
10 | areab | InOut | real | Base area factor |
11 | areac | InOut | real | Collector area factor |
9 | m | InOut | real | Parallel Multiplier |
5 | ic | In | real vector | Initial condition vector |
6 | sens_area | In | flag | flag to request sensitivity WRT area |
202 | colnode | Out | integer | Number of collector node |
203 | basenode | Out | integer | Number of base node |
204 | emitnode | Out | integer | Number of emitter node |
205 | substnode | Out | integer | Number of substrate node |
206 | colprimenode | Out | integer | Internal collector node |
207 | baseprimenode | Out | integer | Internal base node |
208 | emitprimenode | Out | integer | Internal emitter node |
211 | ic | Out | real | Current at collector node |
212 | ib | Out | real | Current at base node |
236 | ie | Out | real | Emitter current |
237 | is | Out | real | Substrate current |
209 | vbe | Out | real | B-E voltage |
210 | vbc | Out | real | B-C voltage |
215 | gm | Out | real | Small signal transconductance |
213 | gpi | Out | real | Small signal input conductance - pi |
214 | gmu | Out | real | Small signal conductance - mu |
225 | gx | Out | real | Conductance from base to internal base |
216 | go | Out | real | Small signal output conductance |
227 | geqcb | Out | real | d(Ibe)/d(Vbc) |
228 | gcsub | Out | real | Internal Subs. cap. equiv. cond. |
243 | gdsub | Out | real | Internal Subs. Diode equiv. cond. |
229 | geqbx | Out | real | Internal C-B-base cap. equiv. cond. |
239 | cpi | Out | real | Internal base to emitter capactance |
240 | cmu | Out | real | Internal base to collector capactiance |
241 | cbx | Out | real | Base to collector capacitance |
242 | csub | Out | real | Substrate capacitance |
218 | cqbe | Out | real | Cap. due to charge storage in B-E jct. |
220 | cqbc | Out | real | Cap. due to charge storage in B-C jct. |
222 | cqsub | Out | real | Cap. due to charge storage in Subs. jct. |
224 | cqbx | Out | real | Cap. due to charge storage in B-X jct. |
226 | cexbc | Out | real | Total Capacitance in B-X junction |
217 | qbe | Out | real | Charge storage B-E junction |
219 | qbc | Out | real | Charge storage B-C junction |
221 | qsub | Out | real | Charge storage Subs. junction |
223 | qbx | Out | real | Charge storage B-X junction |
238 | p | Out | real | Power dissipation |
235 | sens_dc | Out | real | dc sensitivity |
230 | sens_real | Out | real | real part of ac sensitivity |
231 | sens_imag | Out | real | dc sens. & imag part of ac sens. |
232 | sens_mag | Out | real | sensitivity of ac magnitude |
233 | sens_ph | Out | real | sensitivity of ac phase |
234 | sens_cplx | Out | complex | ac sensitivity |
7 | temp | InOut | real | instance temperature |
8 | dtemp | InOut | real | instance temperature delta from circuit |
# | Name | Direction | Type | Description |
309 | type | Out | string | NPN or PNP |
101 | npn | InOut | flag | NPN type device |
102 | pnp | InOut | flag | PNP type device |
147 | subs | InOut | integer | Vertical or Lateral device |
103 | is | InOut | real | Saturation Current |
146 | iss | InOut | real | Substrate Jct. Saturation Current |
104 | bf | InOut | real | Ideal forward beta |
105 | nf | InOut | real | Forward emission coefficient |
106 | vaf | InOut | real | Forward Early voltage |
106 | va | InOut | real | |
107 | ikf | InOut | real | Forward beta roll-off corner current |
107 | ik | InOut | real | |
108 | ise | InOut | real | B-E leakage saturation current |
110 | ne | InOut | real | B-E leakage emission coefficient |
111 | br | InOut | real | Ideal reverse beta |
112 | nr | InOut | real | Reverse emission coefficient |
113 | var | InOut | real | Reverse Early voltage |
113 | vb | InOut | real | |
114 | ikr | InOut | real | reverse beta roll-off corner current |
115 | isc | InOut | real | B-C leakage saturation current |
117 | nc | InOut | real | B-C leakage emission coefficient |
118 | rb | InOut | real | Zero bias base resistance |
119 | irb | InOut | real | Current for base resistance=(rb+rbm)/2 |
120 | rbm | InOut | real | Minimum base resistance |
121 | re | InOut | real | Emitter resistance |
122 | rc | InOut | real | Collector resistance |
123 | cje | InOut | real | Zero bias B-E depletion capacitance |
124 | vje | InOut | real | B-E built in potential |
124 | pe | InOut | real | |
125 | mje | InOut | real | B-E junction grading coefficient |
125 | me | InOut | real | |
126 | tf | InOut | real | Ideal forward transit time |
127 | xtf | InOut | real | Coefficient for bias dependence of TF |
128 | vtf | InOut | real | Voltage giving VBC dependence of TF |
129 | itf | InOut | real | High current dependence of TF |
130 | ptf | InOut | real | Excess phase |
131 | cjc | InOut | real | Zero bias B-C depletion capacitance |
132 | vjc | InOut | real | B-C built in potential |
132 | pc | InOut | real | |
133 | mjc | InOut | real | B-C junction grading coefficient |
133 | mc | InOut | real | |
134 | xcjc | InOut | real | Fraction of B-C cap to internal base |
135 | tr | InOut | real | Ideal reverse transit time |
136 | cjs | InOut | real | Zero bias Substrate capacitance |
136 | csub | InOut | real | |
137 | vjs | InOut | real | Substrate junction built in potential |
137 | ps | InOut | real | |
138 | mjs | InOut | real | Substrate junction grading coefficient |
138 | ms | InOut | real | |
139 | xtb | InOut | real | Forward and reverse beta temp. exp. |
140 | eg | InOut | real | Energy gap for IS temp. dependency |
141 | xti | InOut | real | Temp. exponent for IS |
148 | tre1 | InOut | real | Temp. coefficient 1 for RE |
149 | tre2 | InOut | real | Temp. coefficient 2 for RE |
150 | trc1 | InOut | real | Temp. coefficient 1 for RC |
151 | trc2 | InOut | real | Temp. coefficient 2 for RC |
152 | trb1 | InOut | real | Temp. coefficient 1 for RB |
153 | trb2 | InOut | real | Temp. coefficient 2 for RB |
154 | trbm1 | InOut | real | Temp. coefficient 1 for RBM |
155 | trbm2 | InOut | real | Temp. coefficient 2 for RBM |
142 | fc | InOut | real | Forward bias junction fit parameter |
301 | invearlyvoltf | Out | real | Inverse early voltage:forward |
302 | invearlyvoltr | Out | real | Inverse early voltage:reverse |
303 | invrollofff | Out | real | Inverse roll off - forward |
304 | invrolloffr | Out | real | Inverse roll off - reverse |
305 | collectorconduct | Out | real | Collector conductance |
306 | emitterconduct | Out | real | Emitter conductance |
307 | transtimevbcfact | Out | real | Transit time VBC factor |
308 | excessphasefactor | Out | real | Excess phase fact. |
143 | tnom | InOut | real | Parameter measurement temperature |
145 | kf | InOut | real | Flicker Noise Coefficient |
144 | af | InOut | real | Flicker Noise Exponent |
# | Name | Direction | Type | Description |
1 | area | InOut | real | Area factor |
2 | off | InOut | flag | Device initially off |
3 | ic | In | real vector | Initial condition vector |
4 | icvbe | InOut | real | Initial B-E voltage |
5 | icvce | InOut | real | Initial C-E voltage |
6 | temp | InOut | real | Instance temperature |
7 | dtemp | InOut | real | Instance delta temperature |
8 | m | InOut | real | Multiplier |
212 | collnode | Out | integer | Number of collector node |
213 | basenode | Out | integer | Number of base node |
214 | emitnode | Out | integer | Number of emitter node |
215 | subsnode | Out | integer | Number of substrate node |
216 | collCXnode | Out | integer | Internal collector node |
217 | collCInode | Out | integer | Internal collector node |
218 | baseBXnode | Out | integer | Internal base node |
219 | baseBInode | Out | integer | Internal base node |
220 | baseBPnode | Out | integer | Internal base node |
221 | emitEInode | Out | integer | Internal emitter node |
222 | subsSInode | Out | integer | Internal substrate node |
223 | vbe | Out | real | B-E voltage |
224 | vbc | Out | real | B-C voltage |
225 | ic | Out | real | Collector current |
226 | ib | Out | real | Base current |
227 | ie | Out | real | Emitter current |
228 | is | Out | real | Substrate current |
229 | gm | Out | real | Small signal transconductance dIc/dVbe |
230 | go | Out | real | Small signal output conductance dIc/dVbc |
231 | gpi | Out | real | Small signal input conductance dIb/dVbe |
232 | gmu | Out | real | Small signal conductance dIb/dVbc |
233 | gx | Out | real | Conductance from base to internal base |
247 | cbe | Out | real | Internal base to emitter capacitance |
248 | cbex | Out | real | External base to emitter capacitance |
249 | cbc | Out | real | Internal base to collector capacitance |
250 | cbcx | Out | real | External Base to collector capacitance |
251 | cbep | Out | real | Parasitic Base to emitter capacitance |
252 | cbcp | Out | real | Parasitic Base to collector capacitance |
259 | p | Out | real | Power dissipation |
243 | geqcb | Out | real | Internal C-B-base cap. equiv. cond. |
246 | geqbx | Out | real | External C-B-base cap. equiv. cond. |
234 | qbe | Out | real | Charge storage B-E junction |
235 | cqbe | Out | real | Cap. due to charge storage in B-E jct. |
236 | qbc | Out | real | Charge storage B-C junction |
237 | cqbc | Out | real | Cap. due to charge storage in B-C jct. |
238 | qbx | Out | real | Charge storage B-X junction |
239 | cqbx | Out | real | Cap. due to charge storage in B-X jct. |
258 | sens_dc | Out | real | DC sensitivity |
253 | sens_real | Out | real | Real part of AC sensitivity |
254 | sens_imag | Out | real | DC sens. & imag part of AC sens. |
255 | sens_mag | Out | real | Sensitivity of AC magnitude |
256 | sens_ph | Out | real | Sensitivity of AC phase |
257 | sens_cplx | Out | complex | AC sensitivity |
# | Name | Direction | Type | Description |
305 | type | Out | string | NPN or PNP |
101 | npn | InOut | flag | NPN type device |
102 | pnp | InOut | flag | PNP type device |
103 | tnom (tref) | InOut | real | Parameter measurement temperature |
104 | rcx | InOut | real | Extrinsic coll resistance |
105 | rci | InOut | real | Intrinsic coll resistance |
106 | vo | InOut | real | Epi drift saturation voltage |
107 | gamm | InOut | real | Epi doping parameter |
108 | hrcf | InOut | real | High current RC factor |
109 | rbx | InOut | real | Extrinsic base resistance |
110 | rbi | InOut | real | Intrinsic base resistance |
111 | re | InOut | real | Intrinsic emitter resistance |
112 | rs | InOut | real | Intrinsic substrate resistance |
113 | rbp | InOut | real | Parasitic base resistance |
114 | is | InOut | real | Transport saturation current |
115 | nf | InOut | real | Forward emission coefficient |
116 | nr | InOut | real | Reverse emission coefficient |
117 | fc | InOut | real | Fwd bias depletion capacitance limit |
118 | cbeo | InOut | real | Extrinsic B-E overlap capacitance |
119 | cje | InOut | real | Zero bias B-E depletion capacitance |
120 | pe | InOut | real | B-E built in potential |
121 | me | InOut | real | B-E junction grading coefficient |
122 | aje | InOut | real | B-E capacitance smoothing factor |
123 | cbco | InOut | real | Extrinsic B-C overlap capacitance |
124 | cjc | InOut | real | Zero bias B-C depletion capacitance |
125 | qco | InOut | real | Epi charge parameter |
126 | cjep | InOut | real | B-C extrinsic zero bias capacitance |
127 | pc | InOut | real | B-C built in potential |
128 | mc | InOut | real | B-C junction grading coefficient |
129 | ajc | InOut | real | B-C capacitance smoothing factor |
130 | cjcp | InOut | real | Zero bias S-C capacitance |
131 | ps | InOut | real | S-C junction built in potential |
132 | ms | InOut | real | S-C junction grading coefficient |
133 | ajs | InOut | real | S-C capacitance smoothing factor |
134 | ibei | InOut | real | Ideal B-E saturation current |
135 | wbe | InOut | real | Portion of IBEI from Vbei, 1-WBE from Vbex |
136 | nei | InOut | real | Ideal B-E emission coefficient |
137 | iben | InOut | real | Non-ideal B-E saturation current |
138 | nen | InOut | real | Non-ideal B-E emission coefficient |
139 | ibci | InOut | real | Ideal B-C saturation current |
140 | nci | InOut | real | Ideal B-C emission coefficient |
141 | ibcn | InOut | real | Non-ideal B-C saturation current |
142 | ncn | InOut | real | Non-ideal B-C emission coefficient |
143 | avc1 | InOut | real | B-C weak avalanche parameter 1 |
144 | avc2 | InOut | real | B-C weak avalanche parameter 2 |
145 | isp | InOut | real | Parasitic transport saturation current |
146 | wsp | InOut | real | Portion of ICCP |
147 | nfp | InOut | real | Parasitic fwd emission coefficient |
148 | ibeip | InOut | real | Ideal parasitic B-E saturation current |
149 | ibenp | InOut | real | Non-ideal parasitic B-E saturation current |
150 | ibcip | InOut | real | Ideal parasitic B-C saturation current |
151 | ncip | InOut | real | Ideal parasitic B-C emission coefficient |
152 | ibcnp | InOut | real | Nonideal parasitic B-C saturation current |
153 | ncnp | InOut | real | Nonideal parasitic B-C emission coefficient |
154 | vef | InOut | real | Forward Early voltage |
155 | ver | InOut | real | Reverse Early voltage |
156 | ikf | InOut | real | Forward knee current |
157 | ikr | InOut | real | Reverse knee current |
158 | ikp | InOut | real | Parasitic knee current |
159 | tf | InOut | real | Ideal forward transit time |
160 | qtf | InOut | real | Variation of TF with base-width modulation |
161 | xtf | InOut | real | Coefficient for bias dependence of TF |
162 | vtf | InOut | real | Voltage giving VBC dependence of TF |
163 | itf | InOut | real | High current dependence of TF |
164 | tr | InOut | real | Ideal reverse transit time |
165 | td | InOut | real | Forward excess-phase delay time |
166 | kfn | InOut | real | B-E Flicker Noise Coefficient |
167 | afn | InOut | real | B-E Flicker Noise Exponent |
168 | bfn | InOut | real | B-E Flicker Noise 1/f dependence |
169 | xre | InOut | real | Temperature exponent of RE |
170 | xrb | InOut | real | Temperature exponent of RB |
171 | xrbi | InOut | real | Temperature exponent of RBI |
172 | xrc | InOut | real | Temperature exponent of RC |
173 | xrci | InOut | real | Temperature exponent of RCI |
174 | xrs | InOut | real | Temperature exponent of RS |
175 | xvo | InOut | real | Temperature exponent of VO |
176 | ea | InOut | real | Activation energy for IS |
177 | eaie | InOut | real | Activation energy for IBEI |
179 | eaic | InOut | real | Activation energy for IBCI/IBEIP |
179 | eais | InOut | real | Activation energy for IBCIP |
180 | eane | InOut | real | Activation energy for IBEN |
181 | eanc | InOut | real | Activation energy for IBCN/IBENP |
182 | eans | InOut | real | Activation energy for IBCNP |
183 | xis | InOut | real | Temperature exponent of IS |
184 | xii | InOut | real | Temperature exponent of IBEI,IBCI,IBEIP,IBCIP |
185 | xin | InOut | real | Temperature exponent of IBEN,IBCN,IBENP,IBCNP |
186 | tnf | InOut | real | Temperature exponent of NF |
187 | tavc | InOut | real | Temperature exponent of AVC2 |
188 | rth | InOut | real | Thermal resistance |
189 | cth | InOut | real | Thermal capacitance |
190 | vrt | InOut | real | Punch-through voltage of internal B-C junction |
191 | art | InOut | real | Smoothing parameter for reach-through |
192 | ccso | InOut | real | Fixed C-S capacitance |
193 | qbm | InOut | real | Select SGP qb formulation |
194 | nkf | InOut | real | High current beta rolloff |
195 | xikf | InOut | real | Temperature exponent of IKF |
196 | xrcx | InOut | real | Temperature exponent of RCX |
197 | xrbx | InOut | real | Temperature exponent of RBX |
198 | xrbp | InOut | real | Temperature exponent of RBP |
199 | isrr | InOut | real | Separate IS for fwd and rev |
200 | xisr | InOut | real | Temperature exponent of ISR |
201 | dear | InOut | real | Delta activation energy for ISRR |
202 | eap | InOut | real | Exitivation energy for ISP |
203 | vbbe | InOut | real | B-E breakdown voltage |
204 | nbbe | InOut | real | B-E breakdown emission coefficient |
205 | ibbe | InOut | real | B-E breakdown current |
206 | tvbbe1 | InOut | real | Linear temperature coefficient of VBBE |
207 | tvbbe2 | InOut | real | Quadratic temperature coefficient of VBBE |
208 | tnbbe | InOut | real | Temperature coefficient of NBBE |
209 | ebbe | InOut | real | exp(-VBBE/(NBBE*Vtv)) |
210 | dtemp | InOut | real | Locale Temperature difference |
211 | vers | InOut | real | Revision Version |
212 | vref | InOut | real | Reference Version |
# | Name | Direction | Type | Description |
---|---|---|---|---|
# | Name | Direction | Type | Description |
21 | m | InOut | real | Multiplier |
2 | l | InOut | real | Length |
1 | w | InOut | real | Width |
4 | ad | InOut | real | Drain area |
3 | as | InOut | real | Source area |
6 | pd | InOut | real | Drain perimeter |
5 | ps | InOut | real | Source perimeter |
8 | nrd | InOut | real | Drain squares |
7 | nrs | InOut | real | Source squares |
9 | off | In | flag | Device initially off |
12 | icvds | InOut | real | Initial D-S voltage |
13 | icvgs | InOut | real | Initial G-S voltage |
11 | icvbs | InOut | real | Initial B-S voltage |
20 | temp | InOut | real | Instance temperature |
22 | dtemp | InOut | real | Instance temperature difference |
10 | ic | In | real vector | Vector of D-S, G-S, B-S voltages |
15 | sens_l | In | flag | flag to request sensitivity WRT length |
14 | sens_w | In | flag | flag to request sensitivity WRT width |
215 | id | Out | real | Drain current |
18 | is | Out | real | Source current |
17 | ig | Out | real | Gate current |
16 | ib | Out | real | Bulk current |
217 | ibd | Out | real | B-D junction current |
216 | ibs | Out | real | B-S junction current |
231 | vgs | Out | real | Gate-Source voltage |
232 | vds | Out | real | Drain-Source voltage |
230 | vbs | Out | real | Bulk-Source voltage |
229 | vbd | Out | real | Bulk-Drain voltage |
203 | dnode | Out | integer | Number of the drain node |
204 | gnode | Out | integer | Number of the gate node |
205 | snode | Out | integer | Number of the source node |
206 | bnode | Out | integer | Number of the node |
207 | dnodeprime | Out | integer | Number of int. drain node |
208 | snodeprime | Out | integer | Number of int. source node |
211 | von | Out | real | |
212 | vdsat | Out | real | Saturation drain voltage |
213 | sourcevcrit | Out | real | Critical source voltage |
214 | drainvcrit | Out | real | Critical drain voltage |
258 | rs | Out | real | Source resistance |
209 | sourceconductance | Out | real | Conductance of source |
259 | rd | Out | real | Drain conductance |
210 | drainconductance | Out | real | Conductance of drain |
219 | gm | Out | real | Transconductance |
220 | gds | Out | real | Drain-Source conductance |
218 | gmb | Out | real | Bulk-Source transconductance |
218 | gmbs | Out | real | |
221 | gbd | Out | real | Bulk-Drain conductance |
222 | gbs | Out | real | Bulk-Source conductance |
223 | cbd | Out | real | Bulk-Drain capacitance |
224 | cbs | Out | real | Bulk-Source capacitance |
233 | cgs | Out | real | Gate-Source capacitance |
236 | cgd | Out | real | Gate-Drain capacitance |
239 | cgb | Out | real | Gate-Bulk capacitance |
235 | cqgs | Out | real | Capacitance due to gate-source charge storage |
238 | cqgd | Out | real | Capacitance due to gate-drain charge storage |
241 | cqgb | Out | real | Capacitance due to gate-bulk charge storage |
243 | cqbd | Out | real | Capacitance due to bulk-drain charge storage |
245 | cqbs | Out | real | Capacitance due to bulk-source charge storage |
225 | cbd0 | Out | real | Zero-Bias B-D junction capacitance |
226 | cbdsw0 | Out | real | |
227 | cbs0 | Out | real | Zero-Bias B-S junction capacitance |
228 | cbssw0 | Out | real | |
234 | qgs | Out | real | Gate-Source charge storage |
237 | qgd | Out | real | Gate-Drain charge storage |
240 | qgb | Out | real | Gate-Bulk charge storage |
242 | qbd | Out | real | Bulk-Drain charge storage |
244 | qbs | Out | real | Bulk-Source charge storage |
19 | p | Out | real | Instaneous power |
256 | sens_l_dc | Out | real | dc sensitivity wrt length |
246 | sens_l_real | Out | real | real part of ac sensitivity wrt length |
247 | sens_l_imag | Out | real | imag part of ac sensitivity wrt length |
248 | sens_l_mag | Out | real | sensitivity wrt l of ac magnitude |
249 | sens_l_ph | Out | real | sensitivity wrt l of ac phase |
250 | sens_l_cplx | Out | complex | ac sensitivity wrt length |
257 | sens_w_dc | Out | real | dc sensitivity wrt width |
251 | sens_w_real | Out | real | real part of ac sensitivity wrt width |
252 | sens_w_imag | Out | real | imag part of ac sensitivity wrt width |
253 | sens_w_mag | Out | real | sensitivity wrt w of ac magnitude |
254 | sens_w_ph | Out | real | sensitivity wrt w of ac phase |
255 | sens_w_cplx | Out | complex | ac sensitivity wrt width |
# | Name | Direction | Type | Description |
133 | type | Out | string | N-channel or P-channel MOS |
101 | vto | InOut | real | Threshold voltage |
101 | vt0 | InOut | real | |
102 | kp | InOut | real | Transconductance parameter |
103 | gamma | InOut | real | Bulk threshold parameter |
104 | phi | InOut | real | Surface potential |
105 | lambda | InOut | real | Channel length modulation |
106 | rd | InOut | real | Drain ohmic resistance |
107 | rs | InOut | real | Source ohmic resistance |
108 | cbd | InOut | real | B-D junction capacitance |
109 | cbs | InOut | real | B-S junction capacitance |
110 | is | InOut | real | Bulk junction sat. current |
111 | pb | InOut | real | Bulk junction potential |
112 | cgso | InOut | real | Gate-source overlap cap. |
113 | cgdo | InOut | real | Gate-drain overlap cap. |
114 | cgbo | InOut | real | Gate-bulk overlap cap. |
122 | rsh | InOut | real | Sheet resistance |
115 | cj | InOut | real | Bottom junction cap per area |
116 | mj | InOut | real | Bottom grading coefficient |
117 | cjsw | InOut | real | Side junction cap per area |
118 | mjsw | InOut | real | Side grading coefficient |
119 | js | InOut | real | Bulk jct. sat. current density |
120 | tox | InOut | real | Oxide thickness |
121 | ld | InOut | real | Lateral diffusion |
123 | u0 | InOut | real | Surface mobility |
123 | uo | InOut | real | |
124 | fc | InOut | real | Forward bias jct. fit parm. |
128 | nmos | In | flag | N type MOSfet model |
129 | pmos | In | flag | P type MOSfet model |
125 | nsub | InOut | real | Substrate doping |
126 | tpg | InOut | integer | Gate type |
127 | nss | InOut | real | Surface state density |
130 | tnom | InOut | real | Parameter measurement temperature |
131 | kf | InOut | real | Flicker noise coefficient |
132 | af | InOut | real | Flicker noise exponent |
# | Name | Direction | Type | Description
|
80 | m | InOut | real | Multiplier
|
2 | l | InOut | real | Length
|
1 | w | InOut | real | Width
|
4 | ad | InOut | real | Drain area
|
3 | as | InOut | real | Source area
|
6 | pd | InOut | real | Drain perimeter
|
5 | ps | InOut | real | Source perimeter
|
34 | id | Out | real | Drain current
|
34 | cd | Out | real | |
36 | ibd | Out | real | B-D junction current
|
35 | ibs | Out | real | B-S junction current
|
18 | is | Out | real | Source current
|
17 | ig | Out | real | Gate current
|
16 | ib | Out | real | Bulk current
|
50 | vgs | Out | real | Gate-Source voltage
|
51 | vds | Out | real | Drain-Source voltage
|
49 | vbs | Out | real | Bulk-Source voltage
|
48 | vbd | Out | real | Bulk-Drain voltage
|
8 | nrd | InOut | real | Drain squares
|
7 | nrs | InOut | real | Source squares
|
9 | off | In | flag | Device initially off
|
12 | icvds | InOut | real | Initial D-S voltage
|
13 | icvgs | InOut | real | Initial G-S voltage
|
11 | icvbs | InOut | real | Initial B-S voltage
|
77 | temp | InOut | real | Instance operating temperature
|
81 | dtemp | InOut | real | Instance temperature difference
|
10 | ic | In | real vector | Vector of D-S, G-S, B-S voltages
|
15 | sens_l | In | flag | flag to request sensitivity WRT length
|
14 | sens_w | In | flag | flag to request sensitivity WRT width
|
22 | dnode | Out | integer | Number of drain node
|
23 | gnode | Out | integer | Number of gate node
|
24 | snode | Out | integer | Number of source node
|
25 | bnode | Out | integer | Number of bulk node
|
26 | dnodeprime | Out | integer | Number of internal drain node
|
27 | snodeprime | Out | integer | Number of internal source node
|
30 | von | Out | real | |
31 | vdsat | Out | real | Saturation drain voltage
|
32 | sourcevcrit | Out | real | Critical source voltage
|
33 | drainvcrit | Out | real | Critical drain voltage
|
78 | rs | Out | real | Source resistance
|
28 | sourceconductance | Out | real | Source conductance
|
79 | rd | Out | real | Drain resistance
|
29 | drainconductance | Out | real | Drain conductance
|
38 | gm | Out | real | Transconductance
|
39 | gds | Out | real | Drain-Source conductance
|
37 | gmb | Out | real | Bulk-Source transconductance
|
37 | gmbs | Out | real | |
40 | gbd | Out | real | Bulk-Drain conductance
|
41 | gbs | Out | real | Bulk-Source conductance
|
42 | cbd | Out | real | Bulk-Drain capacitance
|
43 | cbs | Out | real | Bulk-Source capacitance
|
52 | cgs | Out | real | Gate-Source capacitance
|
55 | cgd | Out | real | Gate-Drain capacitance
|
58 | cgb | Out | real | Gate-Bulk capacitance
|
44 | cbd0 | Out | real | Zero-Bias B-D junction capacitance
|
45 | cbdsw0 | Out | real | |
46 | cbs0 | Out | real | Zero-Bias B-S junction capacitance
|
47 | cbssw0 | Out | real | |
54 | cqgs | Out | real | Capacitance due to gate-source charge storage
|
57 | cqgd | Out | real | Capacitance due to gate-drain charge storage
|
60 | cqgb | Out | real | Capacitance due to gate-bulk charge storage
|
62 | cqbd | Out | real | Capacitance due to bulk-drain charge storage
|
64 | cqbs | Out | real | Capacitance due to bulk-source charge storage
|
53 | qgs | Out | real | Gate-Source charge storage
|
56 | qgd | Out | real | Gate-Drain charge storage
|
59 | qgb | Out | real | Gate-Bulk charge storage
|
61 | qbd | Out | real | Bulk-Drain charge storage
|
63 | qbs | Out | real | Bulk-Source charge storage
|
19 | p | Out | real | Instantaneous power
|
75 | sens_l_dc | Out | real | dc sensitivity wrt length
|
70 | sens_l_real | Out | real | real part of ac sensitivity wrt length
|
71 | sens_l_imag | Out | real | imag part of ac sensitivity wrt length
|
74 | sens_l_cplx | Out | complex | ac sensitivity wrt length
|
72 | sens_l_mag | Out | real | sensitivity wrt l of ac magnitude
|
73 | sens_l_ph | Out | real | sensitivity wrt l of ac phase
|
76 | sens_w_dc | Out | real | dc sensitivity wrt width
|
65 | sens_w_real | Out | real | dc sensitivity and real part of ac sensitivity wrt width
|
66 | sens_w_imag | Out | real | imag part of ac sensitivity wrt width
|
67 | sens_w_mag | Out | real | sensitivity wrt w of ac magnitude
|
68 | sens_w_ph | Out | real | sensitivity wrt w of ac phase
|
69 | sens_w_cplx | Out | complex | ac sensitivity wrt width
|
# | Name | Direction | Type | Description |
141 | type | Out | string | N-channel or P-channel MOS |
101 | vto | InOut | real | Threshold voltage |
101 | vt0 | InOut | real | |
102 | kp | InOut | real | Transconductance parameter |
103 | gamma | InOut | real | Bulk threshold parameter |
104 | phi | InOut | real | Surface potential |
105 | lambda | InOut | real | Channel length modulation |
106 | rd | InOut | real | Drain ohmic resistance |
107 | rs | InOut | real | Source ohmic resistance |
108 | cbd | InOut | real | B-D junction capacitance |
109 | cbs | InOut | real | B-S junction capacitance |
110 | is | InOut | real | Bulk junction sat. current |
111 | pb | InOut | real | Bulk junction potential |
112 | cgso | InOut | real | Gate-source overlap cap. |
113 | cgdo | InOut | real | Gate-drain overlap cap. |
114 | cgbo | InOut | real | Gate-bulk overlap cap. |
122 | rsh | InOut | real | Sheet resistance |
115 | cj | InOut | real | Bottom junction cap per area |
116 | mj | InOut | real | Bottom grading coefficient |
117 | cjsw | InOut | real | Side junction cap per area |
118 | mjsw | InOut | real | Side grading coefficient |
119 | js | InOut | real | Bulk jct. sat. current density |
120 | tox | InOut | real | Oxide thickness |
121 | ld | InOut | real | Lateral diffusion |
123 | u0 | InOut | real | Surface mobility |
123 | uo | InOut | real | |
124 | fc | InOut | real | Forward bias jct. fit parm. |
135 | nmos | In | flag | N type MOSfet model |
136 | pmos | In | flag | P type MOSfet model |
125 | nsub | InOut | real | Substrate doping |
126 | tpg | InOut | integer | Gate type |
127 | nss | InOut | real | Surface state density |
129 | delta | InOut | real | Width effect on threshold |
130 | uexp | InOut | real | Crit. field exp for mob. deg. |
134 | ucrit | InOut | real | Crit. field for mob. degradation |
131 | vmax | InOut | real | Maximum carrier drift velocity |
132 | xj | InOut | real | Junction depth |
133 | neff | InOut | real | Total channel charge coeff. |
128 | nfs | InOut | real | Fast surface state density |
137 | tnom | InOut | real | Parameter measurement temperature |
139 | kf | InOut | real | Flicker noise coefficient |
140 | af | InOut | real | Flicker noise exponent |
# | Name | Direction | Type | Description |
80 | m | InOut | real | Multiplier |
2 | l | InOut | real | Length |
1 | w | InOut | real | Width |
4 | ad | InOut | real | Drain area |
3 | as | InOut | real | Source area |
6 | pd | InOut | real | Drain perimeter |
5 | ps | InOut | real | Source perimeter |
34 | id | Out | real | Drain current |
34 | cd | Out | real | Drain current |
36 | ibd | Out | real | B-D junction current |
35 | ibs | Out | real | B-S junction current |
18 | is | Out | real | Source current |
17 | ig | Out | real | Gate current |
16 | ib | Out | real | Bulk current |
50 | vgs | Out | real | Gate-Source voltage |
51 | vds | Out | real | Drain-Source voltage |
49 | vbs | Out | real | Bulk-Source voltage |
48 | vbd | Out | real | Bulk-Drain voltage |
8 | nrd | InOut | real | Drain squares |
7 | nrs | InOut | real | Source squares |
9 | off | In | flag | Device initially off |
12 | icvds | InOut | real | Initial D-S voltage |
13 | icvgs | InOut | real | Initial G-S voltage |
11 | icvbs | InOut | real | Initial B-S voltage |
10 | ic | InOut | real vector | Vector of D-S, G-S, B-S voltages |
77 | temp | InOut | real | Instance operating temperature |
81 | dtemp | InOut | real | Instance temperature difference |
15 | sens_l | In | flag | flag to request sensitivity WRT length |
14 | sens_w | In | flag | flag to request sensitivity WRT width |
22 | dnode | Out | integer | Number of drain node |
23 | gnode | Out | integer | Number of gate node |
24 | snode | Out | integer | Number of source node |
25 | bnode | Out | integer | Number of bulk node |
26 | dnodeprime | Out | integer | Number of internal drain node |
27 | snodeprime | Out | integer | Number of internal source node |
30 | von | Out | real | Turn-on voltage |
31 | vdsat | Out | real | Saturation drain voltage |
32 | sourcevcrit | Out | real | Critical source voltage |
33 | drainvcrit | Out | real | Critical drain voltage |
78 | rs | Out | real | Source resistance |
28 | sourceconductance | Out | real | Source conductance |
79 | rd | Out | real | Drain resistance |
29 | drainconductance | Out | real | Drain conductance |
38 | gm | Out | real | Transconductance |
39 | gds | Out | real | Drain-Source conductance |
37 | gmb | Out | real | Bulk-Source transconductance |
37 | gmbs | Out | real | Bulk-Source transconductance |
40 | gbd | Out | real | Bulk-Drain conductance |
41 | gbs | Out | real | Bulk-Source conductance |
42 | cbd | Out | real | Bulk-Drain capacitance |
43 | cbs | Out | real | Bulk-Source capacitance |
52 | cgs | Out | real | Gate-Source capacitance |
55 | cgd | Out | real | Gate-Drain capacitance |
58 | cgb | Out | real | Gate-Bulk capacitance |
54 | cqgs | Out | real | Capacitance due to gate-source charge storage |
57 | cqgd | Out | real | Capacitance due to gate-drain charge storage |
60 | cqgb | Out | real | Capacitance due to gate-bulk charge storage |
62 | cqbd | Out | real | Capacitance due to bulk-drain charge storage |
64 | cqbs | Out | real | Capacitance due to bulk-source charge storage |
44 | cbd0 | Out | real | Zero-Bias B-D junction capacitance |
45 | cbdsw0 | Out | real | Zero-Bias B-D sidewall capacitance |
46 | cbs0 | Out | real | Zero-Bias B-S junction capacitance |
47 | cbssw0 | Out | real | Zero-Bias B-S sidewall capacitance |
63 | qbs | Out | real | Bulk-Source charge storage |
53 | qgs | Out | real | Gate-Source charge storage |
56 | qgd | Out | real | Gate-Drain charge storage |
59 | qgb | Out | real | Gate-Bulk charge storage |
61 | qbd | Out | real | Bulk-Drain charge storage |
19 | p | Out | real | Instantaneous power |
76 | sens_l_dc | Out | real | dc sensitivity wrt length |
70 | sens_l_real | Out | real | real part of ac sensitivity wrt length |
71 | sens_l_imag | Out | real | imag part of ac sensitivity wrt length |
74 | sens_l_cplx | Out | complex | ac sensitivity wrt length |
72 | sens_l_mag | Out | real | sensitivity wrt l of ac magnitude |
73 | sens_l_ph | Out | real | sensitivity wrt l of ac phase |
75 | sens_w_dc | Out | real | dc sensitivity wrt width |
65 | sens_w_real | Out | real | real part of ac sensitivity wrt width |
66 | sens_w_imag | Out | real | imag part of ac sensitivity wrt width |
67 | sens_w_mag | Out | real | sensitivity wrt w of ac magnitude |
68 | sens_w_ph | Out | real | sensitivity wrt w of ac phase |
69 | sens_w_cplx | Out | complex | ac sensitivity wrt width |
# | Name | Direction | Type | Description |
144 | type | Out | string | N-channel or P-channel MOS |
133 | nmos | In | flag | N type MOSfet model |
134 | pmos | In | flag | P type MOSfet model |
101 | vto | InOut | real | Threshold voltage |
101 | vt0 | InOut | real | |
102 | kp | InOut | real | Transconductance parameter |
103 | gamma | InOut | real | Bulk threshold parameter |
104 | phi | InOut | real | Surface potential |
105 | rd | InOut | real | Drain ohmic resistance |
106 | rs | InOut | real | Source ohmic resistance |
107 | cbd | InOut | real | B-D junction capacitance |
108 | cbs | InOut | real | B-S junction capacitance |
109 | is | InOut | real | Bulk junction sat. current |
110 | pb | InOut | real | Bulk junction potential |
111 | cgso | InOut | real | Gate-source overlap cap. |
112 | cgdo | InOut | real | Gate-drain overlap cap. |
113 | cgbo | InOut | real | Gate-bulk overlap cap. |
114 | rsh | InOut | real | Sheet resistance |
115 | cj | InOut | real | Bottom junction cap per area |
116 | mj | InOut | real | Bottom grading coefficient |
117 | cjsw | InOut | real | Side junction cap per area |
118 | mjsw | InOut | real | Side grading coefficient |
119 | js | InOut | real | Bulk jct. sat. current density |
120 | tox | InOut | real | Oxide thickness |
121 | ld | InOut | real | Lateral diffusion |
145 | xl | InOut | real | Length mask adjustment |
146 | wd | InOut | real | Width Narrowing (Diffusion) |
147 | xw | InOut | real | Width mask adjustment |
148 | delvto | InOut | real | Threshold voltage Adjust |
148 | delvt0 | InOut | real | |
122 | u0 | InOut | real | Surface mobility |
122 | uo | InOut | real | |
123 | fc | InOut | real | Forward bias jct. fit parm. |
124 | nsub | InOut | real | Substrate doping |
125 | tpg | InOut | integer | Gate type |
126 | nss | InOut | real | Surface state density |
131 | vmax | InOut | real | Maximum carrier drift velocity |
135 | xj | InOut | real | Junction depth |
129 | nfs | InOut | real | Fast surface state density |
138 | xd | InOut | real | Depletion layer width |
139 | alpha | InOut | real | Alpha |
127 | eta | InOut | real | Vds dependence of threshold voltage |
128 | delta | InOut | real | Width effect on threshold |
140 | input_delta | InOut | real | |
130 | theta | InOut | real | Vgs dependence on mobility |
132 | kappa | InOut | real | Kappa |
141 | tnom | InOut | real | Parameter measurement temperature |
142 | kf | InOut | real | Flicker noise coefficient |
143 | af | InOut | real | Flicker noise exponent |
# | Name | Direction | Type | Description |
2 | l | InOut | real | Length |
1 | w | InOut | real | Width |
22 | m | InOut | real | Parallel Multiplier |
4 | ad | InOut | real | Drain area |
3 | as | InOut | real | Source area |
6 | pd | InOut | real | Drain perimeter |
5 | ps | InOut | real | Source perimeter |
215 | id | Out | real | Drain current |
215 | cd | Out | real | Drain current |
18 | is | Out | real | Source current |
17 | ig | Out | real | Gate current |
16 | ib | Out | real | Bulk current |
216 | ibs | Out | real | B-S junction capacitance |
217 | ibd | Out | real | B-D junction capacitance |
231 | vgs | Out | real | Gate-Source voltage |
232 | vds | Out | real | Drain-Source voltage |
230 | vbs | Out | real | Bulk-Source voltage |
229 | vbd | Out | real | Bulk-Drain voltage |
8 | nrd | InOut | real | Drain squares |
7 | nrs | InOut | real | Source squares |
9 | off | In | flag | Device initially off |
12 | icvds | InOut | real | Initial D-S voltage |
13 | icvgs | InOut | real | Initial G-S voltage |
11 | icvbs | InOut | real | Initial B-S voltage |
20 | temp | InOut | real | Instance temperature |
21 | dtemp | InOut | real | Instance temperature difference |
10 | ic | In | real vector | Vector of D-S, G-S, B-S voltages |
15 | sens_l | In | flag | flag to request sensitivity WRT length |
14 | sens_w | In | flag | flag to request sensitivity WRT width |
203 | dnode | Out | integer | Number of the drain node |
204 | gnode | Out | integer | Number of the gate node |
205 | snode | Out | integer | Number of the source node |
206 | bnode | Out | integer | Number of the node |
207 | dnodeprime | Out | integer | Number of int. drain node |
208 | snodeprime | Out | integer | Number of int. source node |
258 | rs | Out | real | Source resistance |
209 | sourceconductance | Out | real | Source conductance |
259 | rd | Out | real | Drain resistance |
210 | drainconductance | Out | real | Drain conductance |
211 | von | Out | real | Turn-on voltage |
212 | vdsat | Out | real | Saturation drain voltage |
213 | sourcevcrit | Out | real | Critical source voltage |
214 | drainvcrit | Out | real | Critical drain voltage |
218 | gmbs | Out | real | Bulk-Source transconductance |
219 | gm | Out | real | Transconductance |
220 | gds | Out | real | Drain-Source conductance |
221 | gbd | Out | real | Bulk-Drain conductance |
222 | gbs | Out | real | Bulk-Source conductance |
233 | cgs | Out | real | Gate-Source capacitance |
236 | cgd | Out | real | Gate-Drain capacitance |
239 | cgb | Out | real | Gate-Bulk capacitance |
223 | cbd | Out | real | Bulk-Drain capacitance |
224 | cbs | Out | real | Bulk-Source capacitance |
225 | cbd0 | Out | real | Zero-Bias B-D junction capacitance |
226 | cbdsw0 | Out | real | |
227 | cbs0 | Out | real | Zero-Bias B-S junction capacitance |
228 | cbssw0 | Out | real | |
235 | cqgs | Out | real | Capacitance due to gate-source charge storage |
238 | cqgd | Out | real | Capacitance due to gate-drain charge storage |
241 | cqgb | Out | real | Capacitance due to gate-bulk charge storage |
243 | cqbd | Out | real | Capacitance due to bulk-drain charge storage |
245 | cqbs | Out | real | Capacitance due to bulk-source charge storage |
234 | qgs | Out | real | Gate-Source charge storage |
237 | qgd | Out | real | Gate-Drain charge storage |
240 | qgb | Out | real | Gate-Bulk charge storage |
242 | qbd | Out | real | Bulk-Drain charge storage |
244 | qbs | Out | real | Bulk-Source charge storage |
19 | p | Out | real | Instaneous power |
256 | sens_l_dc | Out | real | dc sensitivity wrt length |
246 | sens_l_real | Out | real | real part of ac sensitivity wrt length |
247 | sens_l_imag | Out | real | imag part of ac sensitivity wrt length |
248 | sens_l_mag | Out | real | sensitivity wrt l of ac magnitude |
249 | sens_l_ph | Out | real | sensitivity wrt l of ac phase |
250 | sens_l_cplx | Out | complex | ac sensitivity wrt length |
257 | sens_w_dc | Out | real | dc sensitivity wrt width |
251 | sens_w_real | Out | real | real part of ac sensitivity wrt width |
252 | sens_w_imag | Out | real | imag part of ac sensitivity wrt width |
253 | sens_w_mag | Out | real | sensitivity wrt w of ac magnitude |
254 | sens_w_ph | Out | real | sensitivity wrt w of ac phase |
255 | sens_w_cplx | Out | complex | ac sensitivity wrt width |
# | Name | Direction | Type | Description |
140 | type | Out | string | N-channel or P-channel MOS |
101 | vto | InOut | real | Threshold voltage |
101 | vt0 | InOut | real | |
102 | kv | InOut | real | Saturation voltage factor |
103 | nv | InOut | real | Saturation voltage coeff. |
104 | kc | InOut | real | Saturation current factor |
105 | nc | InOut | real | Saturation current coeff. |
106 | nvth | InOut | real | Threshold voltage coeff. |
107 | ps | InOut | real | Sat. current modification par. |
108 | gamma | InOut | real | Bulk threshold parameter |
109 | gamma1 | InOut | real | Bulk threshold parameter 1 |
110 | sigma | InOut | real | Static feedback effect par. |
111 | phi | InOut | real | Surface potential |
112 | lambda | InOut | real | Channel length modulation param. |
113 | lambda0 | InOut | real | Channel length modulation param. 0 |
114 | lambda1 | InOut | real | Channel length modulation param. 1 |
115 | rd | InOut | real | Drain ohmic resistance |
116 | rs | InOut | real | Source ohmic resistance |
117 | cbd | InOut | real | B-D junction capacitance |
118 | cbs | InOut | real | B-S junction capacitance |
119 | is | InOut | real | Bulk junction sat. current |
120 | pb | InOut | real | Bulk junction potential |
121 | cgso | InOut | real | Gate-source overlap cap. |
122 | cgdo | InOut | real | Gate-drain overlap cap. |
123 | cgbo | InOut | real | Gate-bulk overlap cap. |
131 | rsh | InOut | real | Sheet resistance |
124 | cj | InOut | real | Bottom junction cap per area |
125 | mj | InOut | real | Bottom grading coefficient |
126 | cjsw | InOut | real | Side junction cap per area |
127 | mjsw | InOut | real | Side grading coefficient |
128 | js | InOut | real | Bulk jct. sat. current density |
130 | ld | InOut | real | Lateral diffusion |
129 | tox | InOut | real | Oxide thickness |
132 | u0 | InOut | real | Surface mobility |
132 | uo | InOut | real | |
133 | fc | InOut | real | Forward bias jct. fit parm. |
137 | nmos | In | flag | N type MOSfet model |
138 | pmos | In | flag | P type MOSfet model |
135 | tpg | InOut | integer | Gate type |
134 | nsub | InOut | real | Substrate doping |
136 | nss | InOut | real | Surface state density |
139 | tnom | InOut | real | Parameter measurement temperature |
# | Name | Direction | Type | Description |
80 | m | InOut | real | Multiplier |
2 | l | InOut | real | Length |
1 | w | InOut | real | Width |
4 | ad | InOut | real | Drain area |
3 | as | InOut | real | Source area |
6 | pd | InOut | real | Drain perimeter |
5 | ps | InOut | real | Source perimeter |
34 | id | Out | real | Drain current |
34 | cd | Out | real | Drain current |
36 | ibd | Out | real | B-D junction current |
35 | ibs | Out | real | B-S junction current |
18 | is | Out | real | Source current |
17 | ig | Out | real | Gate current |
16 | ib | Out | real | Bulk current |
50 | vgs | Out | real | Gate-Source voltage |
51 | vds | Out | real | Drain-Source voltage |
49 | vbs | Out | real | Bulk-Source voltage |
48 | vbd | Out | real | Bulk-Drain voltage |
8 | nrd | InOut | real | Drain squares |
7 | nrs | InOut | real | Source squares |
9 | off | In | flag | Device initially off |
12 | icvds | InOut | real | Initial D-S voltage |
13 | icvgs | InOut | real | Initial G-S voltage |
11 | icvbs | InOut | real | Initial B-S voltage |
10 | ic | InOut | real vector | Vector of D-S, G-S, B-S voltages |
77 | temp | InOut | real | Instance operating temperature |
81 | dtemp | InOut | real | Instance operating temperature difference |
15 | sens_l | In | flag | flag to request sensitivity WRT length |
14 | sens_w | In | flag | flag to request sensitivity WRT width |
22 | dnode | Out | integer | Number of drain node |
23 | gnode | Out | integer | Number of gate node |
24 | snode | Out | integer | Number of source node |
25 | bnode | Out | integer | Number of bulk node |
26 | dnodeprime | Out | integer | Number of internal drain node |
27 | snodeprime | Out | integer | Number of internal source node |
30 | von | Out | real | Turn-on voltage |
31 | vdsat | Out | real | Saturation drain voltage |
32 | sourcevcrit | Out | real | Critical source voltage |
33 | drainvcrit | Out | real | Critical drain voltage |
78 | rs | Out | real | Source resistance |
28 | sourceconductance | Out | real | Source conductance |
79 | rd | Out | real | Drain resistance |
29 | drainconductance | Out | real | Drain conductance |
38 | gm | Out | real | Transconductance |
39 | gds | Out | real | Drain-Source conductance |
37 | gmb | Out | real | Bulk-Source transconductance |
37 | gmbs | Out | real | Bulk-Source transconductance |
40 | gbd | Out | real | Bulk-Drain conductance |
41 | gbs | Out | real | Bulk-Source conductance |
42 | cbd | Out | real | Bulk-Drain capacitance |
43 | cbs | Out | real | Bulk-Source capacitance |
52 | cgs | Out | real | Gate-Source capacitance |
55 | cgd | Out | real | Gate-Drain capacitance |
58 | cgb | Out | real | Gate-Bulk capacitance |
54 | cqgs | Out | real | Capacitance due to gate-source charge storage |
57 | cqgd | Out | real | Capacitance due to gate-drain charge storage |
60 | cqgb | Out | real | Capacitance due to gate-bulk charge storage |
62 | cqbd | Out | real | Capacitance due to bulk-drain charge storage |
64 | cqbs | Out | real | Capacitance due to bulk-source charge storage |
44 | cbd0 | Out | real | Zero-Bias B-D junction capacitance |
45 | cbdsw0 | Out | real | Zero-Bias B-D sidewall capacitance |
46 | cbs0 | Out | real | Zero-Bias B-S junction capacitance |
47 | cbssw0 | Out | real | Zero-Bias B-S sidewall capacitance |
63 | qbs | Out | real | Bulk-Source charge storage |
53 | qgs | Out | real | Gate-Source charge storage |
56 | qgd | Out | real | Gate-Drain charge storage |
59 | qgb | Out | real | Gate-Bulk charge storage |
61 | qbd | Out | real | Bulk-Drain charge storage |
19 | p | Out | real | Instantaneous power |
76 | sens_l_dc | Out | real | dc sensitivity wrt length |
70 | sens_l_real | Out | real | real part of ac sensitivity wrt length |
71 | sens_l_imag | Out | real | imag part of ac sensitivity wrt length |
74 | sens_l_cplx | Out | complex | ac sensitivity wrt length |
72 | sens_l_mag | Out | real | sensitivity wrt l of ac magnitude |
73 | sens_l_ph | Out | real | sensitivity wrt l of ac phase |
75 | sens_w_dc | Out | real | dc sensitivity wrt width |
65 | sens_w_real | Out | real | real part of ac sensitivity wrt width |
66 | sens_w_imag | Out | real | imag part of ac sensitivity wrt width |
67 | sens_w_mag | Out | real | sensitivity wrt w of ac magnitude |
68 | sens_w_ph | Out | real | sensitivity wrt w of ac phase |
69 | sens_w_cplx | Out | complex | ac sensitivity wrt width |
# | Name | Direction | Type | Description |
144 | type | Out | string | N-channel or P-channel MOS |
133 | nmos | In | flag | N type MOSfet model |
134 | pmos | In | flag | P type MOSfet model |
101 | vto | InOut | real | Threshold voltage |
101 | vt0 | InOut | real | |
102 | kp | InOut | real | Transconductance parameter |
103 | gamma | InOut | real | Bulk threshold parameter |
104 | phi | InOut | real | Surface potential |
105 | rd | InOut | real | Drain ohmic resistance |
106 | rs | InOut | real | Source ohmic resistance |
107 | cbd | InOut | real | B-D junction capacitance |
108 | cbs | InOut | real | B-S junction capacitance |
109 | is | InOut | real | Bulk junction sat. current |
110 | pb | InOut | real | Bulk junction potential |
111 | cgso | InOut | real | Gate-source overlap cap. |
112 | cgdo | InOut | real | Gate-drain overlap cap. |
113 | cgbo | InOut | real | Gate-bulk overlap cap. |
114 | rsh | InOut | real | Sheet resistance |
115 | cj | InOut | real | Bottom junction cap per area |
116 | mj | InOut | real | Bottom grading coefficient |
117 | cjsw | InOut | real | Side junction cap per area |
118 | mjsw | InOut | real | Side grading coefficient |
119 | js | InOut | real | Bulk jct. sat. current density |
120 | tox | InOut | real | Oxide thickness |
121 | ld | InOut | real | Lateral diffusion |
145 | xl | InOut | real | Length mask adjustment |
146 | wd | InOut | real | Width Narrowing (Diffusion) |
147 | xw | InOut | real | Width mask adjustment |
148 | delvto | InOut | real | Threshold voltage Adjust |
148 | delvt0 | InOut | real | |
122 | u0 | InOut | real | Surface mobility |
122 | uo | InOut | real | |
123 | fc | InOut | real | Forward bias jct. fit parm. |
124 | nsub | InOut | real | Substrate doping |
125 | tpg | InOut | integer | Gate type |
126 | nss | InOut | real | Surface state density |
131 | vmax | InOut | real | Maximum carrier drift velocity |
135 | xj | InOut | real | Junction depth |
129 | nfs | InOut | real | Fast surface state density |
138 | xd | InOut | real | Depletion layer width |
139 | alpha | InOut | real | Alpha |
127 | eta | InOut | real | Vds dependence of threshold voltage |
128 | delta | InOut | real | Width effect on threshold |
140 | input_delta | InOut | real | |
130 | theta | InOut | real | Vgs dependence on mobility |
132 | kappa | InOut | real | Kappa |
141 | tnom | InOut | real | Parameter measurement temperature |
142 | kf | InOut | real | Flicker noise coefficient |
143 | af | InOut | real | Flicker noise exponent |
# | Name | Direction | Type | Description |
2 | l | InOut | real | Length |
1 | w | InOut | real | Width |
14 | m | InOut | real | Parallel Multiplier |
4 | ad | InOut | real | Drain area |
3 | as | InOut | real | Source area |
6 | pd | InOut | real | Drain perimeter |
5 | ps | InOut | real | Source perimeter |
8 | nrd | InOut | real | Number of squares in drain |
7 | nrs | InOut | real | Number of squares in source |
9 | off | InOut | flag | Device is initially off |
11 | vds | InOut | real | Initial D-S voltage |
12 | vgs | InOut | real | Initial G-S voltage |
10 | vbs | InOut | real | Initial B-S voltage |
13 | ic | In | unknown vector | Vector of DS,GS,BS initial voltages |
# | Name | Direction | Type | Description |
101 | vfb | InOut | real | Flat band voltage |
102 | lvfb | InOut | real | Length dependence of vfb |
103 | wvfb | InOut | real | Width dependence of vfb |
104 | phi | InOut | real | Strong inversion surface potential |
105 | lphi | InOut | real | Length dependence of phi |
106 | wphi | InOut | real | Width dependence of phi |
107 | k1 | InOut | real | Bulk effect coefficient 1 |
108 | lk1 | InOut | real | Length dependence of k1 |
109 | wk1 | InOut | real | Width dependence of k1 |
110 | k2 | InOut | real | Bulk effect coefficient 2 |
111 | lk2 | InOut | real | Length dependence of k2 |
112 | wk2 | InOut | real | Width dependence of k2 |
113 | eta | InOut | real | VDS dependence of threshold voltage |
114 | leta | InOut | real | Length dependence of eta |
115 | weta | InOut | real | Width dependence of eta |
116 | x2e | InOut | real | VBS dependence of eta |
117 | lx2e | InOut | real | Length dependence of x2e |
118 | wx2e | InOut | real | Width dependence of x2e |
119 | x3e | InOut | real | VDS dependence of eta |
120 | lx3e | InOut | real | Length dependence of x3e |
121 | wx3e | InOut | real | Width dependence of x3e |
122 | dl | InOut | real | Channel length reduction in um |
123 | dw | InOut | real | Channel width reduction in um |
124 | muz | InOut | real | Zero field mobility at VDS=0 VGS=VTH |
125 | x2mz | InOut | real | VBS dependence of muz |
126 | lx2mz | InOut | real | Length dependence of x2mz |
127 | wx2mz | InOut | real | Width dependence of x2mz |
128 | mus | InOut | real | Mobility at VDS=VDD VGS=VTH, channel length modulation |
129 | lmus | InOut | real | Length dependence of mus |
130 | wmus | InOut | real | Width dependence of mus |
131 | x2ms | InOut | real | VBS dependence of mus |
132 | lx2ms | InOut | real | Length dependence of x2ms |
133 | wx2ms | InOut | real | Width dependence of x2ms |
134 | x3ms | InOut | real | VDS dependence of mus |
135 | lx3ms | InOut | real | Length dependence of x3ms |
136 | wx3ms | InOut | real | Width dependence of x3ms |
137 | u0 | InOut | real | VGS dependence of mobility |
138 | lu0 | InOut | real | Length dependence of u0 |
139 | wu0 | InOut | real | Width dependence of u0 |
140 | x2u0 | InOut | real | VBS dependence of u0 |
141 | lx2u0 | InOut | real | Length dependence of x2u0 |
142 | wx2u0 | InOut | real | Width dependence of x2u0 |
143 | u1 | InOut | real | VDS depence of mobility, velocity saturation |
144 | lu1 | InOut | real | Length dependence of u1 |
145 | wu1 | InOut | real | Width dependence of u1 |
146 | x2u1 | InOut | real | VBS depence of u1 |
147 | lx2u1 | InOut | real | Length depence of x2u1 |
148 | wx2u1 | InOut | real | Width depence of x2u1 |
149 | x3u1 | InOut | real | VDS depence of u1 |
150 | lx3u1 | InOut | real | Length dependence of x3u1 |
151 | wx3u1 | InOut | real | Width depence of x3u1 |
152 | n0 | InOut | real | Subthreshold slope |
153 | ln0 | InOut | real | Length dependence of n0 |
154 | wn0 | InOut | real | Width dependence of n0 |
155 | nb | InOut | real | VBS dependence of subthreshold slope |
156 | lnb | InOut | real | Length dependence of nb |
157 | wnb | InOut | real | Width dependence of nb |
158 | nd | InOut | real | VDS dependence of subthreshold slope |
159 | lnd | InOut | real | Length dependence of nd |
160 | wnd | InOut | real | Width dependence of nd |
161 | tox | InOut | real | Gate oxide thickness in um |
162 | temp | InOut | real | Temperature in degree Celcius |
163 | vdd | InOut | real | Supply voltage to specify mus |
164 | cgso | InOut | real | Gate source overlap capacitance per unit channel width(m) |
165 | cgdo | InOut | real | Gate drain overlap capacitance per unit channel width(m) |
166 | cgbo | InOut | real | Gate bulk overlap capacitance per unit channel length(m) |
167 | xpart | InOut | real | Flag for channel charge partitioning |
168 | rsh | InOut | real | Source drain diffusion sheet resistance in ohm per square |
169 | js | InOut | real | Source drain junction saturation current per unit area |
170 | pb | InOut | real | Source drain junction built in potential |
171 | mj | InOut | real | Source drain bottom junction capacitance grading coefficient |
172 | pbsw | InOut | real | Source drain side junction capacitance built in potential |
173 | mjsw | InOut | real | Source drain side junction capacitance grading coefficient |
174 | cj | InOut | real | Source drain bottom junction capacitance per unit area |
175 | cjsw | InOut | real | Source drain side junction capacitance per unit area |
176 | wdf | InOut | real | Default width of source drain diffusion in um |
177 | dell | InOut | real | Length reduction of source drain diffusion |
180 | kf | InOut | real | Flicker noise coefficient |
181 | af | InOut | real | Flicker noise exponent |
178 | nmos | In | flag | Flag to indicate NMOS |
179 | pmos | In | flag | Flag to indicate PMOS |
# | Name | Direction | Type | Description |
2 | l | InOut | real | Length |
1 | w | InOut | real | Width |
14 | m | InOut | real | Parallel Multiplier |
4 | ad | InOut | real | Drain area |
3 | as | InOut | real | Source area |
6 | pd | InOut | real | Drain perimeter |
5 | ps | InOut | real | Source perimeter |
8 | nrd | InOut | real | Number of squares in drain |
7 | nrs | InOut | real | Number of squares in source |
9 | off | InOut | flag | Device is initially off |
11 | vds | InOut | real | Initial D-S voltage |
12 | vgs | InOut | real | Initial G-S voltage |
10 | vbs | InOut | real | Initial B-S voltage |
13 | ic | In | unknown vector | Vector of DS,GS,BS initial voltages |
# | Name | Direction | Type | Description |
101 | vfb | InOut | real | Flat band voltage |
102 | lvfb | InOut | real | Length dependence of vfb |
103 | wvfb | InOut | real | Width dependence of vfb |
104 | phi | InOut | real | Strong inversion surface potential |
105 | lphi | InOut | real | Length dependence of phi |
106 | wphi | InOut | real | Width dependence of phi |
107 | k1 | InOut | real | Bulk effect coefficient 1 |
108 | lk1 | InOut | real | Length dependence of k1 |
109 | wk1 | InOut | real | Width dependence of k1 |
110 | k2 | InOut | real | Bulk effect coefficient 2 |
111 | lk2 | InOut | real | Length dependence of k2 |
112 | wk2 | InOut | real | Width dependence of k2 |
113 | eta0 | InOut | real | VDS dependence of threshold voltage at VDD=0 |
114 | leta0 | InOut | real | Length dependence of eta0 |
115 | weta0 | InOut | real | Width dependence of eta0 |
116 | etab | InOut | real | VBS dependence of eta |
117 | letab | InOut | real | Length dependence of etab |
118 | wetab | InOut | real | Width dependence of etab |
119 | dl | InOut | real | Channel length reduction in um |
120 | dw | InOut | real | Channel width reduction in um |
121 | mu0 | InOut | real | Low-field mobility, at VDS=0 VGS=VTH |
122 | mu0b | InOut | real | VBS dependence of low-field mobility |
123 | lmu0b | InOut | real | Length dependence of mu0b |
124 | wmu0b | InOut | real | Width dependence of mu0b |
125 | mus0 | InOut | real | Mobility at VDS=VDD VGS=VTH |
126 | lmus0 | InOut | real | Length dependence of mus0 |
127 | wmus0 | InOut | real | Width dependence of mus |
128 | musb | InOut | real | VBS dependence of mus |
129 | lmusb | InOut | real | Length dependence of musb |
130 | wmusb | InOut | real | Width dependence of musb |
131 | mu20 | InOut | real | VDS dependence of mu in tanh term |
132 | lmu20 | InOut | real | Length dependence of mu20 |
133 | wmu20 | InOut | real | Width dependence of mu20 |
134 | mu2b | InOut | real | VBS dependence of mu2 |
135 | lmu2b | InOut | real | Length dependence of mu2b |
136 | wmu2b | InOut | real | Width dependence of mu2b |
137 | mu2g | InOut | real | VGS dependence of mu2 |
138 | lmu2g | InOut | real | Length dependence of mu2g |
139 | wmu2g | InOut | real | Width dependence of mu2g |
140 | mu30 | InOut | real | VDS dependence of mu in linear term |
141 | lmu30 | InOut | real | Length dependence of mu30 |
142 | wmu30 | InOut | real | Width dependence of mu30 |
143 | mu3b | InOut | real | VBS dependence of mu3 |
144 | lmu3b | InOut | real | Length dependence of mu3b |
145 | wmu3b | InOut | real | Width dependence of mu3b |
146 | mu3g | InOut | real | VGS dependence of mu3 |
147 | lmu3g | InOut | real | Length dependence of mu3g |
148 | wmu3g | InOut | real | Width dependence of mu3g |
149 | mu40 | InOut | real | VDS dependence of mu in linear term |
150 | lmu40 | InOut | real | Length dependence of mu40 |
151 | wmu40 | InOut | real | Width dependence of mu40 |
152 | mu4b | InOut | real | VBS dependence of mu4 |
153 | lmu4b | InOut | real | Length dependence of mu4b |
154 | wmu4b | InOut | real | Width dependence of mu4b |
155 | mu4g | InOut | real | VGS dependence of mu4 |
156 | lmu4g | InOut | real | Length dependence of mu4g |
157 | wmu4g | InOut | real | Width dependence of mu4g |
158 | ua0 | InOut | real | Linear VGS dependence of mobility |
159 | lua0 | InOut | real | Length dependence of ua0 |
160 | wua0 | InOut | real | Width dependence of ua0 |
161 | uab | InOut | real | VBS dependence of ua |
162 | luab | InOut | real | Length dependence of uab |
163 | wuab | InOut | real | Width dependence of uab |
164 | ub0 | InOut | real | Quadratic VGS dependence of mobility |
165 | lub0 | InOut | real | Length dependence of ub0 |
166 | wub0 | InOut | real | Width dependence of ub0 |
167 | ubb | InOut | real | VBS dependence of ub |
168 | lubb | InOut | real | Length dependence of ubb |
169 | wubb | InOut | real | Width dependence of ubb |
170 | u10 | InOut | real | VDS depence of mobility |
171 | lu10 | InOut | real | Length dependence of u10 |
172 | wu10 | InOut | real | Width dependence of u10 |
173 | u1b | InOut | real | VBS depence of u1 |
174 | lu1b | InOut | real | Length depence of u1b |
175 | wu1b | InOut | real | Width depence of u1b |
176 | u1d | InOut | real | VDS depence of u1 |
177 | lu1d | InOut | real | Length depence of u1d |
178 | wu1d | InOut | real | Width depence of u1d |
179 | n0 | InOut | real | Subthreshold slope at VDS=0 VBS=0 |
180 | ln0 | InOut | real | Length dependence of n0 |
181 | wn0 | InOut | real | Width dependence of n0 |
182 | nb | InOut | real | VBS dependence of n |
183 | lnb | InOut | real | Length dependence of nb |
184 | wnb | InOut | real | Width dependence of nb |
185 | nd | InOut | real | VDS dependence of n |
186 | lnd | InOut | real | Length dependence of nd |
187 | wnd | InOut | real | Width dependence of nd |
188 | vof0 | InOut | real | Threshold voltage offset AT VDS=0 VBS=0 |
189 | lvof0 | InOut | real | Length dependence of vof0 |
190 | wvof0 | InOut | real | Width dependence of vof0 |
191 | vofb | InOut | real | VBS dependence of vof |
192 | lvofb | InOut | real | Length dependence of vofb |
193 | wvofb | InOut | real | Width dependence of vofb |
194 | vofd | InOut | real | VDS dependence of vof |
195 | lvofd | InOut | real | Length dependence of vofd |
196 | wvofd | InOut | real | Width dependence of vofd |
197 | ai0 | InOut | real | Pre-factor of hot-electron effect. |
198 | lai0 | InOut | real | Length dependence of ai0 |
199 | wai0 | InOut | real | Width dependence of ai0 |
200 | aib | InOut | real | VBS dependence of ai |
201 | laib | InOut | real | Length dependence of aib |
202 | waib | InOut | real | Width dependence of aib |
203 | bi0 | InOut | real | Exponential factor of hot-electron effect. |
204 | lbi0 | InOut | real | Length dependence of bi0 |
205 | wbi0 | InOut | real | Width dependence of bi0 |
206 | bib | InOut | real | VBS dependence of bi |
207 | lbib | InOut | real | Length dependence of bib |
208 | wbib | InOut | real | Width dependence of bib |
209 | vghigh | InOut | real | Upper bound of the cubic spline function. |
210 | lvghigh | InOut | real | Length dependence of vghigh |
211 | wvghigh | InOut | real | Width dependence of vghigh |
212 | vglow | InOut | real | Lower bound of the cubic spline function. |
213 | lvglow | InOut | real | Length dependence of vglow |
214 | wvglow | InOut | real | Width dependence of vglow |
215 | tox | InOut | real | Gate oxide thickness in um |
216 | temp | InOut | real | Temperature in degree Celcius |
217 | vdd | InOut | real | Maximum Vds |
218 | vgg | InOut | real | Maximum Vgs |
219 | vbb | InOut | real | Maximum Vbs |
220 | cgso | InOut | real | Gate source overlap capacitance per unit channel width(m) |
221 | cgdo | InOut | real | Gate drain overlap capacitance per unit channel width(m) |
222 | cgbo | InOut | real | Gate bulk overlap capacitance per unit channel length(m) |
223 | xpart | InOut | real | Flag for channel charge partitioning |
224 | rsh | InOut | real | Source drain diffusion sheet resistance in ohm per square |
225 | js | InOut | real | Source drain junction saturation current per unit area |
226 | pb | InOut | real | Source drain junction built in potential |
227 | mj | InOut | real | Source drain bottom junction capacitance grading coefficient |
228 | pbsw | InOut | real | Source drain side junction capacitance built in potential |
229 | mjsw | InOut | real | Source drain side junction capacitance grading coefficient |
230 | cj | InOut | real | Source drain bottom junction capacitance per unit area |
231 | cjsw | InOut | real | Source drain side junction capacitance per unit area |
232 | wdf | InOut | real | Default width of source drain diffusion in um |
233 | dell | InOut | real | Length reduction of source drain diffusion |
236 | kf | InOut | real | Flicker noise coefficient |
237 | af | InOut | real | Flicker noise exponent |
234 | nmos | In | flag | Flag to indicate NMOS |
235 | pmos | In | flag | Flag to indicate PMOS |
# | Name | Direction | Type | Description |
1 | id | Out | real | Drain current |
2 | vgs | Out | real | Gate-Source voltage |
3 | vds | Out | real | Drain-Source voltage |
4 | vbs | Out | real | Bulk-Source voltage |
5 | gm | Out | real | Transconductance |
6 | gds | Out | real | Drain-Source conductance |
7 | gmbs | Out | real | Bulk-Source transconductance |
8 | vdsat | Out | real | Saturation voltage |
9 | vth | Out | real | Threshold voltage |
10 | ibd | Out | real | |
11 | ibs | Out | real | |
12 | gbd | Out | real | |
13 | gbs | Out | real | |
14 | qb | Out | real | Qbulk |
15 | cqb | Out | real | |
16 | qg | Out | real | Qgate |
17 | cqg | Out | real | |
18 | qd | Out | real | Qdrain |
19 | cqd | Out | real | |
20 | cgg | Out | real | |
21 | cgd | Out | real | |
22 | cgs | Out | real | |
23 | cdg | Out | real | |
24 | cdd | Out | real | |
25 | cds | Out | real | |
26 | cbg | Out | real | |
27 | cbd | Out | real | |
28 | cbs | Out | real | |
29 | capbd | Out | real | Diode capacitance |
30 | capbs | Out | real | Diode capacitance |
# | Name | Direction | Type | Description |
gmbs | Out | real | Body effect (Back gate) transconductance | |
gm | Out | real | Transconductance | |
gds | Out | real | Drain-Source conductance | |
vdsat | Out | real | Saturation voltage | |
vth | Out | real | Threshold voltage | |
id | Out | real | Drain current | |
ibd | Out | real | Bulk-Drain junction current | |
ibs | Out | real | Bulk-Source junction current | |
gbd | Out | real | Bulk-Drain junction conductance | |
gbs | Out | real | Bulk-Source junction conductance | |
isub | Out | real | Substrate current | |
igidl | Out | real | Gate-Induced Drain Leakage current | |
igisl | Out | real | Gate-Induced Source Leakage current | |
igs | Out | real | Gate-Source tunneling current | |
igd | Out | real | Gate-Drain tunneling current | |
igb | Out | real | Gate-Bulk tunneling current | |
igcs | Out | real | Gate-Channel-Source tunneling current | |
igcd | Out | real | Gate-Channel-Drain tunneling current | |
vbs | Out | real | Bulk-Source voltage | |
vgs | Out | real | Gate-Source voltage | |
vds | Out | real | Drain-Source voltage | |
cgg | Out | real | Intrinsic Gate capacitance | |
cgs | Out | real | Intrinsic Gate-Source transcapacitance | |
cgd | Out | real | Intrinsic Gate-Drain transcapacitance | |
cbg | Out | real | Intrinsic Bulk-Gate transcapacitance | |
cbd | Out | real | Intrinsic Bulk-Drain transcapacitance | |
cbs | Out | real | Intrinsic Bulk-Source transcapacitance | |
cdg | Out | real | Intrinsic Drain-Gate transcapacitance | |
cdd | Out | real | Intrinsic Drain capacitance | |
cds | Out | real | Intrinsic Drain-Source transcapacitance | |
csg | Out | real | Intrinsic Source-Gate transcapacitance | |
csd | Out | real | Intrinsic Source-Drain transcapacitance | |
css | Out | real | Intrinsic Source capacitance | |
cgb | Out | real | Intrinsic Gate-Bulk transcapacitance | |
cdb | Out | real | Intrinsic Drain-Bulk transcapacitance | |
csb | Out | real | Intrinsic Source-Bulk transcapacitance | |
cbb | Out | real | Intrinsic Bulk capacitance | |
capbd | Out | real | Drain-Bulk junction capacitance | |
capbs | Out | real | Drain-Source junction capacitance | |
qg | Out | real | Gate charge | |
qb | Out | real | Bulk charge | |
qd | Out | real | Drain charge | |
qs | Out | real | Source charge | |
qinv | Out | real | Channel charge | |
qdef | Out | real | ||
gcrg | Out | real | ||
gtau | Out | real | ||
vgsteff | Out | real | Effective Gate-Source voltage | |
vdseff | Out | real | Effective Drain-Source voltage | |
cgso | Out | real | Gate-Source overlap and fringing capacitance | |
cgdo | Out | real | Gate-Drain overlap and fringing capacitance | |
cgbo | Out | real | Gate-Bulk overlap and fringing capacitance | |
weff | Out | real | Effective width | |
leff | Out | real | Effective length |
/usr/local/opt/ncurses/lib/libncursesw.6.dylib
/usr/local/opt/gcc/lib/gcc/11/libstdc++.6.dylib
/usr/local/opt/fftw/lib/fftw3.3.dylib
/usr/local/opt/readline/lib/libreadline.8.dylib
/opt/local/lib/libXaw.7.dylib
/opt/local/lib/libXmu.6.dylib
/opt/local/lib/libXt.6.dylib
/opt/local/lib/libXext.6.dylib
/opt/local/lib/libX11.6.dylib
/opt/local/lib/libfontconfig.1.dylib
/opt/local/lib/libXrender.1.dylib
/opt/local/lib/libfreetype.6.dylib
/opt/local/lib/libSM.6.dylib
/opt/local/lib/libICE.6.dylib
/usr/local/opt/gcc/lib/gcc/11/libgomp.1.dylib
/usr/lib/libSystem.B.dylib
/usr/local/lib/gcc/11/libgcc_s.1.dylib
/usr/local/opt/gcc/lib/gcc/11/libstdc++.6.dylib
/usr/local/opt/fftw/lib/libfftw3.3.dylib
/usr/local/opt/gcc/lib/gcc/11/libgomp.1.dylib
/usr/lib/libSystem.B.dylib
/usr/local/lib/gcc/11/libgcc_s.1.dylib