Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
16 views

How_to_use_HSPICE_for_ECE222

Uploaded by

GuoJiachun2023
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

How_to_use_HSPICE_for_ECE222

Uploaded by

GuoJiachun2023
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

ECE222

How to Use HSPICE for ECE222 Simulation Labs


HSPICE can be run on one of the Linux workstations located in CSB527. You need an ECE
account to log in. Ask the TAs if you need help on Unix/Linux. It is recommended that you work in
CSB527 since it is easier for the TAs to help you debug. For those who want to work from home or
other labs, you can also remotely log into one of these machines to run HSPICE, or install and run
the Windows version of HSPICE on your own Windows PC.
In order to use one of the graphic user interface (GUI) tools such as WaveView, you need X
Window support if you are using the Linux workstations in CSB 527 or remotely on the ECE
Linux servers.

I. Set Up HSPICE in Linux


HSPICE software and supporting tools are already installed on the ECE Linux servers, and can be
directly accessed on the Linux workstations in CSB 527.
To set up the environment under Linux to run HSPICE, first start a Linux shell window. Inside the
shell window, specify the license server for HSPICE (i.e., where to get licenses to run HSPICE) as
an environment variable SNPSLMD_LICENSE_FILE:

% setenv SNPSLMD_LICENSE_FILE 5280@lmsynopsys.seas.rochester.edu

Note that “%” is the command prompt in Linux, and I assume you are using C Shell, which is the
default shell on ECE Linux workstations and servers.
Then specify the HSPICE installation directory

% setenv HSP_DIR /usr/ece/synopsys/hspice/R-2020.12

Finally run a shell script:

% source $HSP_DIR/hspice/bin/cshrc.meta

II. Run HSPICE in Linux


Since there will be multiple output files generated after running HSPICE, it is a good idea to create
a separate design directory for each circuit you are working on.
Go into your newly created design directory. Create the SPICE netlist file. Use your favorite editor.
Vi and Emacs are two good ones in Linux. See tutorials on Blackboard if you are not familiar with
Linux or these editors.
After creating or editing your SPICE netlist file, run HSPICE on the command line in the shell
window:

% hspice your_spice_netlist_filename

Some text outputs from HSPICE will be displayed in the shell window. You can also re-direct these
text outputs to an output file. The alternative command to run HSPICE is:

1
ECE222

% hspice your_spice_netlist_filename >! output_filename

Then you can open this text file to view the outputs.
HSPICE can also generate graphic outputs, which will be saved in separate data files in the current
design directory. See the lecture notes for the file suffix to locate them.

III. Set Up and Run WaveView in Linux


HSPICE can generate graphic files for plots when .OPTIONS POST is specified in the netlist. To
view the graphic data, you can use the graphic waveform viewer, Custom WaveView. To set up its
environment in Linux, add its binary directory to the search path on the command line:

% set path=(/usr/ece/synopsys/wv/R-2020.12/bin $path)

You can automate this step by adding this line to your .cshrc script file in your home directory (see
Section IV below).
To start WaveView,

% wv &

A graphic window will show up. You can load the data from the graphic files and plot them like in
the following example:

2
ECE222

IV. Shell script to automate the setup process


You can automate the setup process by adding the commands above in the .cshrc script file under
your home directory. There is a template file on Blackboard under “Learning Modules – Simulation
Labs” for these commands. You can copy & paste the commands into your .cshrc file in your home
directory. Note that in the current Linux session, you need to run the .cshrc script after the change
if you haven’t manually enter the commands:

% source ~/.cshrc

Next time after you login, the .cshrc script will be executed automatically and the environment will
be set up without the need to manually run the commands or the .cshrc script again.

V. Run HSPICE Remotely on Linux Servers


If you have a networked computer with X Window System support, you can run HSPICE remotely.
You will need to run X Window server on your local computer, and then use ssh to remotely log
into one of the ECE Linux servers (e.g., mnemosyne, gauss, poyting, or babbage). If you are located
off campus, you need to use VPN to get on the UR network first.
For example, if you are using a Linux computer, follow this procedure:
********************************************************************************
Open a shell window on your local computer and enter in the command line
% xhost +remotehost
where remotehost is the name of the remote ECE Linux server on which you will run HSPICE.
Note you need the full network name like mnemosyne.ece.rochester.edu to specify the Linux server.
This command allows your local computer to accept X Window connection from remotehost.
Next, remote log into remotehost, with your ECE account username
% ssh -Y your_username@remotehost
The -Y option will set up the DISPLAY environment variable to redirect the graphic display from
remotehost to your local computer automatically. This enables remotehost to open graphic windows
on your local computer.
After login to remotehost, check the DISPLAY environment variable
% echo $DISPLAY
It should show something like “localhost:11.0”, which means the display on your local computer is
now connected to the X Window apps on remotehost, such as xterm and Waveivew.
********************************************************************************
If you have a Windows PC, you can use Cygwin/X, Xming, or Mobaxterm, which provide the X
Window server and ssh tools. If you have a Mac, you can use XQuartz. The setup procedure
would be a little different from the Linux one above. Ask the lab TAs for help if needed.
Once login to an ECE Linux server, you can run HSPICE just as you would do on any Linux
workstation in CSB 527. Your configuration, HSPICE netlist files, and HSPICE output files will all
reside on the remote Linux server.

3
ECE222

VI. Install & Run HSPICE on Windows PC


If you have a Windows PC and prefer to run HSPICE locally on your computer, you can install the
Windows version of HSPICE and WaveView on your Windows PC. See Blackboard for the
download link of the installation files of HSPICE and WavView (located on a BOX drive).
During the installation, specify the installation folder as C:\synopsys. Locating the installation
folder under C:\ helps to avoid any issues due to spaces in filenames and paths, which those
originally Linux-based tools tend to have trouble with.
After installing the software, you need to set up the license by defining a Windows environment
variable SNPSLMD_LICENSE_FILE with the value of 5280@lmsynopsys.seas.rochester.edu
Before running the Windows version HSPICE and WaveView, you need to connect to UR network.
If you are located off campus, use VPN to connect to UR network first. This would allow your
Windows PC to access the Linux server that runs the Synopsys license server.
You can launch the two installed Synopsys apps under Windows Start menu:
- HSPUI
- Custom WaveView
Each app will launch a GUI window. In the HSPUI window, you can load your HSPICE netlist and
run simulations.
Alternatively, you can run HSPICE in a command window with a command similar to the Linux
one:
C:\synopsys\Hspice_R-2020.12\WIN64\hspice.exe netlist_filename
To simplify the syntax of this command, you can add the program folder C:\synopsys\Hspice_R-
2020.12\WIN64\, where hspice.exe resides, to the Windows environment variable PATH.

You might also like