Please do not distribute and duplicate any CAD related documentations
without written permission from the CAD tool companies. You can cause
serious legal problems by doing it.
*Title: Minimum sized inverter with a capacitive loading
*Title line is always the first line of the input file.
*HSPICE simply ignores it.
*Any line starting with * or $ is considered a comment.
*HSPICE also treats things after "*" or "$" as comments.
*HSPICE syntax is case-insensitive!!!
.options list node post *This line tells HSPICE to plot
*all signals in the circuit.
.include '$PDK_DIR/ncsu_basekit/models/hspice/hspice_nom.include'
*This is where the MOS models are located.
*Currently FreePDK is using 45nm Predictive Technology Model BSIM4 models,
*which are HSPICE level 54 MOS models.
Vsupply vdd 0 1.1 $1.1V is the nominal supply voltage for this given technology.
Vin in 0 PWL 0 0 50e-12 0 100e-12 1.1
*Piecewise Linear Waveform (PWL)
*
*[PWL Syntax]
*vxxx node1 node2 pwl t0 v0 t1 v1 t2 v2 t3 v3 ...
*
*The value of vxxx is v0 at t=t0, v1 at t=t1, and so on.
*The node named "0" is the global ground for HSPICE simulation.
*
*For detailed information about PWL syntax, please look at page 196 in
*"HSPICE User Guide: Simulation and Analysis".
*You can access the documentation by using the following command.
*acroread $SYNOPSYS/hspice/hspice/docs/hspice_sa.pdf&
*
m0 out in vdd vdd
+ PMOS_VTL L=50e-9 W=180e-9
m1 out in 0 0
+ NMOS_VTL L=50e-9 W=90e-9
*Any line that starts with M describes a MOS device.
*Any line that starts with + sign is considered as
* the continuation of the previous line.
*
*[MOS device Syntax]
*MXX D G S B MODEL_NAME
*+ W=xxx L=xxx [AD=AD_VALUE] [AS=AS_VALUE]
*+ [PD=PD_VALUE] [PS=PS_VALUE]
* Note that W and L definition order is not important as long
* as you define "W=xxx" or "L=xxx".
*For detailed information, please look at the page 167 in
*"HSPICE User Guide: Simulation and Analysis".
.tran 1p 1n
*Transient analysis
*
*[Transient Analysis Syntax]
*.tran tinc tstop
*HSPICE will simulate the circuit from 0 to tstop.
*tinc is used for the output printout and the internal time step control.
*For detailed information, please look at the page 383 of
*"HSPICE User Guide: Simulation and Analysis".
Cload out 0 10e-15
*Passive devices such as Resistor, capacitor, and inductor start
*with R, C, L respectively.
*
*[Passive Device Syntax]
*Cxx node1 node2 value
.measure tran pwr_avg_HL AVG power from=50e-12 to=300e-12
.measure tran tpHL
+trig v(in) val='1.1/2' RISE=1
+targ v(out) val='1.1/2' FALL=1
*The first measurement measures the average power consumption of whole
*circuit. The second measurement measures propagation delay from the node "in"
*to the node "out".
*For detailed information, pleas look at the page 311 of
*"HSPICE User Guide: Simulation and Analysis".
.end
* Don't forget to put ".end" at the end of your file.
* Also if you put anything after ".end", HSPICE will ignore it.