The SIMetrix netlist format follows the general format used for all SPICE and SPICE compatible simulators. However, with so many SPICE derivatives and with two significantly different versions of SPICE itself (SPICE 2 and SPICE 3) it is not possible to define a standard SPICE format. SIMetrix has been developed to be as compatible as possible with model libraries that can be obtained from external sources. For discrete devices, models are usually SPICE 2 compatible but some use extensions originally developed for PSpice®. IC designers usually receive model files from fabrication companies and these are available for a variety of simulators usually including Hspice®. SIMetrix is compatible with all of these but simultaneous compatibility with all formats is not technically possible due to a small number of syntax details - such as the character used for in line comments. To overcome these minor difficulties, a language declaration can be placed at the top of the netlist and any file included using .INC or the Hspice® variant of .LIB. This is described in the following sections.
In this topic:
A complete netlist consists of:
All other lines are defined by their first non-whitespace character as follows.
Netlists may be encoded as ANSI or UTF-8. Currently wide-character encoding is not supported. If ANSI encoded, the character set employed will be the default for the locale.
Characters from all character sets may be used in netlists for naming items that do not specifically require western characters. For example, node names may use Japanese characters as long as they do not contain any spaces.
SIMetrix is able to read PSpice®, Hspice® and native SIMetrix netlists, but in some cases needs to be instructed what format netlist it is reading. Currently there are three areas where simultaneous compatibility has not been possible. These are:
*#SIMETRIX *#HSPICE *#PSPICE
The language declaration must be placed at the top of the file immediately below the title line. It can also be placed in files referenced using .INC or the HSPICE® version of .LIB in which case it will apply only to that file and any others that it calls. A language declaration placed anywhere else in a file will be ignored.
For details see Language Differences.
The *#SIMETRIX language declaration can also be supplied with a parameter to specify the separator letter used for devices. See Device Lines section for details.
Any line other than a language declaration beginning with a '*' is defined as a comment and will be ignored. Also anything between a semi-colon ';' ('$' in HSPICE mode) and the end of the line will be treated as comment and will also be ignored. Some SPICE simulators require the '*' character to be the first character of the line. SIMetrix allows it to be preceded by white space (spaces and tabs).
Device lines usually follow the following basic form but each type of device tends to have its own nuances:
Name nodelist value [parameters]
value may be an actual number e.g. in the case of passive components such as resistors, or it may be a model name in the case of semiconductor devices such as bipolar transistors. Models are defined using a .MODEL statement line.
nodelist is a list of netnames. The number and order of these is device dependent. The netname itself may consist of any collection of non-control ASCII characters except whitespace and '.'. All other ASCII characters are accepted although it is suggested that the following characters are avoided if possible:
\ " % & + - * / ^ < > [ ] ' @ { }
If any of these characters are used in a netname, a special syntax will be needed to plot any signal voltage on that net. This is explained in Output Data Names. In addition the characters '[', ']', '%', '!' and '~' have a special meaning when used with XSPICE devices and therefore should be avoided at all times.
The name is the circuit reference of the device. The first letter of this name determines the type of device as shown in the table below.
The Pin Names column in the following table is relevant to the vector name used for values of device pin current. See Output Data Names.
Letter | Number pins | Device | Pin Names |
A | Any | XSPICE devices | depends on device |
B | 2 | Arbitrary source | P, N |
C | 2 | Capacitor | P, N |
D | 2 | Diode | P, N |
E | 4 | Voltage controlled voltage source | P, N, CP, CN |
F | 2 | Current controlled current source | P, N |
G | 4 | Voltage controlled current source | P, N, CP, CN |
H | 2 | Current controlled voltage source | P, N |
I | 2 | Fixed current source | P, N |
J | 3 | JFET | D, G, S |
K | 0 | Coupling for inductors | |
L | 2 | Inductor | P, N |
M | 4 | MOSFET | D, G, S, B |
N | - | Not used | |
O | 4 | Lossy transmission line | P1, N1, P2, N2 |
P | - | Not used | |
Q | 3-5 | Bipolar transistor | C, B, E, S, DT |
R | 2 | Resistor | P, N |
S | 4 | Voltage controlled switch | P, N, CP, CN |
T | 4 | Lossless transmission line | P1, N1, P2, N2 |
U | Any | VSXA devices (Verilog-HDL interface), Verilog-A devices, AC Table device | |
V | 2 | Voltage source | P, N |
W | - | Not used | |
X | Any | Subcircuit | |
Y | - | Not used | |
IGBT | C, G, E |
To remove the naming restriction that this system imposes, SIMetrix supports an extension to the above to allow the user to use any name for all devices. If the device letter is followed by a dollar '$' symbol (by default but can be changed - see below), the remainder of the name following the '$' will be used as the device name. E.g.:
Q$TR23
will define a bipolar transistor with the name TR23. All output generated by the simulator will refer to TR23 not Q$TR23.
The above mechanism can be disabled and also the character can be changed by adding a parameter to the language declaration (see Language Declaration). To disable, add this to the top of the netlist:
*#SIMETRIX sep=none
To change the character use:
*#SIMETRIX sep=character
character must be a single letter, anything else will be ignored. Although any character will be accepted it should clearly not be alpha-numeric.
The above mechanism will also be disabled if HSPICE or PSPICE languages are specified.
Instructions to the simulator other than device definitions and comments are referred to as statements and always begin with a period '.'.
Full documentation for SIMetrix statements see Command Reference.
◄ Configuration Settings | Simulator Output ▶ |