*invr.in
*An inverter with a resistive load
* Transistor measurements
.param lg = 0.25u   ; default gate length
.param ld = 0.75u ; default drain diffusion length
.param ls = 0.75u ; default source diffusion length

.param wn=2um

* Calculated MOS model parameters
.func as(w, ls) ls*w
.func ad(w, ld) ld*w
.func ps(w, ls) 2*ls+w
.func pd(w, ld) 2*ld+w

.model MYNMOS nmos(level=2 tox=50e-10 vto=.4 kp=100e-6 gamma=0.57 cgbo=200p 
+ cgso=600p cgdo=600p cj=200u cjsw=400p mj=0.5 mjsw=0.3 pb=0.7)

vin 1 0 dc 0

*  D G S B (D=drain, G=gate, S=source, B=body of MOSFETs)   
m1 2 1 0 0 MYNMOS w=wn l=lg as="as(w, ls)" ad="ad(w, ld)" 
+ ps="ps(w, ls)" pd="pd(w, ld)" 
rLoad 3 2 300K
vdd 3 0 3.0


* DC Analysis
.dc vin 0     3.0     0.01
*       |      |       |
*     start   stop   increament

.probe
.end