Transcription of 5. HSPICE Basics - University of Southern California
1 Autumn 96/97 EE371- 12 -5. HSPICE BasicsAn input netlist file must be created to begin the design entry and simulation process. If youare just starting out, you might want to copy a demo file to your own directory and edit the netlistto create your own circuit. Once you have created the file ( ), > begin the analyses specified in the input file. HSPICE stores the simulation results requested inan output listing file and, post is specified, a graph data file. Whenpost is specified, thecomplete circuit solution (either steady state, time, or frequency domain) is stored.
2 The results forany node voltage or branch current can then be viewed or plotted using you are converting a SPICE-3 input file to HSPICE format, it is only necessary that you addthe post somewhere in your file and at the end (make sure you hit <cr> statement to form a complete line). However, if you wish to take advantage of some ofthe unique features of HSPICE you will need to refer to a copy of theHSPICE USERS also has specific file naming conventions to indicate the function of each file. All ofthe files associated with a particular design reside in one directory and are named by catenating thedesign name and a particular suffix (see Table 1).
3 Both HSPICE and MetaWaves extract the designname from the input file and use it to form the output 1. Filename suffixes. (Note: #is either a sweep number or a hardcopy file number.)File TypeFile DescriptionSuffixHSPICE Inputinput (or sp) HSPICE Outputoutput Outputgraph data - transient analysis # HSPICE Outputgraph data - transient analysis measurement # HSPICE Outputgraph data - DC analysis # HSPICE Outputgraph data - DC analysis measurement # HSPICE Outputgraph data - AC analysis # HSPICE Outputgraph data - AC analysis measurement # HSPICE Outputhardcopy .GRAPH data (from PRTDE-FAULT).gr# HSPICE Outputdigital output OutputFFT analysis graph data file (from.)
4 FFT statement).ft# HSPICE Outputsubcircuit # HSPICE Outputoutput # HSPICE Inputoperating point node voltages (initial conditions).icautumn 96/97 EE371- 13 - HSPICE Input Netlist FileInput 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 witha plus (+) sign) must immediately follow the statement being continued, and the sub-module must appear next to the end of the file before statement.
5 Comments may be add-ed any place in the file. The input file name and equation length can be up to 256 characters. Asummary of formatting rules is listed below: HSPICE uses a free-format input. Fields in a statement are separated by one or moreblanks, tabs, a comma, an equal sign, or a left or right and lower case is ignored except as filenames on UNIX length is limited to 256 statement may be continued by entering a plus (+) sign as the first non-numeric, non-blank character in the subsequent statements, including QUOTED strings such as paths and algebraics can be continuedwith a backslash (\) or a double backslash (\ \) at the end of the line to be single backslash preserves white space and the double squeezes out any whitespace between the continued lines.
6 The double backslash guarantees pathnames arejoined without interruption. Note: input lines can be 256 characters long, so foldingand continuing a line is only necessary to improve Input File StructureThe basic structure of an input netlist file consists of one main program and one or more op-tional submodules. The submodule (preceded by statement) can be used to easily al-ter and re-simulate an input netlist file with different options, netlist, analysis statements, and testvectors. Several high level call statements can be used to restructure the input netlist file are ,.LIB LIB statements. Using these statements, netlists, modelparameters, test vectors, analysis, and option macros can be called into a file from either libraryfiles or other files.
7 The input netlist file can also call an external data file. The external data filecontains parameterized data for element sources and models. The basic elements of an input netlistfile are:autumn 96/97 EE371- 14 -Output Listing FileThe results of each circuit simulation are saved in an output listing file with the same filenameas the input but appended with a .lis suffix instead of .hsp . For example, the input have an output listing file output listing file contains the simulation results specified by.
8 PRINT, andanalysis statements in the input netlist files. If the input netlist file contains more than one simu-lation run (by use of ,.INCLUDE,.DATA, or analysis statements), the output listingfile also contains the results for each simulation Data FileGraph data files contain high resolution simulation results which can be viewed using a wave-form viewer like MetaWaves. 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 cur-rents, and internal state variables. One graph data file is created for each analysis specified in theinput netlist file.
9 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 sim-ulation number for the given analysis. For example, are generated if aninput netlist file specifies an AC analysis for two different Factor Notation and UnitsAny letters that are not scale factors and immediately follow an entry number are ignored, withthe exception of O or I. If an O or I follows a number, a fatal error results. The letters O and I arenot allowed in alphanumeric numbers because they are easily confused with the numbers 0 and same unscaled number is represented by 10, 10amps, 10V, 10 Volts, and *or $.
10 OPTIONSANALYSIS and TEMPERATUREPRINT / PLOT / < .PROTECT>. <.UNPROTECT>. redefinitionADDITIONAL first line; becomes input netlist file titleComments to describe the circuitSet conditions for simulationStatements to set sweep variablesStatements to set print, plot and graph variablesSets input state, also can be put in subcircuitsSets input stimulusCircuit descriptionTurns off output printbackInclude .MODEL or .MACRO librariesInclude .MODEL or .MACRO librariesRestores output printbackSequence for worst case corners analysisRemoves previous library selectionAdds a new library caseSequence for in-line case analysisTerminates any ALTERs and the simulationautumn 96/97 EE371- 15 -The same scale factor is represented by M, MA, MSEC, and same number is represented by 1000, , 1000Hz, le3, , :Scale factors are not accumulative as with other simulators (for example, 1KK does not equal1 MEG).