Output Selections (save)
Description
The save statement indicates that the values of specific nodes or signals must be saved in the output file. It works in conjunction with the save parameter for most analyses. The output file is written in Cadence Parameter Storage Format (PSF), or in Nutmeg/SPICE3 format, which is controlled by a command-line argument or a global option (see the options statement). See options help for the complete list of supported formats. An appropriate postprocessor should be used to view the output, generate plots, or do any further processing.
Definition
save X[:param] ... [depth=num] [sigtype=node|dev|subckt|all] [devtype=component_type] [subckt=subckt_master] [exclude=[wildcard_patterns_list]] [compression=no|yes] [ports=yes|no] [filter=none|rc] [probelvl=num] time_window=[t1 t2 t3 t4 ...]
The save statement takes a list of signals followed by some optional parameters as an argument. X can be a node, a component, or a subcircuit and param can be a component output parameter or a terminal index. To specify a class of signals, use the pattern matching character * for any string and ? for any character. The parameters control pattern matching. depth controls the depth of pattern matching and, by default, matches signals at all hierarchical levels. sigtype with the default value node defines the type of X. If sigtype=all, X can be a node, a component, or a subcircuit. devtype defines the component type and has no default value. subckt is used to save signals that are contained only in instances of a given subcircuit master. The signals matching a pattern from the list specified with exclude are not saved. When subckt is given, the wildcard patterns in the save statement and the depth of pattern matching must be relative to the subcircuit master.
The concept of nodes for the save statement is generalized to signals where a signal is a value associated with a topological node of the circuit or some other unknown that is solved by the simulator, such as the current through an inductor or the voltage of the internal node in a diode. Topological nodes can be at the top level or in the subcircuit.
By default, the waveforms defined in the save statement are not compressed. Compression can be enabled globally for selected hierarchy levels in the transient statement (compression, complvl). Compression can also be enabled or disabled individually for each save statement. The compression settings in the save statement overwrite the compression settings in the transient statement.
time_window is used to specify the output time interval for transient analysis.Signals in [t1 t2] and [t3 t4]... are outputted.
The ports parameter saves the subckt ports names as well if yes is specified. The default value is no. The filter parameter works with wildcarding to filter out the nodes that connect only to parasitics, if rc is specified. The default value is none.
To probe terminal currents hierarchically at a specified depth, specify the depth using the probelvl option to obtain the terminal current for all terminals connected within that depth.
save 7 out OpAmp1.comp M1:currents D3:oppoint L1:1 R4:pwr
specifies that node 7, node out, node comp in subcircuit OpAmp1, the currents through the terminals of M1, the oppoint information for diode D3, the current through the first terminal of L1, and the instantaneous power dissipated by R4 should be saved. These outputs are saved in addition to any outputs specified by the save parameter for the analysis.
To specify a component terminal current, specify the name of the component and the name or the index of the terminal separated by a colon. If currents is specified after the component and the colon, all the terminal currents for the component are saved unless the component has only two terminals, in which case only the current through the first terminal is saved. Current is positive if it enters the terminal flowing into the component.
If a component name is followed by a colon and oppoint, then the operating point information associated with the component is computed and saved. If the colon is followed by an operating point parameter name (see each component for list of operating point parameters), then the value of that parameter is output.
If only a component name is given, all available information about the component, including the terminal currents and the operating point parameter values, is saved.
-
save x*.*1 depth=3
Saves the voltages of all nodes from level 2 to level 3 whose name starts withxand ends in1. For example,x1.n1,x1.x2.x3but notx1.x2.x3.x4. -
save x*.*1 sigtype=subckt
Saves all terminal currents of subcircuits from level 2 and above whose name starts withxand ends in1. For example,x1.x21:2, x1.x2.x31:3. -
save *:c devtype=bjt
Saves all collector currents -
save * subckt=inv
Saves the voltages of all nodes in the instances of the subcircuitinv. For example,X1.n1for an instanceX1ofinvbut notnet091at the top-level -
save * exclude=[X1* X2*]
Saves the voltages of all nodes excluding the ones whose names start withX1orX2. For example,net091,X0.res3.n2but notX21.res3.n2. -
save X1:A probelvl=3
Saves all terminal currents that are connected to terminalAof subcircuitX1, till the third-level depth. -
s
ave nA:currents probelvl=2
Saves the currents of all terminals that are connected to nodenA, till the second-level depth. -
save N1 time_window=[1m 2m 3m 4m]
Save node N1 from 1ms to 2ms and 3ms to 4ms. -
save N1 time_window=[1m 2m]
save N1 time_window=[0.5m 2.5m 3m 4m]
Save nodeN1from 0.5ms to 2.5ms and 3ms to 4ms -
save N1 time_window = [ 1m 2m]
Saves all waveforms starting with N for entire simulation time, except N1 which is only saved from 1ms to 2ms.
For more information, see The Save Statement in the Spectre Classic Simulator, Spectre APS, Spectre X, and Spectre XPS User Guide.
Return to top