Language Differences

SIMetrix is compatible with some PSpice® and Hspice® extensions mainly so that it can read external model files. Some aspects of these alternative formats are incompatible with the SIMetrix native format and in such cases it is necessary to declare the language being used. See Language Declaration for details on how to do this.

The following sections describe the incompatibilities between the three languages.

In this topic:

Inline Comment

Hspice® uses the dollar ('$') symbol for inline comments while SIMetrix and PSpice® use a semi-colon (';'). The language declaration described above determines what character is used.

Unlabelled Device Parameters

The problem with unlabelled device parameters is illustrated with the following examples.

The following lines are legal in Hspice® mode but illegal in SIMetrix mode.

.PARAM area=2
Q1 C B E S N1 area

Q1 will have an area of 2. Conversely the following is legal in SIMetrix but is illegal in Hspice®:

.PARAM area=2
Q1 C B E S N1 area area

Again Q1 has an area of 2.

The problem is that SIMetrix does not require '=' to separate parameter names with their values whereas Hspice® does. area is a legal BJT parameter name so in the first example SIMetrix can't tell whether area refers to the name of the BJT parameter or the name of the .PARAM parameter defined in the previous line. Hspice® can tell the difference because if area meant the BJT parameter name it would be followed by an '='.

This line is legal and will be correctly interpreted in both modes

.PARAM area=2
Q1 C B E S N1 area=area

Although Hspice® always requires the '=' to separate parameter names and values, it continues to be optional in SIMetrix even in Hspice® mode. It only becomes compulsory where an ambiguity needs to be resolved as in the second example above.

LOG() and PWR()

The LOG() function means log to the base 10 in SIMetrix but in PSpice® and Hspice® means log to the base e. PWR() in PSpice® and SIMetrix means ???MATH???|x|^y???MATH??? whereas in Hspice® it means "if ???MATH???x\geq0,???MATH??? ???MATH???|x|^y???MATH??? else ???MATH???-|x|^y???MATH???". The language declaration only affects the definition when used in expressions to define model and device parameters. When used in arbitrary source expressions, the language assumed is controlled by the method of implementing the device as follows:

SIMetrix:
B1 1 2 V=expression
PSpice®
E1 1 2 VALUE = {expression }
Hspice®
E1 1 2 VOL = 'expression'

Note that the function LN() always means log to base e and LOG10() always means log to base 10. We recommend that these functions are always used in preference to LOG to avoid confusion.