next up previous contents index
Next: The alterf Command Up: Simulation Control Commands Previous: The ac Command   Contents   Index


The alter Command

The alter command allows circuit parameters to be changed for the next simulation run.

alter [device_list , param [=] value [param [=] value ... ]]
The parameters will revert to original values on subsequent runs, unless the alter command is reissued.

If given without arguments, a list of previously entered alterations of the current circuit, to be applied in the next analysis run, is printed. List entries may have come from previously given alter commands, or from assignments to the @device[param] special vectors.

The device_list is a list of one or more device or model names found in the circuit. The names are separated by white space, and the list is terminated with a comma. Following the comma is one or more name/value pairs, optionally an equal sign can appear between the two tokens. The name is a device or model keyword, which should be applicable to all of the names listed in the device_list. Note that this probably means that the device_list can contain device names or models, but not both. The device and model keywords can be obtained from the show command.

The alter command can be issued multiple times, to set parameters of devices or models which can't be intermixed according to the rule above.

The device_list can contain ``globbing'' (wild-card) characters with similar behavior to globbing (global substitution) in the WRspice shell. Briefly, `?' matches any character, '*' matches any set of characters or no characters, ``[abc]'' matches the characters `a', `b', and `c', and ``a{bc,de}'' matches ``abc'' and ``ade''.

When the next simulation run of the current circuit is started, the given parameters will be substituted. Thus, the show command, if given before the next run, will not show the altered values. The internal set of altered values will be destroyed after the substitutions.

Examples:

alter R2, resistance=50
alter c{1,2,3}, capacitance 105p


next up previous contents index
Next: The alterf Command Up: Simulation Control Commands Previous: The ac Command   Contents   Index
Stephen R. Whiteley 2022-09-18