.KEEP signal_spec [signal_spec ...]
This statement tells the simulator what values to store during a simulation. By default all signals at the top level and defined inside a hierarchical subcircuit are saved. .KEEP may be used in conjunction with some .OPTIONS settings to increase or reduce the data saved.
signal_spec | /TOP | /SUBS | /NOV | /NOI | /NODIG | /INTERNAL | *V | *I | *D | **V | **I | **D | subref.*V | subref.*I | subref.*D | subref.**V | subref.**I | subref.**D | ^wildcard_filter | signal_name | ||||||||
subref | Sub-circuit reference | ||||||||
/NOV | Don't store top level (i.e. not in a subcircuit) voltages. Equivalent to ".OPTIONS KeepNov" | ||||||||
/NOI | Don't store top level currents. Equivalent to ".OPTIONS KeepNoi" | ||||||||
/NODIG | Don't store top level digital data. Equivalent to ".OPTIONS KeepNod" | ||||||||
/SUBS | Store all subcircuit data. Equivalent to ".OPTIONS KeepAll" | ||||||||
/TOP | Overrides /subs. This is to inhibit storing signals in child schematics in hierarchical designs. Equivalent to ".OPTIONS KeepTop" | ||||||||
/INTERNAL | Save all internal device values. Some devices have internal nodes or sources. For example the bipolar transistor has internal nodes to implement terminal resistance. These internal values are not usually saved but may be by specifying /INTERNAL. Equivalent to ".OPTIONS KeepInternal" | ||||||||
^wildcard_filter |
General specification that selects values to store based on their name alone. Would usually use one of the special characters '*' and '?'. '*' means 'match one or more characters' while '?' means 'match a single character'. Some examples:
|
||||||||
*V | Store all top level voltages. This is actually implicit and need not be specified at the top level of the netlist. It can be usefully used in sub-circuit definitions - see notes. | ||||||||
*I | Store all top level currents. This is actually implicit and need not be specified at the top level of the netlist. It can be usefully used in sub-circuit definitions - see notes. | ||||||||
*D | Store all top level digital data. This is actually implicit and need not be specified at the top level of the netlist. It can be usefully used in sub-circuit definitions - see notes. | ||||||||
**V | Store all voltages including those inside sub-circuits descending to all levels | ||||||||
**I | Store all currents including those inside sub-circuits descending to all levels | ||||||||
**D | Store all digital data including those inside sub-circuits descending to all levels | ||||||||
subref.*V | Store all voltages within sub-circuit subref excluding voltages within children of subref. | ||||||||
subref.*I | Store all currents within sub-circuit subref excluding currents within children of subref. | ||||||||
subref.*D | Store all digital data within sub-circuit subref excluding digital data within children of subref. | ||||||||
subref.**V | Store all voltages within sub-circuit subref including voltages within children of subref descending to all levels. | ||||||||
subref.*I | Store all currents within sub-circuit subref including currents within children of subref descending to all levels. | ||||||||
subref.*D | Store all digital data within sub-circuit subref including digital data within children of subref descending to all levels. | ||||||||
signal_name | Explicit voltage or current. |
In this topic:
A number of option settings are available to control data output. These can be used in conjunction with .KEEP statements to define what data is saved. The Option settings are defined in the table below:
Option Name | Description |
KeepNone | No data is saved except signals explicitly defined using .KEEP or .GRAPH. Takes precedence over all other keep options |
KeepNov | No voltages will be saved except signals explicitly defined using .KEEP or .GRAPH. Takes precedence over other options except KeepNone |
KeepNoi | No currents will be saved except signals explicitly defined using .KEEP or .GRAPH. Takes precedence over other options except KeepNone |
KeepNod | No digital signals will be saved except signals explicitly defined using .KEEP or .GRAPH. Takes precedence over other options except KeepNone |
KeepAll | All data saved including data inside subcircuits. Does not enable saving of internal data (use KeepInternal) or semiconductor AC currents (use KeepAllAci). |
KeepTop | Disables saving of subcircuit signals |
KeepAllAci | Save currents in semiconductor devices for AC analysis |
KeepInternal | Save device internal signals |
KeepSubcktDepth | Limits saving of data in subcircuits to the specified level. E.g. KeepSubcktDepth=2 will save data in top level, first level subcircuits and second level subcircuits |
KeepQuotaFactor | Number between 0.0 and 1.0 restricts data output following precedence rules. 0.0 will save no data whereas 1.0 will save all data as defined by other options. KeepQuotaFactor is applied after all other keep options. Note that the factor is an estimate. |
Default with no Keep options is to save all top level data and all signals inside hierarchical subcircuits. Data inside non-hierarchical subcircuits are not saved.
.OPTIONS KeepNone
Save all data except device internals and semiconductor currents in AC analyses. Includes data inside subcircuits and hierarchies:
.OPTIONS KeepAll
Save everything including device internals and semiconductor currents in AC analyses:
.OPTIONS KeepAll KeepAllAci KeepInternal
Don't save currents:
.OPTIONS KeepNoi
Save signals in the top level and the first level in the hierarchy:
.OPTIONS KeepSubCktDepth=1
Save about 20% of all data:
.OPTIONS KeepQuotaFactor=0.2
Store only voltages and currents in sub-circuit X1 excluding descendants.
.OPTIONS KeepNone .KEEP X1.*v X1.*i
Store only voltages and currents in sub-circuit X1 including descendants.
.OPTIONS KeepNone .KEEP X1.**v X1.**i
Store voltages within U3.U12 along with VOUT and VIN
.OPTIONS KeepNone .KEEP U3.U12.*v VOUT VIN
Store all top level voltages and currents in U7
.OPTIONS KeepNone .KEEP U7.*i
SIMetrix uses subcircuits to implement hierarchical schematics. Subcircuits are also used in other ways, for example to implement device macro models. SIMetrix is able to distinguish between subcircuits used for hierarchies and other subcircuits. It does this by placing a comment line below the .SUBCKT line as shown below:
.subckt fastamp VOUTP VN VINP VP VINN VOUTN *#hierarchy ... .ends
The comment line *#hierarchy marks the subcircuit as part of the schematic hierarchy. The schematic editor's netlist generator automatically adds *#hierarchy lines as appropriate.
◄ .INC | .LOAD ▶ |