examples/adms/bsimbulk, adapt to ngspice syntax
This commit is contained in:
parent
97ecd7fce9
commit
044eee5636
|
|
@ -3,7 +3,7 @@
|
||||||
.option post ingold numdgt=10
|
.option post ingold numdgt=10
|
||||||
.temp 27
|
.temp 27
|
||||||
|
|
||||||
.hdl "bsimbulk.va"
|
*.hdl "bsimbulk.va"
|
||||||
.include "model.l"
|
.include "model.l"
|
||||||
|
|
||||||
vd d 0 dc=0
|
vd d 0 dc=0
|
||||||
|
|
@ -11,7 +11,7 @@ vg g 0 dc=1.0
|
||||||
es s 0 d 0 -1
|
es s 0 d 0 -1
|
||||||
vb b 0 dc=0
|
vb b 0 dc=0
|
||||||
|
|
||||||
x1 d g s b nch W=10u L=10u
|
m1 d g s b nch W=10u L=10u
|
||||||
|
|
||||||
.dc vd -0.1 0.1 0.001 vg 0.0 1.0 0.2
|
.dc vd -0.1 0.1 0.001 vg 0.0 1.0 0.2
|
||||||
.probe dc ids=par'-i(vd)'
|
.probe dc ids=par'-i(vd)'
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
.option post ingold numdgt=10
|
.option post ingold numdgt=10
|
||||||
.temp 27
|
.temp 27
|
||||||
|
|
||||||
.hdl "bsimbulk.va"
|
*.hdl "bsimbulk.va"
|
||||||
.include "model.l"
|
.include "model.l"
|
||||||
|
|
||||||
vd d 0 dc=0
|
vd d 0 dc=0
|
||||||
|
|
@ -11,13 +11,18 @@ vg g 0 dc=-0.5
|
||||||
es s 0 d 0 -1
|
es s 0 d 0 -1
|
||||||
vb b 0 dc=0
|
vb b 0 dc=0
|
||||||
|
|
||||||
x1 d g s b pch W=10e-6 L=10e-6
|
m1 d g s b pch W=10e-6 L=10e-6
|
||||||
|
|
||||||
.dc vd -0.1 0.1 0.001 vg -1 -0.4 -0.3
|
.dc vd -0.1 0.1 0.001 vg -1 -0.4 0.3
|
||||||
.probe dc ids=par'-i(vd)'
|
*.probe dc ids=par'-i(vd)'
|
||||||
.probe dc gx=deriv(ids)
|
*.probe dc gx=deriv(ids)
|
||||||
.probe dc gx2=deriv(gx)
|
*.probe dc gx2=deriv(gx)
|
||||||
.probe dc gx3=deriv(gx2)
|
*.probe dc gx3=deriv(gx2)
|
||||||
.print dc par'ids' par'gx' par'gx2' par'gx3'
|
*.print dc par'ids' par'gx' par'gx2' par'gx3'
|
||||||
|
|
||||||
|
.control
|
||||||
|
run
|
||||||
|
plot i(es)
|
||||||
|
.endc
|
||||||
|
|
||||||
.end
|
.end
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
.option post ingold numdgt=10
|
.option post ingold numdgt=10
|
||||||
.temp 27
|
.temp 27
|
||||||
|
|
||||||
.hdl "bsimbulk.va"
|
*.hdl "bsimbulk.va"
|
||||||
.include "model.l"
|
.include "model.l"
|
||||||
|
|
||||||
vd d 0 dc=1.3
|
vd d 0 dc=1.3
|
||||||
|
|
@ -11,11 +11,13 @@ vg g 0 dc=0
|
||||||
vs s 0 dc=0
|
vs s 0 dc=0
|
||||||
vb b 0 dc=0
|
vb b 0 dc=0
|
||||||
|
|
||||||
x1 d g s b nch W=10e-6 L=10e-6
|
m1 d g s b nch W=10e-6 L=10e-6
|
||||||
|
|
||||||
.dc vd 0.0 1.3 0.01 vg 0.4 1 0.3
|
.dc vd 0.0 1.3 0.01 vg 0.4 1 0.3
|
||||||
.probe dc ids=par'-i(vd)'
|
|
||||||
.probe dc gds=deriv(ids)
|
.control
|
||||||
.print dc par'ids' par'gds'
|
run
|
||||||
|
plot i(vs)
|
||||||
|
.endc
|
||||||
|
|
||||||
.end
|
.end
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
.option post ingold numdgt=10
|
.option post ingold numdgt=10
|
||||||
.temp 27
|
.temp 27
|
||||||
|
|
||||||
.hdl "bsimbulk.va"
|
*.hdl "bsimbulk.va"
|
||||||
.include "model.l"
|
.include "model.l"
|
||||||
|
|
||||||
vd d 0 dc=-1
|
vd d 0 dc=-1
|
||||||
|
|
@ -11,11 +11,13 @@ vg g 0 dc=0
|
||||||
vs s 0 dc=0
|
vs s 0 dc=0
|
||||||
vb b 0 dc=0
|
vb b 0 dc=0
|
||||||
|
|
||||||
x1 d g s b pch W=10e-6 L=10e-6
|
m1 d g s b pch W=10e-6 L=10e-6
|
||||||
|
|
||||||
.dc vd -1.3 0.0 0.01 vg -1 -0.4 -0.3
|
.dc vd -1.3 0.0 0.01 vg -1 -0.4 0.3
|
||||||
.probe dc ids=par'i(vd)'
|
|
||||||
.probe dc gds=deriv(ids)
|
.control
|
||||||
.print dc par'ids' par'gds'
|
run
|
||||||
|
plot i(vs)
|
||||||
|
.endc
|
||||||
|
|
||||||
.end
|
.end
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
.option post ingold numdgt=10
|
.option post ingold numdgt=10
|
||||||
.temp 27
|
.temp 27
|
||||||
|
|
||||||
.hdl "bsimbulk.va"
|
*.hdl "bsimbulk.va"
|
||||||
.include "model.l"
|
.include "model.l"
|
||||||
|
|
||||||
vd d 0 dc=0.05
|
vd d 0 dc=0.05
|
||||||
|
|
@ -11,12 +11,18 @@ vg g 0 dc=0
|
||||||
vs s 0 dc=0
|
vs s 0 dc=0
|
||||||
vb b 0 dc=0
|
vb b 0 dc=0
|
||||||
|
|
||||||
x1 d g s b nch W=10e-6 L=10e-6
|
m1 d g s b nch W=10e-6 L=10e-6
|
||||||
|
|
||||||
.dc vg -1.3 1.3 0.01 vb -0.3 0 0.1
|
.dc vg -1.3 1.3 0.01 vb -0.3 0 0.1
|
||||||
.probe dc ids=par'-i(vd)'
|
*.probe dc ids=par'-i(vd)'
|
||||||
.probe dc gm=deriv(ids)
|
*.probe dc gm=deriv(ids)
|
||||||
.probe dc gm2=deriv(gm)
|
*.probe dc gm2=deriv(gm)
|
||||||
.print dc par'ids' par'gm' par'gm2'
|
*.print dc par'ids' par'gm' par'gm2'
|
||||||
|
|
||||||
|
|
||||||
|
.control
|
||||||
|
run
|
||||||
|
plot i(vs)
|
||||||
|
.endc
|
||||||
|
|
||||||
.end
|
.end
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
.option post ingold numdgt=10
|
.option post ingold numdgt=10
|
||||||
.temp 27
|
.temp 27
|
||||||
|
|
||||||
.hdl "bsimbulk.va"
|
*.hdl "bsimbulk.va"
|
||||||
.include "model.l"
|
.include "model.l"
|
||||||
|
|
||||||
vd d 0 dc=-0.05
|
vd d 0 dc=-0.05
|
||||||
|
|
@ -11,12 +11,18 @@ vg g 0 dc=0
|
||||||
vs s 0 dc=0
|
vs s 0 dc=0
|
||||||
vb b 0 dc=0
|
vb b 0 dc=0
|
||||||
|
|
||||||
x1 d g s b pch W=10e-6 L=10e-6
|
m1 d g s b pch W=10e-6 L=10e-6
|
||||||
|
|
||||||
.dc vg -1.3.0 1.3 0.01 vb 0 -0.3 -0.1
|
.dc vg -1.3.0 1.3 0.01 vb 0 -0.3 -0.1
|
||||||
.probe dc ids=par'i(vd)'
|
*.probe dc ids=par'i(vd)'
|
||||||
.probe dc gm=deriv(ids)
|
*.probe dc gm=deriv(ids)
|
||||||
.probe dc gm2=deriv(gm)
|
*.probe dc gm2=deriv(gm)
|
||||||
.print dc par'ids' par'gm' par'gm2'
|
*.print dc par'ids' par'gm' par'gm2'
|
||||||
|
|
||||||
|
|
||||||
|
.control
|
||||||
|
run
|
||||||
|
plot i(vs)
|
||||||
|
.endc
|
||||||
|
|
||||||
.end
|
.end
|
||||||
|
|
|
||||||
|
|
@ -3,20 +3,24 @@
|
||||||
.option post ingold numdgt=10
|
.option post ingold numdgt=10
|
||||||
.temp 27
|
.temp 27
|
||||||
|
|
||||||
.hdl "bsimbulk.va"
|
*.hdl "bsimbulk.va"
|
||||||
.include "model.l"
|
.include "model.l"
|
||||||
|
|
||||||
v1 vdd 0 dc=1.0
|
v1 vdd 0 dc=1.0
|
||||||
v2 in 0 dc=0.5
|
v2 in 0 dc=0.5
|
||||||
|
|
||||||
.subckt inv vin vout vdd vss
|
.subckt inv vin vout vdd vss
|
||||||
xn vout vin vss vss nch W=10u L=10u
|
mn vout vin vss vss nch W=10u L=10u
|
||||||
xp vout vin vdd vdd pch W=10u L=10u
|
mp vout vin vdd vdd pch W=10u L=10u
|
||||||
.ends
|
.ends
|
||||||
|
|
||||||
x1 in out vdd 0 inv
|
x1 in out vdd 0 inv
|
||||||
|
|
||||||
.dc v2 0 1 0.01
|
.dc v2 0 1 0.01
|
||||||
.print dc v(in) v(out)
|
|
||||||
|
.control
|
||||||
|
run
|
||||||
|
plot v(in) v(out)
|
||||||
|
.endc
|
||||||
|
|
||||||
.end
|
.end
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ v1 vdd 0 dc=1.0
|
||||||
v2 in 0 dc=0.5 sin(0.5 0.5 1meg)
|
v2 in 0 dc=0.5 sin(0.5 0.5 1meg)
|
||||||
|
|
||||||
.subckt inv vin vout vdd vss
|
.subckt inv vin vout vdd vss
|
||||||
xn vout vin vss vss nch W=10u L=10u
|
mn vout vin vss vss nch W=10u L=10u
|
||||||
xp vout vin vdd vdd pch W=10u L=10u
|
mp vout vin vdd vdd pch W=10u L=10u
|
||||||
.ends
|
.ends
|
||||||
|
|
||||||
x1 in 1 vdd 0 inv
|
x1 in 1 vdd 0 inv
|
||||||
|
|
@ -21,6 +21,10 @@ x4 3 4 vdd 0 inv
|
||||||
x5 4 out vdd 0 inv
|
x5 4 out vdd 0 inv
|
||||||
|
|
||||||
.tran 10n 5u
|
.tran 10n 5u
|
||||||
.print tran v(in) v(out)
|
|
||||||
|
.control
|
||||||
|
run
|
||||||
|
plot v(in) v(out)
|
||||||
|
.endc
|
||||||
|
|
||||||
.end
|
.end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
.model nch bsimbulk
|
.model nch NMOS
|
||||||
|
+level=77
|
||||||
+TYPE = 1
|
+TYPE = 1
|
||||||
+GEOMOD = 0
|
+GEOMOD = 0
|
||||||
+RGEOMOD = 0
|
+RGEOMOD = 0
|
||||||
|
|
@ -210,7 +211,8 @@
|
||||||
+SCC = 0
|
+SCC = 0
|
||||||
+SC = 0
|
+SC = 0
|
||||||
|
|
||||||
.model pch bsimbulk
|
.model pch PMOS
|
||||||
|
+level=77
|
||||||
+TYPE = -1
|
+TYPE = -1
|
||||||
+GEOMOD = 0
|
+GEOMOD = 0
|
||||||
+RGEOMOD = 0
|
+RGEOMOD = 0
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
* Sample netlist: 17-stage ring oscillator *
|
* Sample netlist: 17-stage ring oscillator *
|
||||||
|
|
||||||
.options post ingold numdgt=10 dcon=1
|
.options abstol=1e-6 reltol=1e-6
|
||||||
|
|
||||||
.hdl "bsimbulk.va"
|
*.hdl "bsimbulk.va"
|
||||||
.include "model.l"
|
.include "model.l"
|
||||||
|
|
||||||
v1 vdd 0 dc=1.0
|
v1 vdd 0 dc=1.0
|
||||||
|
|
||||||
.subckt inv vin vout vdd vss
|
.subckt inv vin vout vdd vss
|
||||||
xn vout vin vss vss nch W=10e-6 L=10e-6
|
mn vout vin vss vss nch W=10e-6 L=10e-6
|
||||||
xp vout vin vdd vdd pch W=10e-6 L=10e-6
|
mp vout vin vdd vdd pch W=10e-6 L=10e-6
|
||||||
.ends
|
.ends
|
||||||
|
|
||||||
x1 1 2 vdd 0 inv
|
x1 1 2 vdd 0 inv
|
||||||
|
|
@ -30,13 +30,18 @@ x15 15 16 vdd 0 inv
|
||||||
x16 16 17 vdd 0 inv
|
x16 16 17 vdd 0 inv
|
||||||
x17 17 1 vdd 0 inv
|
x17 17 1 vdd 0 inv
|
||||||
|
|
||||||
.ic 1=1
|
*.ic 1=1
|
||||||
|
|
||||||
.tran 1n 10u
|
.tran 1n 10u
|
||||||
.print tran v(1)
|
.print tran v(1)
|
||||||
.measure tran t1 when v(1)=0.5 cross=1
|
.measure tran t1 when v(1)=0.5 cross=1
|
||||||
.measure tran t2 when v(1)=0.5 cross=7
|
.measure tran t2 when v(1)=0.5 cross=7
|
||||||
.measure tran period param'(t2-t1)/3'
|
*.measure tran period param'(t2-t1)/3'
|
||||||
.measure tran delay_per_stage param'period/34'
|
*.measure tran delay_per_stage param'period/34'
|
||||||
|
|
||||||
|
.control
|
||||||
|
run
|
||||||
|
plot v(1)
|
||||||
|
.endc
|
||||||
|
|
||||||
.end
|
.end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue