Ngspice - Transient Analysis of CMOS inverter

Below is the code of transient analysis of CMOS inverter using ngspice with 130nm technology. Transient analysis time varying behavior of the system. Please add technology file - “techfile130.pm”, given in last, in the working folder before running the code.

*Transient Analysis of CMOS Inverter

.include techfile130.pm ; 

.param supply = 1.2V **Supply Voltage
.param length = 130n **Length
.param wpmos=2500n wnmos=1000n **width of pmos and nmos

vsupply vdd 0 {supply}
vgnd vss 0 0V

* Inputs to transistors
vin va vss PULSE(0 {supply} 2NS 2NS 2NS 50NS 100NS)

******************MOSFETs drain gate source body
Mpa vout va vdd vdd pmos l={length} w={wpmos} ; pmos 
Mna vout va vss vss nmos l={length} w={wnmos} ; nmos

Cload vout vss1 200f
vdc0 vss1 vss dc 0V

.tran 0.1n 500n 0 0.1n. 
.save all @vsupply[p]

.control
    run 
 	plot v(va) v(vout)
.endc
.End

techfile130.pm (7.2 KB)