HSpice Tutorial #1

Transfer Function of a CMOS Inverter


Notice: The first line in the .sp file must be a comment line or be left blank.

 

SPICE file: "inv_01.sp"

* inv_01.sp

.lib 'hspice.lib' tt
.PARAM
.OPTION POST
.GLOBAL gnd! vdd!

.SUBCKT inv vi vo
MM1 vo vi gnd! gnd! Nch W=220.00n L=180.00n
MM0 vo vi vdd! vdd! Pch W=420.00n L=180.00n
.ENDS

XINV A Y INV
C0 Y gnd! 2E-15F

Vvdd vdd! 0 1.8v
Vgnd gnd! 0 0v

VIN A 0

.DC VIN 0 1.8 0.01

.END

 

Use CosmosScope to open the ".sw0" file and then display the waveform of v(y).
Result:


SPICE file: "inv_02.sp"

* inv_02.sp

.lib 'hspice.lib' tt
.PARAM
.OPTION POST
.GLOBAL gnd! vdd!

.SUBCKT inv vi vo
MM1 vo vi gnd! gnd! Nch W=220.00n L=180.00n
MM0 vo vi vdd! vdd! Pch W=8000.00n L=180.00n
.ENDS

XINV A Y INV
C0 Y gnd! 2E-15F

Vvdd vdd! 0 1.8v
Vgnd gnd! 0 0v

VIN A 0

.DC VIN 0 1.8 0.01

.END

 

Use CosmosScope to open the ".sw0" file and then display the waveform of v(y).
Result:

 

SPICE file: "inv_03.sp"

* inv_03.sp

.lib 'hspice.lib' tt
.PARAM
.OPTION POST
.GLOBAL gnd! vdd!

.SUBCKT inv vi vo
MM1 vo vi gnd! gnd! Nch W=220.00n L=180.00n
MM0 vo vi vdd! vdd! Pch
W=220.00n L=180.00n
.ENDS

XINV A Y INV
C0 Y gnd! 2E-15F

Vvdd vdd! 0 1.8v
Vgnd gnd! 0 0v

VIN A 0

.DC VIN 0 1.8 0.01

.END

 

Use CosmosScope to open the ".sw0" file and then display the waveform of v(y).
Result:

 


last update: October 22, 2009