autumn 96 97 EE371 5 HSPICE Basics An input netlist file must be created to begin the design entry and simulation process If you are just starting out you might want to copy a demo file to your own directory and edit the netlist to create your own circuit Once you have created the file filename hsp enter hspice filename hsp filename lis to begin the analyses specified in the input file HSPICE stores the simulation results requested in an output listing file and if option post is specified a graph data file When post is specified the complete circuit solution either steady state time or frequency domain is stored The results for any node voltage or branch current can then be viewed or plotted using MetaWaves If you are converting a SPICE 3 input file to HSPICE format it is only necessary that you add the line option post somewhere in your file and put end at the end make sure you hit cr after the end statement to form a complete line However if you wish to take advantage of some of the unique features of HSPICE you will need to refer to a copy of the HSPICE USERS MANUAL HSPICE also has specific file naming conventions to indicate the function of each file All of the files associated with a particular design reside in one directory and are named by catenating the design name and a particular suffix see Table 1 Both HSPICE and MetaWaves extract the design name from the input file and use it to form the output files File Type File Description Suffix HSPICE Input input netlist hsp or sp HSPICE Output output listing lis HSPICE Output graph data transient analysis results tr HSPICE Output graph data transient analysis measurement results mt HSPICE Output graph data DC analysis results sw HSPICE Output graph data DC analysis measurement results ms HSPICE Output graph data AC analysis results ac HSPICE Output graph data AC analysis measurement results ma HSPICE Output hardcopy GRAPH data from meta cfg PRTDEFAULT gr HSPICE Output digital output file a2d HSPICE Output FFT analysis graph data file from FFT statement ft HSPICE Output subcircuit cross listing pa HSPICE Output output status st HSPICE Input operating point node voltages initial conditions ic Table 1 Filename suffixes Note is either a sweep number or a hardcopy file number 12 autumn 96 97 EE371 HSPICE Input Netlist File Input netlist and library input files can be generated using any standard UNIX editor vi emacs etc The order of the statements is arbitrary except that continuation lines those beginning with a plus sign must immediately follow the statement being continued and the last ALTER submodule must appear next to the end of the file before the END statement Comments may be added any place in the file The input file name and equation length can be up to 256 characters A summary of formatting rules is listed below HSPICE uses a free format input Fields in a statement are separated by one or more blanks tabs a comma an equal sign or a left or right parenthesis Upper and lower case is ignored except as filenames on UNIX systems Statement length is limited to 256 characters A statement may be continued by entering a plus sign as the first non numeric nonblank character in the subsequent statement ALL statements including QUOTED strings such as paths and algebraics can be continued with a backslash or a double backslash at the end of the line to be continued The single backslash preserves white space and the double squeezes out any white space between the continued lines The double backslash guarantees pathnames are joined without interruption Note input lines can be 256 characters long so folding and continuing a line is only necessary to improve readability HSPICE Input File Structure The basic structure of an input netlist file consists of one main program and one or more optional submodules The submodule preceded by the ALTER statement can be used to easily alter and re simulate an input netlist file with different options netlist analysis statements and test vectors Several high level call statements can be used to restructure the input netlist file modules These are the INCLUDE LIB and DEL LIB statements Using these statements netlists model parameters test vectors analysis and option macros can be called into a file from either library files or other files The input netlist file can also call an external data file The external data file contains parameterized data for element sources and models The basic elements of an input netlist file are 13 autumn 96 97 TITLE or OPTIONS ANALYSIS and TEMPERATURE PRINT PLOT GRAPH IC SOURCES NETLIST PROTECT LIB libraries INCLUDE libraries UNPROTECT ALTER DELETE LIB LIB ALTER NETLIST PARAMETER redefinition ADDITIONAL COMMANDS END EE371 Implicit first line becomes input netlist file title Comments to describe the circuit Set conditions for simulation Statements to set sweep variables Statements to set print plot and graph variables Sets input state also can be put in subcircuits Sets input stimulus Circuit description Turns off output printback Include MODEL or MACRO libraries Include MODEL or MACRO libraries Restores output printback Sequence for worst case corners analysis Removes previous library selection Adds a new library case Sequence for in line case analysis Terminates any ALTERs and the simulation Output Listing File The results of each circuit simulation are saved in an output listing file with the same filename as the input but appended with a lis suffix instead of hsp For example the input file rcnet hsp would have an output listing file named rcnet lis The output listing file contains the simulation results specified by the PLOT PRINT and analysis statements in the input netlist files If the input netlist file contains more than one simulation run by use of the ALTER INCLUDE DATA or analysis statements the output listing file also contains the results for each simulation run Graph Data File Graph data files contain high resolution simulation results which can be viewed using a waveform viewer like MetaWaves When OPTION POST is included in the input netlist file HSPICE produces a graph data file By default it contains all the simulation s node voltages branch currents and internal state variables One graph data file is created for each analysis specified in the input netlist file Each file will be named by appending a suffix XX to the design name where XX denotes an analysis TR transient SW DC sweep and AC AC and is the simulation number for the given analysis For example
View Full Document