Madhava Vemuri, Ph.D.
Log in to your remote UNIX machine and open a terminal. Create a working directory if you are invoking the tool for the first time. If not, please skip step 1 and continue to your working directory. Here we have created a folder called "HSPICE" on the Desktop. Create a new ".bashrc" file to add the current paths to the license and the binaries.
mkdir Desktop/HSPICE
cd Desktop/HSPICE
gedit .bashrc &
Please make sure the following paths are present in the file. Please refer to the Canvas website to look up the correct license paths
########################################
#.bashrc file
# Created by: Madhava Vemuri
# Date : 07/08/25
#########################################
# Setup the Synopsys License
export LM_LICENSE_FILE=27020@XX.XX.XX
# Add path to HSPICE binaries
export PATH="$PATH:/usr/synopsys/hspice/X-2025.06-2/hspice/bin"
# Add path to Waveview binaries
export PATH="$PATH:/usr/synopsys/wv/X-2025.06-3/bin"
Source the ".bashrc" file to add the binaries and licence paths to the terminal. If this step is not implemented, you may encounter some licensing and tool invoking related issues
source .bashrc
You can check if the tool is correctly added to the terminal by invoking it. To invoke HSPICE, please use the command hspice. Simple check would involve looking at the version of the tool. Please enter the following command to check the version. You should see the following output in the terminal
hspice -version
To invoke the plotting and analysis tool, WaveView, please use wv. Use the following command to check if the wave
wv -v
Here is the syntax for creating active, passive elements and Voltage sources in Hspice. For complete details, please refer to the HSPICE manual
Create a spice file using the steps mentioned in the "Creating a SPICE file" tutorial. We are currently running a file called "rccircuit.sp" . The contents of the file and the schematic are given below.
*****************************************
* rccircuit.sp file
* Created by: Madhava Vemuri
* Date : 09/27/25
*****************************************
* Indicates a comment in Hspice
*----------------------------------------------------------
* Include device model files
* No files are included
*----------------------------------------------------------
* Define Parameters
.param SUPPLY=5.0 * Here SUPPLY is created as a parameter
.option post * The option is necessary to run the simulations
*-----------------------------------------------------------
* Creating netlist using R and C
R1 n1 n2 1K
C1 n2 gnd 1uF
*-----------------------------------------------------------
* Defining Voltage sources
V1 n1 gnd PWL (0s 0V 1ms 0V 1.1ms 5V 4.9ms 5V 5ms 0V 10ms 0V)
*-----------------------------------------------------------
* Stimulus
.tran 0 10ms
To run this SPICE file, please save the contents in ".sp" extension format. Use the hspice to run the simulation using the following syntax. The "output.lis" contains the run-time information generated by the SPICE tool during execution. Check the lis file to find out the status of the simulation.
hspice rccircuits.sp > output.lis
If the simulations are successful, additional files will be created using the same file name with different extension. Here are the detailed list of files generated.
.ic0
.st0
.mt0
.sw0
.tr0
Text file containing the circuit initial conditions
Text file containing the summary of the simulation
Text file containing the measurements
Binary file containing the DC analysis waveforms
Binary file containing the Transient analysis waveforms
We can extract performance metrics such as delay and average power using the built-in command ".MEASURE". To extract delay metrics such as output slew or propagation delay we utilize TRIG and TARG . They indicate the start and end time to measure the time with respect to some voltage value.
*-----------------------------------------------------------
* Measure
*-----------------------------------------------------------
.MEASURE tp_LH * Low to High Propagation Delay
+ TRIG v(n1) VAL='SUPPLY/2' RISE=1
+ TARG v(n2) VAL='SUPPLY/2' RISE=1
.MEASURE tp_HL * High to Low Propagation Delay
+ TRIG v(n1) VAL='SUPPLY/2' FALL=1
+ TARG v(n2) VAL='SUPPLY/2' FALL=1
.MEASURE t_rise * Low to High slew
+ TRIG v(n2) VAL='SUPPLY * 0.1' RISE=1
+ TARG v(n2) VAL='SUPPLY * 0.9' RISE=1
.MEASURE t_fall * High to low slew
+ TRIG v(n2) VAL='SUPPLY * 0.9' FALL=1
+ TARG v(n2) VAL='SUPPLY * 0.1' FALL=1
To measure the average power, we can calculate the result from the multiplication of Current (I) and Voltage (V)
*-----------------------------------------------------------
* Measure
*-----------------------------------------------------------
.param power='i(n1)*v(n1)'
.MEASURE tran AVG_PWR AVG 'power' from=0.1m to=10m
Snippet of the ".mt0" file created during the SPICE simulation