In this Topic Hide
The netlist preprocessor is actually part of SIMetrix not SIMPLIS. However, although it can be used with SIMetrix (SPICE) netlists, it was originally developed for use with SIMPLIS and so is documented here. The netlist preprocessor provides some additional functionality not provided by the simulator itself. These functions are:
The preprocessor is launched using the script command PreProcessNetlist. The syntax is:
PreProcessNetlist [/inAppend extraInputLines] [/simulator SIMPLIS|SIMetrix] [/mc] |
+ [/importglobals] [/params paramlist] [/mcseed seed] [/rawdeck] [/mclogfile mclogfile] |
+ inFile outFile |
where
inFile | Input file name to be processed |
outFile | File to receive result |
extraInputLines | Additional lines appended to input file. Each line separated by a semi-colon ';'. |
/mc | If present, enables Monte Carlo distribution functions. When absent these functions will return unity |
/importglobals | If present, any values defined in the global group in the front end will be imported. This allows values in scripts to be passed to the pre-processor. E.g. |
paramlist |
semi-colon delimited list of name=value pairs to define local parameters. For example:
Let global:param1 = 100.0 The value of param1 will be available in the preprocessed netlist |
seed |
Assign Monte Carlo seed value. Requires /mc |
/rawdeck | This produces an intermediate file with the extension .rawdeck which includes the output after the models and subcircuits have been gathered from the library but before resolution of parameter expressions. This is intended for building encrypted parameterised models |
mclogfile | If specified, enables generation of a Monte Carlo log file which lists the values of components affected by Monte Carlo distribution functions. Requires /mc |
The /simulator switch allows the specification of the simulator that the netlist is intended for and affects library searching and the effect of the .SIMULATOR control. The default value is "SIMPLIS".
The PreProcessNetlist command called automatically when a SIMPLIS simulation is initiated and the user does not usually need to be aware of this.
The SIMetrix library will be searched for any device referenced in a subcircuit call that is not present in the input netlist. Only devices that are explicitly designated as SIMPLIS models will be recognized in this search. (Unless "/simulator SIMetrix" is specified at the PreProcessNetlist command line). SIMPLIS models are identified in the model files using the .SIMULATOR control. The syntax of this control is:
.SIMULATOR SIMPLIS | SIMetrix |
If the device is found in the library, its text will be entered as if it had appeared in the input netlist. Currently only subcircuit devices are resolved in this library search. All primitive devices defined using .MODEL must be defined in the input netlist.
Note also that currently, only the SIMetrix global library will be searched. The .LIB control is not supported.
Parameters may be defined using the .VAR control which has the following syntax:
.VAR parameterName={ parameterExpression } |
Any part of the netlist following a .VAR control may contain parameter expression enclosed with curly braces. E.g.
.VAR resval = { 1K } |
R1 1 2 {resval * 2} |
Parameters may be passed to subcircuits via the subcircuit call. The syntax is:
Xxxx nodes subname vars: param1=value1 param2=value2 ... |
The .IF control may be used to define lines that are passed to the output only if specified conditions are met. The syntax is as follows:
.IF {expression} |
netlist lines |
... |
[.ELSE |
netlist lines |
...] |
.ENDIF |
expression may be any valid arithmetic expression and may refer to previously defined parameters including those passed through a subcircuit call.
The preprocessor may be instructed to output a repeated sequence of lines using the .WHILE control. The syntax is:
.WHILE {expression} [max_loop_count] |
netlist lines |
... |
.ENDWHILE |
The block between .WHILE and .ENDWHILE will be repeated as long as expression is non-zero up to a maximum of max_loop_count times. If max_loop_count is omitted it takes a default value of 100. max_loop_count is intended as a safety measure to prevent an endless loop from filling the user's fixed disk to its capacity.
|