Professional Documents
Culture Documents
Assignment:2
Submitted by
I.C.S.Tejaswi
20605
Plot Vd-Id ,Vgs-Id graphs of mosfets.
Calculate Ion, Ioff, Ron, Roff, Cgs, Cgd as well
1.Mos1s
Code:
id vd
Vgs 1 0 5
M1 2 1 0 0 m1
.model m1 NMOS(level= 1 phi=0.8)
Rd 3 4 1k
Vdummy 3 2 dc 0
Vds 4 0 3
.dc Vds 0 10 0.5 Vgs 0 5 0.5
.control
run
let Id = (-Vds#branch)
let Vdd = 5.0
let PHI= 0.8
meas dc If FIND I(Vds) at=0.8
meas dc Io FIND I(Vds) at=4.9
Let Ioff= -If
Let Ion = -Io
let Ron = (4.9/Ion)
let Roff = (0.8/Ioff)
plot Id
print line Ion Ioff Ron Roff Vdd PHI > mos1output1.txt
.endc
.end
Above code will store the Ion and Ron in output file mos1output1.txt which are in saturation region
By changing Vgs to 0 and stop varying vgs will store Ioff and Roff in output file mos1output2.txt which
are of cut off region.
Plot: VdS-Id
Code:
id vd
Vgs 1 0 5
M1 2 1 0 0 m1
.model m1 NMOS(level= 1 phi=0.5)
Rd 3 4 1k
Vdummy 3 2 0
Vds 4 0 2
.dc vgs 0 5 0.5
.control
run
plot Vdummy#branch
.endc
.end
Plot: Vgs-Id
ioff = 8.833270e-13 ion=2.5e-4
2.BSIM1
Code:
Bsim1 id vd
Vgs 1 0 5
M1 2 1 0 0 m1
.model m1 NMOS level=4
Rd 3 4 1k
Vdummy 3 2 0
Vds 4 0 2
.dc Vds -15 5 0.5 Vgs 0 5 0.5
.control
run
let Id = (-Vds#branch)
let Vdd = 5.0
let PHI= 0.8
meas dc If FIND I(Vds) at=0.8
meas dc Io FIND I(Vds) at=4.9
Let Ioff= -If
Let Ion = -Io
let Ron = (4.9/Ion)
let Roff = (0.8/Ioff)
plot Id
print line Ion Ioff Ron Roff Vdd PHI > mos1output1.txt
.endc
.end
Above code will store the Ion and Ron in output file mos1output1.txt which are in saturation region
By changing Vgs to 0 and stop varying vgs will store Ioff and Roff in output file mos1output2.txt which
are of cut off region.
Plot: Vds-Id
Code:
id vgs
Vgs 1 0 5
M1 2 1 0 0 m1
.model m1 NMOS level=4
Rd 3 4 1k
Vdummy 3 2 0
Vds 4 0 2
.dc Vgs -15 5 0.5
.control
run
plot -Vds#branch
.endc
.end
Plot: Vgs-Id
3.Bsim2
Code:
Bsim 2id vd
Vgs 1 0 5
M1 2 1 0 0 m1
.model m1 NMOS level=5
Rd 3 4 1k
Vdummy 3 2 0
Vds 4 0 2
.dc Vds 0 5 0.01 Vgs 0 5 0.5
.control
run
let Id = (-Vds#branch)
let Vdd = 5.0
let PHI= 0.8
meas dc If FIND I(Vds) at=0.8
meas dc Io FIND I(Vds) at=4.9
Let Ioff= -If
Let Ion = -Io
let Ron = (4.9/Ion)
let Roff = (0.8/Ioff)
plot Id
print line Ion Ioff Ron Roff Vdd PHI > mos1output1.txt
.endc
.end
Above code will store the Ion and Ron in output file mos1output1.txt which are in saturation region
By changing Vgs to 0 and stop varying vgs will store Ioff and Roff in output file mos1output2.txt which
are of cut off region.
Plot: Vds-id
Code:
id vgs
Vgs 1 0 5
M1 2 1 0 0 m1
.model m1 NMOS level=5
Rd 3 4 1k
Vdummy 3 2 0
Vds 4 0 2
.dc Vgs 0 5 0.5
.control
run
plot Vdummy#branch
.endc
.end
Plot: Vgs-Id
4.Bsim3
Code:
id vd
Vgs 1 0 5
M1 2 1 0 0 m1
.model m1 NMOS level=49 version=3.3.0
Rd 3 4 1k
Vdummy 3 2 0
Vds 4 0 2
.dc Vds 0 5 0.5 Vgs 0 5 0.5
.control
run
let Id = (-Vds#branch)
let Vdd = 5.0
let PHI= 0.8
meas dc If FIND I(Vds) at=0.8
meas dc Io FIND I(Vds) at=4.9
Let Ioff= -If
Let Ion = -Io
let Ron = (4.9/Ion)
let Roff = (0.8/Ioff)
plot Id
print line Ion Ioff Ron Roff Vdd PHI > mos1output1.txt
.endc
.end
Above code will store the Ion and Ron in output file mos1output1.txt which are in saturation region
By changing Vgs to 0 and stop varying vgs will store Ioff and Roff in output file mos1output2.txt which
are of cut off region.
Plot: Vds-Id
Code:
id vgs
Vgs 1 0 5
M1 2 1 0 0 m1
.model m1 NMOS level=49 version=3.3.0
Rd 3 4 1k
Vdummy 3 2 0
Vds 4 0 2
.dc Vgs 0 5 0.1
.control
run
plot Vdummy#branch
meas dc ic find Vdummy#branch at=1.8
.endc
.end
Plot: Vgs-Id
Cgs=4.4e-14 Cgd=1.1e-18
5.Bsim4
Code:
Bsim4 id vd
Vgs 1 0 5
M1 2 1 0 0 m1
.model m1 NMOS level=54 version=4.6.5
Rd 3 4 1k
Vdummy 3 2 0
Vds 4 0 2
.dc Vds 0 15 0.5 Vgs 0 5 0.5
.control
run
let Id = (-Vds#branch)
let Vdd = 5.0
let PHI= 0.19
meas dc If FIND I(Vds) at=0.19
meas dc Io FIND I(Vds) at=4.9
Let Ioff= -If
Let Ion = -Io
let Ron = (4.9/Ion)
let Roff = (0.19/Ioff)
plot Id
print line Ion Ioff Ron Roff Vdd PHI > mos1output1.txt
.endc
.end
Above code will store the Ion and Ron in output file mos1output1.txt which are in saturation region
By changing Vgs to 0 and stop varying vgs will store Ioff and Roff in output file mos1output2.txt which
are of cut off region.
Plot: Vds-Id
Code:
id vgs
Vgs 1 0 5
M1 2 1 0 0 m1
.model m1 NMOS level=54 version=4.6.5
Rd 3 4 1k
Vdummy 3 2 0
Vds 4 0 2
.dc Vgs 0 5 0.5
.control
run
plot Vdummy#branch
.endc
.end
Plot: Vgs-Id
6.Mos9
Code:
Mos9 id vd
Vgs 1 5
M1 2 1 0 0 m1
.model m1 NMOS level=9
Rd 3 4 1k
Vdummy 3 2 0
Vds 4 0 2
.dc Vds 0 15 0.5 Vgs 0 5 0.5
.control
run
let Id = (-Vds#branch)
let Vdd = 5.0
let PHI= 0.8
meas dc If FIND I(Vds) at=0.8
meas dc Io FIND I(Vds) at=4.9
Let Ioff= -If
Let Ion = -Io
let Ron = (4.9/Ion)
let Roff = (0.8/Ioff)
plot Id
print line Ion Ioff Ron Roff Vdd PHI > mos1output1.txt
.endc
.end
Above code will store the Ion and Ron in output file mos1output1.txt which are in saturation region
By changing Vgs to 0 and stop varying vgs will store Ioff and Roff in output file mos1output2.txt which
are of cut off region.
Plot: Vds-Id
Code:
id vgs
Vgs 1 0 5
M1 2 1 0 0 m1
.model m1 NMOS level=9
Rd 3 4 1k
Vdummy 3 2 0
Vds 4 0 2
.dc Vgs 0 5 0.5
.control
run
plot Vdummy#branch
.endc
.end
Plot: Vgs-Id
THE END