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


The save Command

The save command can be used to save a particular set of outputs from a simulation run.

save [all] [nodename ...]
The command will save a set of outputs, the rest will be discarded. If a node has been mentioned in a save command, it will appear in the working plot after a run has completed, or in the rawfile if WRspice is run in batch mode (in this case, the command can be given in the input file as .save ...). If a node is traced or used in an iplot it will also be saved. If no save commands are given, all nodes will be saved. The save can be deleted with the delete command, or from the panel brought up by the Trace button in the Tools menu.

If a save command is given at the prompt in interactive mode, it is placed in a global list, and activity will persist until deleted (with the delete command). If the command is given in a file, the command will be added to a list for the current circuit, and will apply only to that circuit. Thus, for example, a WRspice file can contain lines like

*# save v(1) ...
and the action will be performed as that circuit is run, but the ``save v(1) ...'' directive will not apply to other circuits.

One can save ``special'' variables, i.e., device/circuit parameters that begin with `@'. If a device parameter is a list type, only a single component can be saved. The single component can be specified with an integer, or with a vector name that evaluates to an integer. For example, the initial condition values for a Josephson junction can be accessed as a list, say for a junction named ``b1'', one can specify

@b1[ic,0] or @b1[ic][0]
which are equivalent, and each the same as @b1[vj], the initial voltage. Similarly,
@b1[ic,1] or @b1[ic][1]
are equivalent, each being the same as @b1[phi], the initial phase.

One can also have

let val = 1                (this vector is defined somewhere)
@b1[ic,val] or @b1[ic][val]
Thus, commands like
save @b1[ic,0]
or equivalently
save @b1[ic][0]
are accepted. Note that ``save @b1[ic]'' is the same as ``save @b1[ic,0]''. The ``0'' can be an integer, or a vector name that evaluates to an integer.


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