Element Reference
Supported circuit elements, source models, and adapter-facing element behavior.
This chapter is the canonical supported-subset reference for Circuit elements, directives, models, validation behavior, and limitations.
Element Reference
This section lists the accepted element statements and their current syntax. Parsing support and analysis-domain support are distinct: frequency-dependent blocks are AC-only, while nonlinear devices and switches are intended for the transient solver.
Passive Elements
R - Resistor
Rname n+ n- value
Value in ohms. Positive, non-zero.
L - Inductor
Lname n+ n- value
Value in henries.
C - Capacitor
Cname n+ n- value
Value in farads.
K - Mutual Inductor Coupling
Kname L1 L2 coupling_coefficient
Coupling coefficient from -1 through 1. References two inductor instance names.
Independent Sources
V - Independent Voltage Source
Vname n+ n- [DC dc_value] [waveform]
I - Independent Current Source
Iname n+ n- [DC dc_value] [waveform]
Waveform functions: SIN, PULSE, PWL, EXP, SFFM, AM. Parameter
order follows standard SPICE convention.
B - Behavioral Source
Bname n+ n- V=<supported waveform expression>
Bname n+ n- I=<supported waveform expression>
The current implementation accepts the supported source waveform functions; it is not a general SPICE expression evaluator.
Controlled Sources
E - VCVS (Voltage-Controlled Voltage Source)
Ename n+ n- nc+ nc- voltage_gain
G - VCCS (Voltage-Controlled Current Source)
Gname n+ n- nc+ nc- transconductance
F - CCCS (Current-Controlled Current Source)
Fname n+ n- vsource_name current_gain
H - CCVS (Current-Controlled Voltage Source)
Hname n+ n- vsource_name transresistance
Semiconductor Devices
D - Diode
Dname anode cathode [is=val] [n=val] [vt=val]
Shockley diode model with the listed positive inline parameters.
Q - BJT (Bipolar Junction Transistor)
Qname C B E [S] model_name [AREA area]
Gummel-Poon model. References a .model card of type NPN or PNP.
M - MOSFET
Mname D G S B model_name [W w] [L l] [M multiplier]
LEVEL=1 only (Shichman-Hodges, 1968). Unsupported LEVEL values: LEVEL 2 (Grove-Frohman), LEVEL 3 (semi-empirical), LEVEL 6 (MOS6), LEVEL 49 (BSIM3v3), LEVEL 54 (BSIM4). If you need BSIM accuracy, use an NPORT or S-parameter block to import foundry-characterized data.
Switches
S - Voltage-Controlled Switch
Sname n+ n- nc+ nc- model_name [ON|OFF]
.model type SW with RON, ROFF, VON, VOFF.
W - Current-Controlled Switch
Wname n+ n- vsource_name model_name [ON|OFF]
.model type CSW.
Frequency-Domain Elements
NPORT - Touchstone Import
NPORT name p1 n1 [p2 n2 ...] FILE=path [TYPE=Y|Z]
Supports Touchstone Y/Z datasets such as .ynp, .znp, .y2p, and .z2p.
S datasets are not accepted by NPORT. AC analysis only.
S-Parameter Block
Sname nports p1 n1 [p2 n2 ...] FILE=path [Z0=value]
S-parameter block referencing a Touchstone .sNp or .ts file. This syntax
is distinguished from a voltage-controlled switch because the second token is
the positive port count and a Touchstone file token is present. AC analysis
only.
Power-System Elements
XTAPZ - Tapped Series Impedance
XTAPZ name bus1 bus2 tap=value r=value x=value [phase=deg] [freq=hz]
tap, r, and x are required key/value options. tap and freq must be
positive; phase defaults to zero and freq defaults to 60 Hz.
Subcircuits
.SUBCKT / .ENDS / X
.SUBCKT name node1 node2 ...
...
.ENDS
Xinstance node1 node2 ... subckt_name
Subcircuits are expanded (flattened) at parse time.
Directives Ignored with a Parse Warning
These SPICE directives are recognized but produce a parse warning:
.temp, .ic, .nodeset, .option, .options, .dc, .op, .tf,
.meas, .measure, .plot, .func, .global,
.if/.elseif/.else/.endif,
.title, .csparam
Unsupported Elements
These produce a parse error with the element name for identification:
| Kind | Name | Alternative |
|---|---|---|
| J | JFET | Use M (MOSFET) or controlled sources |
| T | Lossless transmission line | Use lumped RLC equivalents |
| O | Lossy transmission line | Use lumped RLC equivalents |
| U | Uniform RC line | Use discrete RC ladder |
| Z | MESFET (GaAs FET) | Use M (MOSFET) |
NPORT transient analysis, MOSFET LEVEL > 1, and saturable magnetics are also unsupported.
