* NMOS Model 180nm
.INCLUDE "MOSlib.lib" ;includes 180nm NMOS (NMOS180) and very basic NMOS mod
*********Analysis Commands**************
.DC Vg1 5 -5 0.1
.print DC FILE=foobar.txt PRECISION=11 WIDTH=7 V(3) V(5) I(Rs1) I(Rs2) I(Rs3)
****************************************
*Power Source
Vd 1 0 1.8VId 1 6 0.5u
*NMOS device M<name> <drain node> <gate node> <source node> + <bulk/substrate node> <model name>
M1 2 3 4 0 NMOS180 W=0.5u L=0.18u ;
M2 2 5 7 0 NMOS180 W=0.5u L=0.18u ;
* resistor for current sensing
Rs1 6 2 0Rs2 4 0 0Rs3 7 0 0
* NMOS Model 180nm
.INCLUDE "MOSlib.lib" ;includes 180nm NMOS (NMOS180) and very basic NMOS mod
*********Analysis Commands**************
.DC Vg1 0 5 0.1 Vg2 5 0 0.1
.print DC format=csv file=foobar.txt PRECISION=11 WIDTH=7 V(3) V(5) ;I(Rs1) I(Rs2) I(Rs3)
*From this analysis we conclude that current flows from drain to source at a Vds of about -0.86V to .05V
****************************************
*Power Source
Vd 1 0 1.8VId 1 6 0.5u
*NMOS device M<name> <drain node> <gate node> <source node> + <bulk/substrate node> <model name>
M1 2 3 4 0 NMOS180 W=0.5u L=0.18u ;
M2 2 5 7 0 NMOS180 W=0.5u L=0.18u ;
* resistor for current sensing
Rs1 6 2 0Rs2 4 0 0Rs3 7 0 0
*Gate voltage
Vg1 3 0 0VVg2 5 0 0V
.END
.DC Vg1 5 -5 0.1