EE133 HSPICE HANDOUT Jan 08 2004 Some useful links 1 http www stanford edu class ee133 handouts general vnc pdf How to set up and run VNC 1 http www stanford edu class ee133 handouts general hspice tut pdf Detailed tutorial about HSPICE Mwaves 2 http www stanford edu class ee133 spice HSpice pdf How to set up HSPICE in UNIX environment a source usr class ee DOT cshrc b hspice filename hsp filename lis output hspice filename hsp filename lis c mwaves filename 3 http www stanford edu class ee133 handouts general spice ref pdf Quick Reference Sheet More than you need in EE133 A highly Annotated HSPICE input example file http www stanford edu class ee214 example hsp Remember that the first line is a title comments are lines that begin with all other lines are evaluated model statement this is an example of an include file include level3models Or you may also specify the whole path include afs ir class ee214 WWW level3models include this to use mwaves on the output option post param statements allow you to define constants etc param cload 1pF note that beginning a line with appends the time to the previous line exceptions comments cannot continue with param rout 10k vdd 3V delV 1 circuit This is in netlist format voltage sources Vname pos terminal neg terminal dc val AC ac val vdd vdd gnd vdd vcm cm gnd 1 2V vin1 in1 cm ac delV 2 vin2 cm in2 ac delV 2 current sources Iname pos terminal neg terminal dc val iss ss gnd 200u a resistor Rname term1 term2 res val Rout ss gnd rout a capacitor Cname term1 term2 cap val Cload out gnd cload a transistor Mname drain gate source bulk model name W width L length L Ldrawn param wn 25u wp 10u l 0 5u mn1 load in1 ss gnd nmos w wn l l as wn 3 l ad wn 3 l ps 2 wn 3 l pd 2 wn 3 l mn2 out in2 ss gnd nmos w wn l l as wn 3 l ad wn 3 l ps 2 wn 3 l pd 2 wn 3 l mp1 load load vdd vdd pmos w wp l l as wp 3 l ad wp 3 l ps 2 wp 3 l pd 2 wp 3 l mp2 out load vdd vdd pmos w wp l l as wp 3 l ad wp 3 l ps 2 wp 3 l pd 2 wp 3 l Simulation DC sweep from 7V to 1 5V in 01V steps dc vcm 0 7 1 5 0 1 AC sweep 10steps decade from 1Hz to 1GHz varying the output resistor from 10k to 30k in 5 evenly space steps AC dec 10 10k 10G sweep rout lin 5 10k 30k output results some notes when doing DC sweeps refer to voltages at nodes by v nodename currents in voltage sources by i voltage source when doing AC sweeps refer to voltage mag by vm nodename voltage phase by vp nodename voltage magnitude in db by vdb nodename print statements list all the values you want to see print DC v out i vdd print AC vm out measure measure measure measure measure dc dc ac ac ac gate vol when i vdd 0 5m drain vol find v out when i vdd 0 5m ugbw frequency when vdb out 0 ugbw phase find vp out when vdb out 0 ugbw phase margin param 180 ugbw phase alter statements allow you to change a parameter and then rerun all of the above simulations syntax alter title alter wn100 param wn 100u wp 25u alter param wp wn200 wn 200u 50u remember to end the file with end AND a carriage return end
View Full Document