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.
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.
Before subcircuit expansion, if a line starts with xname (x followed by a name given in the option), then if the corresponding value is given it will replace xname. If no value was given, the x is simply stripped off. This is all case insensitive.
Example: set submaps j,b
In the deck, ``xj1 1 2 ...'' would be replaced by ``b1 1 2
...''.
This is fairly obscure, but may be useful for reading HSPICE netlists that contain Verilog-A devices. HSPICE uses ``X'' for these, WRspice maps them to a standard letter for the device type.
The units concatenation character may be used in the units string to identify the start of the units string, and to identify the start of the denominator units. The units separation character (see below) can also be used to indicate the start of denominator units. See the section about input numerical format and the units string (2.1.3) for a complete syntax description. If not given, the concatenation character is `#', but if this variable is set to a string containing a single punctuation character, that character will become the units concatenation character.
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 |
The units separation character may be used in the units string to identify the start of the denominator units. The units concatenation character can also be used to indicate the start of denominator units. See the section about input numerical format and the units string (2.1.3) for a complete syntax description. If not given, the separation character is `_' (underscore), but if this variable is set to a string containing a single punctuation character, that character will become the units separation character.
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.