Before running hspice, you must add the following statement to your .cshrc file:
swsetup ecad:meta:scs:mgcOnce you have done this, log completely out, and then log back on in order to make sure your environment now has the new paths.
To run hspice from the command line do:
% hspice spice-file-nameHspice expects spice files to end in '.sp', i.e., 'inverter.sp'. The spice file will be echoed to the terminal as it is processed, any errors in processing the file will be shown. Sometimes it is difficult to see the error messages; you can do :
% hspice spice-file-name | grep errorand only the error messages will be echoed to the screen. To save the listing output to file so you can examine it later, do:
% hspice spice-file-name > spice.log
MWAVES is a graphical interface which allows you to view voltage/current plots
for nodes inside of your hspice simulation.
Before running MWAVES, you MUST have run hspice on your spice file.
Also, the hspice file must have specified the 'POST' option in the .OPTION statment.
To start MWAVEs do:
% mwaves
This tutorial will refer to menu choices as:
design -> openwhere '-> open' refers to a submenu choice under the 'design' menu.
'design->open'
This will present a list of spice files in your current directory,
click on the spice file you want to open.
You will then see the 'Results Browser'. To plot a waveform, click one of the results choices in the first menu pane. These will look like:
DC:**** AC:****etc.
This will bring up some enties in the TYPES and CURVES panes. If your input node is called 'A' and your output node is called 'Y', you can plot 'A' on the X axis by clicking on the 'A' entry in the CURVES pane, then click on 'Apply' in the 'CURRENT X-AXIS' menu pane.
To plot 'Y' on the Y-axis so that we get input versus ouput, now DOUBLE-click on the 'Y' entry in the 'CURVES' pane.
One problem with this interface is that the Y-Axis will only show the range of values for the Y-data. If you want the Y-axis to have the same data range as the X-axis, you will have to DOUBLE-click on the 'A' entry in the CURVES pane to also plot 'INPUT vs INPUT'; this will force the Y-Axis to have the same range as the X-axis.
If you rerun your spice file, you can force Mwaves to update curves
with new data by accessing the menu choice:
Panels -> UpdateThe menu choice:
Panels -> Delete Curvesis useful for deleting a currently selected curve.
To print the curve to a printer or file, click on the 'printer' icon in the main Mwaves display window.
If you print to a FILE, then by default the output file is called '/tmp/vprint.out' !!!
To exit out of MWAVES, use menu choice
design -> exitOn exit, you will have a choice of saving your current MWAVES display configuration to a file; this can be read in during another MWAVES session and save some time in getting your displays set up.
A common problem with printed plots from MWAVES is the color used for the waveform. For example, a 'Yellow' waveform does not show up well on a black/white postscript plot. To change the color of a waveform, select 'Tools -> Analysis -> Curves'. This will bring up a menu which shows the current color for each curve. DOUBLE CLICK on one of the curve colors to bring up the 'Color Preference Chooser'. Change the color method to 'RGB' and change the color to the desired color by moving the Red/Green/Blue sliders. A 'white' curve will show up as black on the postscript plot. If you change all of the curves to 'white', you will also need to change the 'curve style' for each curve so that you can tell the curves apart on the plot.