Browse Source
Fix NAN error in numd2 area report and crashes when a doping file is missing. Update examples/cider so that the test circuits all run; add case sensitivity tests for rootfile and ic.file parameter strings enclosed in a single pair of double quotes.
pre-master-46
Fix NAN error in numd2 area report and crashes when a doping file is missing. Update examples/cider so that the test circuits all run; add case sensitivity tests for rootfile and ic.file parameter strings enclosed in a single pair of double quotes.
pre-master-46
committed by
Holger Vogt
23 changed files with 296 additions and 24 deletions
-
11examples/cider/bjt/README
-
4examples/cider/bjt/ecp.cir
-
72examples/cider/bjt/pebjt1.lib
-
1examples/cider/bjt/pz.cir
-
18examples/cider/bjt/pz1.cir
-
18examples/cider/diode/README
-
3examples/cider/diode/diode.cir
-
2examples/cider/diode/diotran.cir
-
44examples/cider/diode/pd1.cir
-
3examples/cider/diode/pindiode.cir
-
2examples/cider/mos/bootinv.cir
-
1examples/cider/parallel/clkfeed.cir
-
1examples/cider/parallel/cmosamp.cir
-
2examples/cider/parallel/ringosc.2u.cir
-
2examples/cider/resistor/gaasres.cir
-
2examples/cider/resistor/sires.cir
-
2examples/cider/serial/dbridge.cir
-
2examples/cider/serial/recovery.cir
-
5src/ciderlib/oned/oneprint.c
-
19src/ciderlib/support/suprem.c
-
5src/ciderlib/twod/twoprint.c
-
99src/frontend/inpcom.c
-
2src/spicelib/devices/numd2/nud2ask.c
@ -0,0 +1,11 @@ |
|||||
|
|
||||
|
Run: |
||||
|
|
||||
|
ngspice -b pz1.cir |
||||
|
|
||||
|
and the operating point file 'PEBJT1--OP.0.q1' is generated. |
||||
|
|
||||
|
The .model in the included library 'pebjt1.lib' has an output rootfile |
||||
|
parameter which determines the PEBJT1-- prefix. The mixed case in the name |
||||
|
of the generated OP file is retained. Without any rootfile or output statement |
||||
|
in the .model, the file created will be named 'OP.0.q1'. |
||||
@ -0,0 +1,72 @@ |
|||||
|
** |
||||
|
* Numerical models for a |
||||
|
* polysilicon emitter complementary bipolar process. |
||||
|
* The default device size is 1um by 10um (LxW) |
||||
|
** |
||||
|
|
||||
|
.model M_NPN nbjt level=1 |
||||
|
+ title One-Dimensional Numerical Bipolar |
||||
|
+ options base.depth=0.15 base.area=0.1 base.length=1.0 defa=10p |
||||
|
+ x.mesh loc=-0.2 n=1 |
||||
|
+ x.mesh loc=0.0 n=51 |
||||
|
+ x.mesh wid=0.15 h.e=0.0001 h.m=.004 r=1.2 |
||||
|
+ x.mesh wid=1.15 h.s=0.0001 h.m=.004 r=1.2 |
||||
|
+ domain num=1 material=1 x.l=0.0 |
||||
|
+ domain num=2 material=2 x.h=0.0 |
||||
|
+ material num=1 silicon |
||||
|
+ mobility mat=1 concmod=ct fieldmod=ct |
||||
|
+ material num=2 polysilicon |
||||
|
+ mobility mat=2 concmod=ct fieldmod=ct |
||||
|
+ doping gauss n.type conc=3e20 x.l=-0.2 x.h=0.0 char.len=0.047 |
||||
|
+ doping gauss p.type conc=5e18 x.l=-0.2 x.h=0.0 char.len=0.100 |
||||
|
+ doping unif n.type conc=1e16 x.l=0.0 x.h=1.3 |
||||
|
+ doping gauss n.type conc=5e19 x.l=1.3 x.h=1.3 char.len=0.100 |
||||
|
+ models bgn srh auger conctau concmob fieldmob ^aval |
||||
|
+ method devtol=1e-12 ac=direct itlim=15 |
||||
|
+ output rootfile="PEBJT1--" Psi N.CONC P.conc |
||||
|
|
||||
|
.model M_NPSUB numd level=1 |
||||
|
+ title One-Dimensional Numerical Collector-Substrate Diode |
||||
|
+ options defa=10p |
||||
|
+ x.mesh loc=1.3 n=1 |
||||
|
+ x.mesh loc=2.0 n=101 |
||||
|
+ domain num=1 material=1 |
||||
|
+ material num=1 silicon |
||||
|
+ mobility mat=1 concmod=ct fieldmod=ct |
||||
|
+ doping gauss n.type conc=5e19 x.l=1.3 x.h=1.3 char.len=0.100 |
||||
|
+ doping unif p.type conc=1e15 x.l=0.0 x.h=2.0 |
||||
|
+ models bgn srh auger conctau concmob fieldmob ^aval |
||||
|
+ method devtol=1e-12 itlim=10 |
||||
|
|
||||
|
.model M_PNP nbjt level=1 |
||||
|
+ title One-Dimensional Numerical Bipolar |
||||
|
+ options base.depth=0.2 base.area=0.1 base.length=1.0 defa=10p |
||||
|
+ x.mesh loc=-0.2 n=1 |
||||
|
+ x.mesh loc=0.0 n=51 |
||||
|
+ x.mesh wid=0.20 h.e=0.0001 h.m=.004 r=1.2 |
||||
|
+ x.mesh wid=1.10 h.s=0.0001 h.m=.004 r=1.2 |
||||
|
+ domain num=1 material=1 x.l=0.0 |
||||
|
+ domain num=2 material=2 x.h=0.0 |
||||
|
+ material num=1 silicon |
||||
|
+ mobility mat=1 concmod=ct fieldmod=ct |
||||
|
+ material num=2 polysilicon |
||||
|
+ mobility mat=2 concmod=ct fieldmod=ct |
||||
|
+ doping gauss p.type conc=3e20 x.l=-0.2 x.h=0.0 char.len=0.047 |
||||
|
+ doping gauss n.type conc=5e17 x.l=-0.2 x.h=0.0 char.len=0.200 |
||||
|
+ doping unif p.type conc=1e16 x.l=0.0 x.h=1.3 |
||||
|
+ doping gauss p.type conc=5e19 x.l=1.3 x.h=1.3 char.len=0.100 |
||||
|
+ models bgn srh auger conctau concmob fieldmob ^aval |
||||
|
+ method devtol=1e-12 ac=direct itlim=15 |
||||
|
|
||||
|
.model M_PNSUB numd level=1 |
||||
|
+ title One-Dimensional Numerical Collector-Substrate Diode |
||||
|
+ options defa=10p |
||||
|
+ x.mesh loc=1.3 n=1 |
||||
|
+ x.mesh loc=2.0 n=101 |
||||
|
+ domain num=1 material=1 |
||||
|
+ material num=1 silicon |
||||
|
+ mobility mat=1 concmod=ct fieldmod=ct |
||||
|
+ doping gauss p.type conc=5e19 x.l=1.3 x.h=1.3 char.len=0.100 |
||||
|
+ doping unif n.type conc=1e15 x.l=0.0 x.h=2.0 |
||||
|
+ models bgn srh auger conctau concmob fieldmob ^aval |
||||
|
+ method devtol=1e-12 itlim=10 |
||||
@ -0,0 +1,18 @@ |
|||||
|
PZ Analysis of a Common Emitter Amplifier |
||||
|
|
||||
|
Vcc 1 0 5v |
||||
|
Vee 2 0 0v |
||||
|
|
||||
|
Vin 3 0 0.7838 AC 1 |
||||
|
RS 3 4 1K |
||||
|
Q1 5 4 2 M_NPN AREA=4 SAVE |
||||
|
RL 1 5 2.5k |
||||
|
CL 5 0 0.1pF |
||||
|
|
||||
|
.INCLUDE pebjt1.lib |
||||
|
|
||||
|
.PZ 3 0 5 0 vol pz |
||||
|
|
||||
|
.PRINT PZ ALL |
||||
|
.OP |
||||
|
.END |
||||
@ -0,0 +1,18 @@ |
|||||
|
|
||||
|
Run: |
||||
|
|
||||
|
ngspice -b pd1.cir |
||||
|
|
||||
|
This will generate the operating point file 'Pre-Pin-Diode-OP.0.d1', which |
||||
|
is read as the ic.file (initial condition file) for 'pindiode.cir'. |
||||
|
Note that if there is no output line in the .model section of 'pd1.cir', |
||||
|
the generated file will be named 'OP.0.d1'. In this case the ic.file value |
||||
|
in 'pindiode.cir' would need to be chenged to match it. |
||||
|
|
||||
|
Then: |
||||
|
|
||||
|
ngspice -b pindiode.cir |
||||
|
|
||||
|
can be run which will input 'Pre-Pin-Diode-OP.0.d1'. If you do not run |
||||
|
'pd1.cir' first, the 'pindiode.cir' simulation will run OK but tell you it |
||||
|
cannot find the iinitial condition file. |
||||
@ -0,0 +1,44 @@ |
|||||
|
PRE-PIN-DIODE TWO-DIMENSIONAL PIN-DIODE CIRCUIT |
||||
|
|
||||
|
VIN 1 0 0.0v (PWL 0ns 0.8v 1ns -50.0v) |
||||
|
L1 1 2 0.5uH |
||||
|
VD 2 3 0.0v |
||||
|
D1 3 0 M_PIN AREA=200 save |
||||
|
VRC 2 4 0.0v |
||||
|
R1 4 5 100 |
||||
|
C1 5 0 1.0nF |
||||
|
|
||||
|
.MODEL M_PIN NUMD LEVEL=2 |
||||
|
+ options defw=1000u |
||||
|
+ x.mesh n=1 l=0.0 |
||||
|
+ x.mesh n=2 l=0.2 |
||||
|
+ x.mesh n=4 l=0.4 |
||||
|
+ x.mesh n=8 l=0.6 |
||||
|
+ x.mesh n=13 l=1.0 |
||||
|
+ |
||||
|
+ y.mesh n=1 l=0.0 |
||||
|
+ y.mesh n=9 l=4.0 |
||||
|
+ y.mesh n=24 l=10.0 |
||||
|
+ y.mesh n=29 l=15.0 |
||||
|
+ y.mesh n=34 l=20.0 |
||||
|
+ |
||||
|
+ domain num=1 material=1 |
||||
|
+ material num=1 silicon tn=20ns tp=20ns |
||||
|
+ |
||||
|
+ electrode num=1 x.l=0.6 x.h=1.0 y.h=0.0 |
||||
|
+ electrode num=2 y.l=20.0 |
||||
|
+ |
||||
|
+ doping gauss p.type conc=1.0e20 char.len=1.076 x.l=0.75 x.h=1.1 y.h=0.0 |
||||
|
+ + lat.rotate ratio=0.1 |
||||
|
+ doping unif n.type conc=1.0e14 |
||||
|
+ doping gauss n.type conc=1.0e20 char.len=1.614 x.l=-0.1 x.h=1.1 y.l=20.0 |
||||
|
+ |
||||
|
+ models bgn srh auger conctau concmob fieldmob |
||||
|
+ output rootfile="Pre-Pin-Diode-" |
||||
|
|
||||
|
.OPTION ACCT BYPASS=1 |
||||
|
* .TRAN 1NS 100NS |
||||
|
* .PRINT TRAN v(3) I(VIN) |
||||
|
.op |
||||
|
|
||||
|
.END |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue