HSPICE Source File

Introduction ] Files ] [ Source File ] Devices ] Commands ] Notes ]

The HSPICE source file consists of five parts.

  1. Title statement: the first line is the circuit's title; it may be anything, but not neglected.
  2. Data statements: description of the components and the interconnections.
  3. Control statements: tells SPICE what type of analysis to perform on the circuit.
  4. Output statements: specifies what outputs are to be printed or plotted.
  5. End statement: on the very last line: .END followed by a carriage return.
Although statements 2,3, and 4 may appear in any order, it is recommended that they be given in the above sequence. 
 
TITLE STATEMENT
ELEMENT STATEMENTS
.
.
COMMAND (CONTROL) STATEMENTS
OUTPUT STATEMENTS
.END <CR>
 

You can insert comment statements anywhere in the source file:

Furthermore, it is useful to know that:

An example of these statements can be found in the BJT amplifier example bjtamp.sp. Here the .OPTION command is extended for four lines and the end of line comment is used after the .MEASURE commands. Notice that by using tabs for the elements and their nodes, it makes the netlist much easier to read. It is not required that tabs be used, but it is very helpful.

NOTATION

HSPICE notation is relatively simple. Both upper and lower case letters are allowed, but no distinction is made (HSPICE converts everything to upper-case characters before any interpretation is attempted). The statements have a free format and consist of fields separated by a blank. Each line is interpreted as a separate statement, i.e., unless "+" is the first character (see above).

  1. All statements beginning with a "." are commands (e.g. .OPTION, .PRINT, .AC, etc.) Commands are used to change the behavior of HSPICE:
  2. Statements that begin with an alphabetic character are treated as elements (e.g. r51, cc, load, etc).  The first character determines the type of element:

Each element is subject to a specific notation.  See [Commands] and [Devices] for details.

Topology Rules:

HSPICE will (fortunately) only run if the circuit topology fulfill certain criteria. Mostly, these criteria are the same as those known from basic circuit analysis:

Naming conventions:

Every node and element within the HSPICE netlist must have its own unique name. You are advised to use the following rules (although they are not strictly necessary):

HSPICE units:

HSPICE will automatically assign ohms to resistors, Farads to capacitors, and Henries to inductors. Hence, you need only provide the numeric value.

The scaling for the all units in HSPICE is done by:

Note: Capitals do not matter (e.g. F=f and M=m), therefore many people have problems with M and MEG. Please be careful with these two units!  Of this reason, I personally never use any of these abbreviations; I prefer the floating-point notation: 1.234e5=0.1234e6.

Global Variables (advanced subject):

Essentially globals are used most often for subcircuits, though they are great for sources. This way all power sources do not have to be separately defined. Notice that ground (node 0) always is a global node.

The material in this website is an expanded version of material presented by Dr. J. Steensgaard. This website is maintained by Shouri Chatterjee.  This page was last updated on 02/11/2003