HSPICE - Ananlog SPICE Simulation
Authors: Jinsik Yun, Jeannette Djigbenou, Dr. Dong S. Ha
HSPICE is one of the strongest SPICE simulator. It is famous for its accuracy and it's a de-facto standard upon which most semiconductor companies depend.
NOTE: If you are using Windows OS, you have to setup X-window system.
You are encouraged to setup X-window by installing CygwinX and PuTTY programs.
Here is the link where you can download CygwinX and PuTTY and find the installation guide: VT CVL supported software
This tutorial shows hspice simulation of a CMOS inverter. A good tutorial on spice simulation is available here.
- Before you run your SPICE simulations in a new xterm or rxvt window, run the following UNIX command in your UNIX directory:
HSpice
- And the UNIX cursor should change, for instance if your username is myname and your working directory is myworkdir, and you are using the machine fox, The cursor should change from:
myname@fox ~/myworkdir>
to:
[HSpice] myname@fox ~/myworkdir>
NOTE: For the rest of this document, the instructions will be based on the simulations for the TSMC 0.18um process. However, some alternate files for TSMC 0.25 um, 0.35um and HP 0.5um process will also be indicated.
1. Copy the following inverter netlist file and MOSFET model file into your working directory.
IBM 90 nm Coming Soon! |
IBM 0.13 um |
TSMC 0.18 um |
TSMC 0.25 um |
TSMC 0.35 um inv_tr_035.sp for transient analysis. inv_fr_035.sp for frequency analysis. inv_dc_035.sp for DC analysis. tsmc_035um_model for 0.35 um process model. |
HP 0.5 um inv_tr_050.sp for transient analysis. inv_fr_050.sp for frequency analysis. inv_dc_050.sp for DC analysis. hp05um_model for 0.5 um process model. |
22nm Predictive Technology Model from ASU: |
Other spice models can be found on the MOSIS web page and the PTM website. |
Note that the SPICE (.sp) toplevel file must contain a line, usually near the end, saying:
.option post
This case-insensitive line may specify other options in addition, such as:
.option POST NOMOD accurate
but the option POST must be specified!
CMOS Inverter Circuit
2. To perform hspice simulation on the transient analysis file, type the command:
hspice inv_tr_018.sp > inv_tr_018.lis
Four files (inv_tr_018.lis, inv_tr_018.ic0, inv_tr_018.st0, inv_tr_018.tr0) are created. View inv_tr_018.lis, inv_tr_018.ic0 and inv_tr_018.st0 to examine simulation results and status.
3. To plot the results, type the command:
CScope
- CScope (CosmosScope) window appears. Select File->Open->Plotfiles
The Open Plotfiles window is defaulted to display PL/AWD files. Set the Files of Type option to display HSPICE (*.tr*,*.ac*,*.sw*,*.ft*) files. File inv_tr_018.tr0 is then listed. Select inv_tr_018.tr0 and click open.
- “Signal Manager” window appears. Click the inv_tr_018.tr0 item. Another window entitled “inv_tr_018.tr0” contains the node names and measured values to be plotted. Double click "in" and "out' signals. Waveforms show up in CScope window
- To update Axis information, double-click on an axis and modify units or zoom factors.
- To Export the Waveform into an image format, go to File->Export Image and save the waveform in an image format of choice.
- The output waveforms for the transient analysis of the inverter in 0.18um process looks like this.
4. To measure Power Dissipation Characteristics:
- Add a measure statement to your spice netlist to measure average power:
.measure tran avgpwr AVG power from=1ns to=20ns
5. To measure max power:
.measure tran peakpwr MAX power from=1ns to=100ns
- Add several different size output load capacitances:
- cload out 0 20fF
.alter
cload out 0 50fF
.alter
cload out 0 200fF
- The netlist file with power-dissipation measurement: inv_power_018.sp.
- For HP 0.5um / TSMC 0.35um technologies, the corresponding files are inv_power_050.sp and inv_power_035.sp, respectively
- Compile the netlist file:hspice inv_power_018.sp > inv_power_018.lis
- Type:
grep ' avgpwr=' inv_power_018.lis|tail -3 - The average power will be output for each capacitance value. Take the average of the three values to get the average power dissipated.
- Repeat the above for peak power:
grep ' peakpwr=' inv_power_018.lis|tail -3 - Final Values: Average Power Dissipation: 19.44 uW
- Peak Power Dissipation: 452.23 uW
6. To measure Nodal Capacitance:
- Replace your .option statement with the following: (captab = capacitance table)
- .option captab post
- This will output the maximum capacitance for each node in your circuit onto the list file (or stty)