|
From: steven.borley <ste...@vi...> - 2005-03-12 17:32:50
|
I am confused over why the following simple circuit, that aims to show
a MOSFET's characteristics, is failing to work as I expected.
I hope someone can either point out what I'm doing wrong, or confirm it
as a bug in ngspice.
MOS OUTPUT CHARACTERISTICS - Example circuit 1
Vds 1 0 dc 10
Vgs 2 0 dc 5
M1 1 2 0 0 MOD1 L=4U W=6U AD=10P AS=10P
.MODEL MOD1 NMOS level=1 VTO=-2 NSUB=1.0E15 UO=550
.end
I run this as follows...
[mirror-doors:~/spice] steven% ngspice circuit1.cir
******
** ngspice-15 : Circuit level simulation program
** The U. C. Berkeley CAD Group
** Copyright 1985-1994, Regents of the University of California.
** Please submit bug-reports to: ngs...@li...
** Creation Date: Sat Mar 12 01:57:16 GMT 2005
******
Circuit: MOS OUTPUT CHARACTERISTICS - Example circuit 1
ngspice 119 -> listing
MOS OUTPUT CHARACTERISTICS - Example circuit 1
1 : mos output characteristics - example circuit 1
2 : vds 1 0 dc 10
3 : vgs 2 0 dc 5
4 : m1 1 2 0 0 mod1 l=4u w=6u ad=10p as=10p
5 : .model mod1 nmos level=1 vto=-2 nsub=1.0e15 uo=550
7 : .end
ngspice 120 -> dc vds 0 10 0.5 vgs 0 5 1
Doing analysis at TEMP = 300.150000 and TNOM = 300.150000
No. of Data Rows : 126
ngspice 121 -> plot -i(vds)
ngspice 122 -> show
Mos1: Level 1 MOSfet model with Meyer capacitance model
device m1
model mod1
id 1e-11
is 0
ig 0
ib -1e-11
vgs 0
vds 0
vbs 0
von 0
vdsat 0
rs 0
rd 0
gm 0
gds 0
gmb 0
cbd 0
cbs 0
cgs 0
cgd 0
cgb 0
cbd0 0
cbdsw0 0
cbs0 0
cbssw0 0
Vsource: Independent voltage source
device vgs vds
dc 5 10
acmag 0 0
i 0 0
p -0 -0
ngspice 123 ->
I expect to get the classic MOSFET characteristics, but all I get is a
straight line, and gm is zero.
Now, if instead I place a .DC line the circuit file and repeat then I
get this...
[mirror-doors:~/spice/tested] steven% ngspice circuit2.cir
******
** ngspice-15 : Circuit level simulation program
** The U. C. Berkeley CAD Group
** Copyright 1985-1994, Regents of the University of California.
** Please submit bug-reports to: ngs...@li...
** Creation Date: Sat Mar 12 01:57:16 GMT 2005
******
Circuit: MOS OUTPUT CHARACTERISTICS - Example circuit 2
ngspice 132 -> listing
MOS OUTPUT CHARACTERISTICS - Example circuit 2
1 : mos output characteristics - example circuit 2
2 : vds 1 0 dc 10
3 : vgs 2 0 dc 5
4 : m1 1 2 0 0 mod1 l=4u w=6u ad=10p as=10p
5 : .model mod1 nmos level=1 vto=-2 nsub=1.0e15 uo=550
6 : .dc vds 0 10 0.5 vgs 0 5 1
8 : .end
ngspice 133 -> run
Doing analysis at TEMP = 300.150000 and TNOM = 300.150000
No. of Data Rows : 126
ngspice 134 -> plot -i(vds)
ngspice 135 -> show
Mos1: Level 1 MOSfet model with Meyer capacitance model
device m1
model mod1
id 0.000735
is -0.000735
ig 0
ib -1.001e-11
vgs 5
vds 10
vbs 0
von -2
vdsat 7
rs 0
rd 0
gm 0.00021
gds 0
gmb 0
cbd 0
cbs 0
cgs 0
cgd 0
cgb 0
cbd0 0
cbdsw0 0
cbs0 0
cbssw0 0
Vsource: Independent voltage source
device vgs vds
dc 5 10
acmag 0 0
i 0 -0.000735
p -0 0.00735
ngspice 136 ->
And now I get the expected characteristic, and gm is non zero
Why is .DC different to DC interactively?
I am using ngspice from CVS (taken yesterday). It's on MacOSX, but I
don't see why this should make a difference.
Regards,
Steven
|