Shared reference catalog
Constructs common to all dialects. Dialect pages overlay these when a matching (kind, name) exists.
Source of truth: reference/_shared/.
Index
| Name | Kind | Summary |
|---|---|---|
.ac | directive | Small-signal AC frequency analysis |
.dc | directive | DC sweep analysis |
.end | directive | End of netlist |
.ends | directive | End a subcircuit definition |
.ic | directive | Set initial node voltages |
.include | directive | Include another netlist file |
.model | directive | Define a device model |
.op | directive | DC operating-point analysis |
.param | directive | Define a named parameter |
.print | directive | Print analysis results as a table |
.subckt | directive | Begin a subcircuit definition |
.temp | directive | Set circuit temperature(s) |
.tran | directive | Transient analysis |
C | element | Capacitor |
R | element | Resistor |
X | element | Subcircuit instance |
Directives
.ac
shared.directive.ac — Small-signal AC frequency analysis
.ac {LIN|DEC|OCT} np fstart fstop
| Parameter | Description | Units |
|---|---|---|
| `LIN | DEC | OCT` |
np | Number of points (LIN) or points per decade/octave (DEC/OCT). | |
fstart | Start frequency. | Hz |
fstop | Stop frequency. | Hz |
Examples
.ac DEC 10 1k 1G.ac LIN 100 1 1Meg
.dc
shared.directive.dc — DC sweep analysis
.dc srcname start stop step
| Parameter | Description | Units |
|---|---|---|
srcname | Independent source, parameter, or TEMP to sweep. | |
start | Sweep start value. | |
stop | Sweep stop value. | |
step | Increment between points. |
Examples
.dc V1 0 5 0.1.dc TEMP 0 100 25
.end
shared.directive.end — End of netlist
.end [comment]
| Parameter | Description | Units |
|---|---|---|
comment | Optional trailing comment. |
Examples
.end.end my_circuit
.ends
shared.directive.ends — End a subcircuit definition
.ends [name]
| Parameter | Description | Units |
|---|---|---|
name | Optional subcircuit name; should match .subckt. |
Examples
.ends.ends buffer
See also: shared.directive.subckt
.ic
shared.directive.ic — Set initial node voltages
.ic V(node)=value [V(node2)=value2 ...]
| Parameter | Description | Units |
|---|---|---|
V(node) | Node voltage to initialize. | V |
Examples
.ic V(out)=0.ic V(in)=1.8 V(out)=0
.include
shared.directive.include — Include another netlist file
.include 'filename'
| Parameter | Description | Units |
|---|---|---|
filename | Path to the file to include (quotes recommended). |
Examples
.include 'models.inc'.inc 'corners/tt.sp'
See also: shared.directive.model
.model
shared.directive.model — Define a device model
.model mname type (param=value ...)
| Parameter | Description | Units |
|---|---|---|
mname | Model name referenced by instances. | |
type | Model type (e.g. NMOS, PMOS, D, NPN). |
Examples
.model nmos NMOS (VTO=0.7)
.op
shared.directive.op — DC operating-point analysis
.op
Examples
.op
Computes node voltages and bias points. Many simulators also print an operating point before .tran / .ac unless UIC is used.
.param
shared.directive.param — Define a named parameter
.param name=value [name2=value2 ...]
| Parameter | Description | Units |
|---|---|---|
name | Parameter identifier. | |
value | Numeric value or expression. |
Examples
.param rload=1k.param pi=3.14159
shared.directive.print — Print analysis results as a table
.print {DC|TRAN|AC} ov1 [ov2 ...]
| Parameter | Description | Units |
|---|---|---|
| `DC | TRAN | AC` |
ov | Output variable, e.g. V(node), I(Vsrc), VM(node). |
Examples
.print TRAN V(out) I(Vdd).print DC V(2) V(3)
.subckt
shared.directive.subckt — Begin a subcircuit definition
.subckt name n1 [n2 ...] [params: p=val ...]
| Parameter | Description | Units |
|---|---|---|
name | Subcircuit name. | |
n1... | External port nodes in order. |
Examples
.subckt buffer in out.subckt inv in out
See also: shared.directive.ends
.temp
shared.directive.temp — Set circuit temperature(s)
.temp t1 [t2 ...]
| Parameter | Description | Units |
|---|---|---|
t1 | Temperature in Celsius (additional values run multi-temp analysis). | °C |
Examples
.temp 25.temp 0 25 85
.tran
shared.directive.tran — Transient analysis
.tran tstep tstop [tstart [tmax]] [UIC]
| Parameter | Description | Units |
|---|---|---|
tstep | Suggested printing / sampling increment. | s |
tstop | Final simulation time. | s |
tstart | Optional start of printing. | s |
tmax | Optional maximum timestep. | s |
UIC | Use initial conditions. |
Examples
.tran 1n 100n.tran 1u 1m 0 10u UIC
Elements
C
shared.element.C — Capacitor
Cname n1 n2 value [params...]
| Parameter | Description | Units |
|---|---|---|
n1 | Positive node. | |
n2 | Negative node. | |
value | Capacitance. | F |
Examples
C1 out 0 1p
R
shared.element.R — Resistor
Rname n1 n2 value [params...]
| Parameter | Description | Units |
|---|---|---|
n1 | Positive node. | |
n2 | Negative node. | |
value | Resistance. | ohm |
Examples
R1 in out 1kRload out 0 50
X
shared.element.X — Subcircuit instance
Xname n1 [n2 ...] subckt_name [params...]
| Parameter | Description | Units |
|---|---|---|
n1... | Nodes connected to subcircuit ports. | |
subckt_name | Name of a .subckt definition. |
Examples
X1 a b buffer