Ngspice - DC Analysis of CMOS inverter

DC analysis neglect the time varying behavior and gives the output over a range of DC levels for the input sources.

Find the ngspice code below for the DC analysis of CMOS inverter.
Please include technology file in the working folder bfeore running the code.

*DC Analysis of CMOS Inverter Date: 29/7/2020


.param supply = 1.2V
.param length = 130n
.param wpmos=2500n wnmos=1000n

vsupply vdd 0 {supply}
vgnd vss 0 0V

  • Inputs to transistors

vin vgs vss dc 0

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

Cload vout vss1 200f
vdc0 vss1 vss dc 0V

.dc vin 0 1.2 0.1
*.tran 0.1n 500n 0 0.1n.
.save all @vsupply[p]

plot v(vgs) v(vout)
.End (7.2 KB)