below is a brief introduction to simulation using HSPICE and AWAVES/Cosmoscope
in the UTD network.
a device level circuit simulator from Synopsys.
takes a SPICE file as input and produces output describing the requested
simulation of the circuit.
simulation output can be viewed with AWAVES (or) Cosmos cope from Synopsys. A
short example is provided to illustrate the basic procedures involved in
2. Setting up your account
to access HSPICE
section shows how to setup your environment for running HSPICE.
who have a working CAD setup, you may just want to check that the
LM_LICENSE_FILE has the following values in the list of all the other
follow the procedures below: Instructions for both bash and tcsh/csh users is provided
following line to the .bash_profile
following line to your
if the above procedure has setup your environment successfully, invoke a new
shell (this will ensure that the new environment variables are in place).
will need a HSPICE input file to test this (You can copy paste the HSPICE
example given below to test this). The input Spice file is typically named with
following message indicates trouble with invocation:
error is "hspice: command not found" make sure that the HSPICE
directory " /home/cad/synopsys/hspice/U-2003.09-SP1/sun58/" is
included in the $PATH variable.
Using FLEXlm license file:
Unable to checkout hsptest
error may indicate that the license server maybe down, or the machine is not
able to run HSPICE.
other hand if the procedure was successful, you will simply see a message
indicating successful completion of simulation or errors in simulation, both of
which indicate HSPICE has run your file.
3. Setting up the
HSPICE input file
a self loaded min geometry inverter circuit.
objective of the HSPICE input file below is to measure the tpLH and tpHL both
following HSPICE file is stored in "inv.sp".
HSPICE input file is commented adequately about the different options used in
be beneficial to
keep in mind
the following differences
between SPICE3 and HSPICE.
HSPICE Example File
Self loaded min geometry inverter, sample HSPICE
Include the model files
Include the hspice model files for 0.18u
The subcircuit for the inverter
invert in outvddgnd
in vddvddpfet w='4*length' l='length' m02 out in gndgndnfet w='1.5*length'
The main inverter
loads for the inverter
out1 vddgnd invert X3 out out2 vddgnd invert X4 out out3 vddgnd invert X5 out
out4 vddgnd invert
PWL pattern for the input, represents a bit stream
Slew=1ns, bit time=5ns
gnd PWL 0ns pvdd 1ns pvdd 5ns pvdd 6ns pvdd 7ns 0 10ns 0 + 15ns 0 16ns pvdd
21ns pvdd 22ns 0 25ns 0 26ns pvdd *Parametricdefinitions
Power supplies vvddvdd 0 pvddvgndgnd 0 0
Measure statements help in calculating TPLH, TPHL
opening the waveform viewer
trantplh trig v(in) val='0.5*pvdd' fall=1 targ v(out) val='0.5*pvdd' rise=1
trantphl trig v(in) val='0.5*pvdd' rise=1 targ v(out) val='0.5*pvdd' fall=1
4. Running HSPICE
following commands can be used to simulate the above HSPICE file stored in
inv.sp and store all the simulation results with file prefix as "inv"
hspiceinv.sp -o inv
results in the creation of the following output files: inv.ic -> Operating
point node voltages (initial conditions) inv.lis -> Output listing
-> Transient analysis measurement results
-> Output status
-> Transient analysis results
Analyzing the outputs
above example, the output data can be analyzed both graphically as well as in
the results of the .measure computation, execute:
% cat inv.mt0
tplh tphl temper alter#
3.416e-10 1.002e-09 25.0000 1.0000
As can be
seen above, the values of propogation delay have been obtained even before the
waveform analysis software has been opened.
AWAVES run the following command:
get the error "awaves: command not found" make sure that the AWAVES
directory "/home/cad/synopsys/hspice/U-2003.09-SP1/sun58/" is
included in the $PATH variable.
invoked, open the designusing the pull down menu options: Design->Open and
select inv.sp and then highlight the tr0 (Transient response)
the select box.
also see the hierarchy of the netlist and the types of analysis and the
individual signals in separate lists in the window. Select Hierarchy -> Top,
Types -> Voltages and select the voltages you want to observe.
and out by double clicking on the names. You will see the screen below for the
stimulus provided in inv.sp.
II. Synopsys Cosmoscope:
Cosmoscope run the following command:
If you get the error "awaves: command not
found" make sure that the AWAVES directory "
/home/cad/synopsys/cosmo/ai_bin/" is included in the $PATH variable.
invoked, open the design using the pull down menu options: File -> Open
-> Plot files and select file inv.tr0 in the working directory.
Manager Window and signal window opens.
the necessary signals to be plotted by double-clicking them. For example v(in)
and v(out) by double clicking on the signal names in the signal window
see the screen below for the stimulus provided in invest.