Product Documentation
Spectre Circuit Simulator Reference
Product Version 23.1, September 2023

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.

For example:

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.

Examples of pattern matching

For more information, see The Save Statement in the Spectre Classic Simulator, Spectre APS, Spectre X, and Spectre XPS User Guide.


Return to top
 ⠀
X