Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Hspice Tutorial

Steps
1. Initialization
Library
Operating conditions
Temperature
Process
Functions (.ic, .mnlvl)

2. Circuit netlist
Naming of netlist

3. Simulation
Simulation file
Probes

1st line - Whatever there is in the first line, automatically becomes the file title.
2nd-nth line - Library

.lib '(location of the file)' TT

.op

“*****” every asterisk line or “//” = comment

0.18um CMOS Process

Hspice Tutorial 1
V = 1.8V/3.3V

lower and upper-case is read by hspice the same


micro = u
mili = m
dec = d
kilo = k
mega = x
giga = g

*****circuit code
vxxx n_a n_b <dc_val> <ac_val>
rxxx n_a n_b <value of the resistor>
cxxx n_a n_b <value of the capacitor>
mxxx drain gate source bulk <nch or pch> l=<#> w=<#> m=1,2,3…
.dc vxxx <v_min_tosweep> <v_max_tosweep> <spacing> ————→ .sw0
(sweep) for q point
.ac dec <scale> <step_size> <max_sweep_freq>

.probe v(<output node name>)


.end

for voltage set y to db20

for power set y to dB


set x to logarithmic (to avoid Vo being skewed)

if you want to do transient analysis, comment out your current vin and create a
new vin

Hspice Tutorial 2
vxxx node_1 node_2 sin(<dc_level> <amplitude> <frequency>)
.trans 1u 1

Hspice Tutorial 3

You might also like