These variables alter the expected syntax of various types of WRspice input. It may, on occasion, be useful or necessary to use one or more of these variables to provide compatibility with SPICE input intended for another simulator, or for compatibility with earlier releases of WRspice.
acm
alpha binflag calcacm capop cjgate cta |
ctp
dtemp hdif iirat lalpha ldif lmlt |
lref
lvcr mismatchflag nds pta ptp rd |
rdc
rs rsc scale scalm sfvtflag sigma |
tlev
tlevc vcr vnds walpha wmlt wref |
wvcr
xl xw |
iss | ns | tlev | tlevc | update |
dtemp |
.alias
.alter .connect .data |
.dellib
.dout .global .graph |
.hdl
.lin .malias .protect |
.stim
.unprotect |
plotname.vectorname
The character used to separate the plotname from the vectorname, which defaults to a period (`.'), can be changed with this variable. If this variable is set to a single-character string, then that character becomes the separation character.
@devicename[paramname] for a device parameter,
@modelname[paramname] for a model parameter, or
@paramname for a circuit parameter.
The character used to indicate a special vector can be changed from the default `@' with this variable. If this variable is set to a single-character string, then that character is used to indicate a special vector.
This variable can be set to a string consisting of a single punctuation character, which will be used as the field separation character in names generated in subcircuit expansion. It should be a character that is not likely to confuse the expression parser. This requirement is rather ambiguous, but basically means that math operators, comma, semicolon, and probably others should be avoided.
In release 3.2.15 and later the default is `.' (period), which is also used in HSPICE, and provides nice-looking listings.
In releases 3.2.5 - 3.2.14, the default was `_' (underscore).
In release 3.2.4 and earlier, and in Spice3, the concatenation character was `:' (colon).
This variable can appear in a .options line in SPICE input, where is will set the concatenation character used for the circuit. See also the description of the subc_catmode variable below.
Previous WRspice versions used the Spice3 algorithm for generating the new node and device names. Release 3.2.15 and later have a new, simpler algorithm as the default, but support for the old algorithm is retained.
This string variable can be set to one of the keywords ``wrspice'' or ``spice3''. It sets the encoding mode for subcircuit node and device names. In 3.2.15 and later, the ``wrspice'' mode is the default. In earlier releases, only the ``spice3'' mode was available.
A detailed discussion of the two mapping modes is provided in the description of subcircuit expansion in 2.6.1.1.
Typically, the user may not know or care about subcircuit mapping details, however in some SPICE input it may be necessary to reference subcircuit nodes in .save lines and elsewhere. In this case knowledge of, and control of, the mapping employed is necessary.
There is also a compatibility issue with older WRspice input files that explicitly reference subcircuit nodes, as both the default renaming algorithm and concatenation character have changed as WRspice evolved. The format of the subcircuit node names depends on the algorithm, so SPICE input that explicitly references subcircuit node names implicitly assuming a certain mapping algorithm will require either changes to the node names, or specification of the matching algorithm and concatenation character. Such files can be easily updated to be compatible with newer WRspice releases, but some familiarity with the renaming modes is needed.
This variable can appear in a .options line in SPICE input, where is will set the name mapping algorithm used for the circuit. Typically, to ``fix'' an old input file, one would add a .options line specifying the spice3 mapping algorithm, and either the colon or underscore (as appropriate) for the concatenation character.
The character used as the units separation character can be changed by setting this variable to a length-one string containing the new character. The character in the single-character string becomes the new separation character. For example,
set units_catchar = "_"will return to the pre-3.2.4 default.
Further, it is now possible to add ``denominator units'', which was not possible in pre-3.2.4 releases. A second appearance of the separation character, or the first appearance if there was no separation character ahead of the units string, is logically like `/', and units that follow are denominator units.
Examples:
1.0#F#S | 1 Farad per second |
1.0F#S | 1 femtosecond (note that 'F' can be a multiplier or a unit!) |
1.0FS | 1 femtosecond |
1.0#FS | 1 Farad-second |
1.0S | 1 second |
1.0#S | 1 second |
1.0##S | 1 Hertz |
For example, if ``set one = 1'' is active, then ``$one%k'' will expand to ``1k''. Note that it is also possible to use the form ``{$one}k'' to achieve the same objective.
The same applies when expanding parameters in SPICE input, using definitions from a .param line. If one has ``.param one=1'' in scope, then ``one%k'' expands to ``1k''.
This variable allows the default concatenation character `%' to be changed. If this variable is set to a single-character string, then that character becomes the concatenation character.