Netlist Syntax¶
Netlist lines¶
Like with SPICE, a netlist description is organized in lines. The syntax for the symbolic simulator is SPICE compatible.
Since there exist various SPICE dialects, and since symbolic simulation requires a more complex handling of parameters in sub circuits and models, the correct SLiCAP netlist syntax has been described in the following sub sections.
Breaking long lines¶
Long input lines can be split into a multiple of shorter lines. Lines starting with a plus sign + will be added to the previous line; without the plus sign itself. Leading and trailing white space characters of netlist lines are ignored.
Comment¶
Any line starting with an asterix: * is considered as comment and will not be processed by the netlist parser. Any input following a semicolon ; is also considered as comment and ignored.
Numbers¶
Numeric values can be given in scientific notation: 0.001 = 1E-3 = 1e-3 or use metric prefixes: 2.2k = 2200. The following metric prefixes can be used:
| name | Symbol | Base 10 value |
|---|---|---|
| peta | P | \(10^{15}\) |
| tera | T | \(10^{12}\) |
| giga | G | \(10^{9}\) |
| mega | M | \(10^{6}\) |
| kilo | k | \(10^{3}\) |
| mili | m | \(10^{-3}\) |
| micro | u | \(10^{-6}\) |
| nano | n | \(10^{-9}\) |
| pico | p | \(10^{-12}\) |
| femto | f | \(10^{-15}\) |
| atto | a | \(10^{-18}\) |
Please noitice these prefixes are case sentitive, and MEG and meg are not recognized as metric prefixes. This differs from the standard SPICE syntax.
From version 0.4 build 1350 the expression syntax checker can handle parameter names identical to metric prefixes.
Expressions¶
As with SPICE, expressions should be placed between curly brackets: {< myExpression >}. Metric prefixes as well as white space characters and line break characters: +, can be included in expressions.
Title line¶
The title definitions differs from SPICE:
The first word or double quoted string of an uncommented line of the netlist file is considered the title of the main circuit. If a title comprises several words separated by white space characters it should be placed between double quotation marks: ". Examples are listed below.
* myCircuit ; a comment, not interpreted as title.
* Lines with elements or directives
myCircuit ; a title without spaces
* Lines with elements or directives
"My first circuit" ; a tittle including spaces
* Lines with elements or directives
.include line¶
Library files containing model definitions and/or sub circuit definitions need to be included in the search path with the aid of the .include instruction. Multiple library definitions can be included in one .include line. Library files containing white space characters should be places between double quotation marks: ". The search path for the library file is specified by the MuPAD global variable LIBRARYPATH in the SLiCAPini.mu file. Library definitions should be declared before called. A call to a library occurs if a model name or sub circuit name occurs in an element definition while that model or sub circuit is not specified by a .model or a .subckt definition in the netlist itself. Valid library specifications look like:
.include myLibrary.lib "my very own circuits.lib"
.subckt … .ends lines¶
Although SLiCAP is intended for the design and the analysis of rather small circuits, it allows you to use an unlimited hierarchy. It also checks for hierarchical loops. The structure of a sub circuit definition is as follows:
.subckt < name >
+ < node1 > < node2 > ( < node3 > ... )
+ ( < param1 = value1 | {expr1} param2 = value2 | {expr2} > ...)
* circuit lines
.ends
The input field name and a number of fields with the node names node1 node2 ... are required. Each parameter definition consists of a parameter name followed by an equal sign and a value or an expression. Parameter definitions should not be placed between brackets ().
Passing sub circuit parameters¶
Parameters specified in the .subckt definition line are passed to the parent circuit. Other parameters used in element expressions and in parameter definitions between the .subckt and its corresponding .ends input lines remain local. Parameter values can be numerical or may be expressions comprising other parameters. Expressions need to be placed between curly brackets: {< myExpression >}. Input lines between the .subckt and its corresponding .ends instruction can be of any type. Hence, nesting of sub circuits is allowed.
Below an example of a netlist file with a sub circuit definition and a call to this sub circuit. The netlist file with the name subckt.cir is stored in the project directory. Please notice that this file only demonstrates the use of sub circuits with parameters. It is not at all a complete circuit description.
testCircuit
.subckt myOpamp in+ in- out GND A_0 = {A_1} tau={t} R_o = 0.5k
E1 1 GND in+ in- {A_0/(1+s*tau)}
R1 1 out {R_o}
C1 in+ in- {C_i}
.param C_i=10p R_o=100
.ends
X1 1 2 3 0 myOpamp tau = {t_a} R_o = 200
.param A_1 = {g_m*Z_t} t_a = 1m g_m=10m Z_t=100M
.end
Parameters given in the .subckt line are passed to the parent circuit. They can be redefined in the sub circuit call. Hence, A_0, tau and R_o become parameters in the parent circuit. They can been assigned new values in the sub circuit call, in this example, this is the line:
X1 1 2 3 0 myOpamp tau = {t_a} R_o = 200
or in parameter definition lines. In this example this is the line:
.param A_1 = {g_m*Z_t} t_a = 1m g_m=10m Z_t=100M
All other parameters in expressions and in parameter definitions of the sub circuit remain local. This will be done by adding the device name of the calling device as suffix to the parameter name:
- For nodes a dot
.will be placed between the node name and the device name. - For parameters the subscript sign
_will be placed between the parameter name and the device name.
All nodes except the connecting nodes and the ground node "0" are local.
The results of the expansion of the above circuit can be viewed with the script below. It shows the elements and the parameters of the expanded circuit.
clear all;
initProject('passParams', mfilename);
checkCircuit('subckt');
htmlPage('Circuit data');
netlist2html('subckt');
elementData2html();
params2html();
stophtml(); % This closes the circuit index page
stophtml(); % This closes the project index page
The HTML output shows the circuit expansion:
.model line¶
Models can be defined in a line starting with the keyword .model (not case sensitive). The syntax for a .model line is:
.model < modelName > < modelType >
+ ( < param1 = value1 | {expr1} > < param2 = value2 | {expr2} > ...)
The fields modelName and modelType are required. Parameter definition fields are optional. If no parameter definitions are given, defaults values are assumed. A model name should not start with a number. This would result in misinterpretation by the netlist parser. Hence, a model name like 2n3904 could be interpreted as 2e-9 followed by 3904 which yields a syntax error in a value. Such errors can be prevented using a letter as first character in a model name, e.g. Q2n3904. This is common practice in SPICE.
Parameter definitions should not be placed between brackets (). This may differ from some SPICE dialects.
Passing model parameters¶
Passing model parameters tworks similar as passing sub circuit parameters. This is elucidated in the example below. Consider hereto the following netlist file with a model definition:
modelTest
I1 0 b 1u
R1 c 0 1k
Q1 c b 0 0 Q2N3904 gm={I_c*q_e/(k_B*T_A)} gpi={I_c*q_e/(k_B*T_A)/beta_AC}
.param I_c=2m beta_AC={beta_DC} beta_DC=100
.model Q2N3904 QV
.end
The model QV is that of a 4-terminal vertical bipolar transistor. It can be used for a three terminal transistor by connecting the last two terminals (emitter and substrate) to the same circuit node. The built-in model for this device has the following parameters with their default values: cpi = 0, cbc = 0, cbx = 0, cs = 0, gpi = 400e-6, gm = 40e-3, go =0, rb = 0, gbc = 0
The above model definition for the Q2N3904 overrides the values of gpi and gm, all other parameters obtain their default value. The input resistance and the transconductance of this transistor have been redefined as a function of the collector current I_c. This current has been defined in the line: .param I_c=2m beta_AC=beta_DC beta_DC=100
The following code displays the circuit data on an HTML page.
clear all;
initProject('modelTest', mfilename);
checkCircuit('modelTest');
htmlPage('Circuit data');
netlist2html('modelTest');
elementData2html();
params2html();
stophtml(); % This closes the circuit index page
stophtml(); % This closes the project index page
The HTML output below shows the netlist and the circuit expansion:
Please notice the use of the built-in parameters T, k and q.
.param line¶
Parameter definition lines are used to assign numerical values or expressions to circuit parameters. At least one parameter definition should be given in a parameter definition line. The syntax for a parameter definition line is:
.param < param1 = value1 | {expr1} > ( < param2 = value2 | {expr2} ... )
Parameters defined in parameter definition lines in sub circuits are local for that sub circuit unless these parameters are passed to the parent circuit.
Device definition lines¶
The actual circuit is specified by the device definition lines. The syntax for these lines is:
< deviceID > < node1 | ref1 > < node2 | ref2 > ( < node3 > ...) >
+ < value | {expr} | modelName >
+ ( < param1 = value1 | {expr1} > < param2 = value2 | {expr2} > ...)
A device definition line starts with the device identifier field: < deviceID > . The first character of name is interpreted as the device type identifier. The device type identifier is not case sensitive.
An overview of device types can be found in section LINK.
Other required fields are: at least two fields with node names or deviceIDs of other devices. If no < value | {expr} | modelName > field is specified, a default model with default parameter valuess is
assumed. Node names and model names are case sensitive character strings.
A model name is a character string that cannot be interpreted as a number. Expressions need to be placed between curly brackets: {}. A coupling factor device has two references to inductors instead of two nodes.
Parameter definitions can only be given in combination with a model name. If no model parameters are specified, values from a .model line are assumed. If such a line does not exist, default parameter values are assumed.
.end line¶
A line starting with .end concludes the netlist input. Lines following this line are ignored.
Devices and built-in models¶
This section gives an overview of the devices and their built-in models with their parameters. SLiCAP distinguishes two kinds of models:
- Models that have an associated matrix stamp.
- Models that will be expanded into models with an associated matrix stamp.
Model data will be listed in tables. The fields in these tables have the following meaning:
name: the name of the model. This name is associated with the implementation type:
type: the implementation type of the model:a
stamp: a matrix stamp is associated with the modelb
expansion: the model is expanded into elements with models that have associated matrix stamps3.
Ii:TRUEif a dependent variable for an input current is added to the vector with dependent variables else:FALSE. This field applies only for models withtype=stamp. The name of this current is the concatenation of two strings:a
"Ii_"and the device name for two-port elements with model typeHandHZb
"I_"and the device name for twoport elements with model typeF
Io:TRUEif an output current is added to the vector with dependent variables, else:FALSE. This field applies only for models withtype=stamp. The name of this current is the concatenation of two strings:a
"Io_"and the device name for two-port elements that have model typeE,EZ,G,H,HZorNb
"I_"and the device name for one port elements with model typeL,r,VandZ
Valid model parameters and their default values are listed in the subsequent rows of the table:
param: the name of the parameter (case sensitive)value | {expression}: the default value or expression for the model parameterLaplace: a booleanTRUE | FALSEindicating if the Laplace variablesis allowed in the device expressiondescription: a description of the parameter
C: Capacitor¶
Below the syntax and the symbol for a capacitor and the matrix stamp for model C.
Model C¶
Parameters model C¶
name description default Laplace value capacitance 1 FALSE
Examples¶
C1 nodeP nodeN 100n ; Capacitor of 100n between nodeP and nodeN
C1 nodeP nodeN C value = 100n ; Same as above
C1 nodeP nodeN {1/tau/R} ; Capacitance as an expression
C1 nodeP nodeN C value = {1/tau/R} ; Same as above
C1 nodeP nodeN myCap ; Same as above with a .model line
.model myCap C value={1/tau/R}
D: Diode¶
Below the syntax, the symbol and the small-signal model expansion for the a diode: model D.
Model D¶
Parameters model D¶
name description default Laplace gd conductance 1 FALSE cd capacitance 0 FALSE rs series resistance 0 FALSE
Examples¶
D1 nodeA nodeC D ; Diode anode connected to nodeA cathode to nodeC and default parameters.
D1 nodeA nodeC D1N4148
+ gd = {q_e*I_D/K_b/T_A}
+ cd = {q_e*I_D/K_b/T_A/2/PI/tau_F}
+ rs = 25
.model D1N4148 D
.param tau_F = 4n I_D = 1m
E: Voltage-controlled voltage source¶
SLiCAP has two models for voltage-controlled voltage sources: model E and model EZ. The later one includes a series output impedance but has a compact matrix stamp.
Models¶
name description type Ii Io E VCVS stamp FALSE TRUE EZ VCVS with Z-series stamp FALSE TRUE
Model E¶
Parameters model E¶
name description default Laplace value voltage gain 1 TRUE
Model EZ¶
Parameters model EZ¶
name description default Laplace value voltage gain 1 TRUE zs series impedance 1 TRUE
Examples¶
E1 outP outN inP inN 1M
E1 outP outN inP inN {1M/(1 + s/2/PI/f_-3dB)}
E1 outP outN inP inN EZ
+ value = {A_0/(1 + s*tau)}
+ zs = {R_out*(1 + s*L_out/R_out}
E2 outP outN inP inN simpleOpamp
.model simpleOpamp EZ
+ value = {A_0/(1 + s*tau)}
+ zs = {R_out*(1 + s*L_out/R_out}
F: Current-controlled current source¶
Below the syntax, the symbol and the matrix stamp for a CCCS: model F.
Model F¶
Please notice the independent variable \(I_{Fx}\) which is added to the vector of independent variables equals the product of the denominator of the current gain \(Df_s\) and the input current \(Ii_{Fx}\), rather than the input current.
name description type Ii Io F VCVS stamp TRUE FALSE
Parameters model F¶
name description default Laplace value current gain 1 TRUE
Examples¶
F1 outP outN inP inN 20
F1 outP outN inP inN {100/(1 + s/2/PI/f_-3dB)}
F1 outP outN inP inN F value={A_i/(1 + s*tau)}
F2 outP outN inP inN myCCCS
.model myCCCS F value = {A_i/(1 + s*tau)}
G: Voltage-controlled current source¶
SLiCAP has two models for voltage-controlled current sources, model ‘G’ for a complex transfer and model ‘g’ for a real transfer.
Model ‘G’ can be used for sources that need to be selected as loop gain reference variable according to the asymptotic-gain model. The transadmittance can be a function of the Laplace variable ‘s’. Model ‘g’ is intended to be used as conductance or transconductance and cannot be selected a loop gain reference variable.
Models¶
name description type Ii Io G VCGS stamp FALSE TRUE g VCGS stamp FALSE FALSE
Model G¶
Parameters model G¶
name description default Laplace value transadmittance 1 TRUE
Model g¶
Parameters model g¶
name description default Laplace value transconductance 1 FALSE
Examples¶
G1 outP outN inP inN 20m
G1 outP outN inP inN {1m/(1 + s/2/PI/f_-3dB)}
G1 outP outN inP inN G value = {A_y/(1 + s*tau)}
G2 outP outN inP inN myVCCS
.model myVCCS G valu e= {A_y/(1 + s*tau)}
G3 outP outN inP inN g value = 1m
G3 outP outN inP inN g value = {q*I_c/k/T}
H: Current-controlled voltage source¶
SLiCAP has two models for current-controlled voltage sources: model H and model HZ. The later one includes a series output impedance but has a compact matrix stamp.
Models¶
name description type Ii Io H CCVS stamp TRUE TRUE HZ CCVS with Z-series stamp FALSE TRUE
Model H¶
Parameters model H¶
name description default Laplace value transimpedance 1 TRUE
Model HZ¶
Parameters model HZ¶
name description default Laplace value transimpedance 1 TRUE zs series impedance 1 TRUE
Examples¶
H1 outP outN inP inN 1M
H1 outP outN inP inN {1M/(1 + s/2/PI/f_-3dB)}
H1 outP outN inP inN HZ
+ value = {R_T/(1 + s*tau)}
+ zs = {R_out*(1 + s*L_out/R_out}
H2 outP outN inP inN simpleTransimpedanceAmp
.model simpleTransimpedanceAmp HZ
+ value = {R_T/(1 + s*tau)}
+ zs = {R_out*(1 + s*L_out/R_out}
I: Independent current source¶
Below the syntax, the symbol and the matrix stamp for an independent current source: model I.
Model I¶
Parameters model I¶
name description default Laplace value Current (Laplace transform) 0 TRUE dc DC value [A] 0 TRUE dcvar Variance of DC value [A^2] 0 TRUE noise Noise current density [A^2/Hz] 0 TRUE
Examples¶
* Both definitions are equivalent:
I1 n1 n2 1m
I1 n1 n2 I value = 1m
Iin 0 input I value = {I_s} noise = 1e-24 dc=10n dcvar = 4e-18
.param I_s = {1m/s}; Step of 1mA starting at t=0
J: Junction FET¶
Like the PN diode, the JFET model J is expanded into network elements that have a matrix stamp.
Model J¶
Parameters model J¶
name description default Laplace cgs contactance 0 FALSE cdg capacitance 0 FALSE gm forward transconductance 1E-3 FALSE go output conductance 0 FALSE
Examples¶
J1 nodeD nodeG nodeS myJFET
.model myJFET J cgs=20p cdg=1p gm=15m go=500u
K: Coupling factor¶
Below the syntax, the symbol and the matrix stamp for a coupling between two inductors: model K.
Model K¶
Parameters model K¶
name description default Laplace value coupling factor 1 FALSE
Examples¶
L1 n1 n2 {L_a}
L2 n3 n4 {L_b}
k12 L1 L2 0.98
L: Inductor¶
Below the syntax, the symbol and the matrix stamp for an inductor: model L.
Model L:¶
Parameters model L¶
name description default Laplace value inductance 1 FALSE
M: 4-terminal MOS¶
SLiCAP has two models for 4-terminal MOS transistors. Model M for a single MOS transistor and model MD for a differential-pair MOS. The latter one facilitates the design and analysis of negative-feedback amplifiers in which one controlled source that models the gain of the differential-pair MOS can be selected as loop gain reference variable.
Models¶
name description type M Four-terminal MOS expansion MD Four-terminal diff. pair MOS expansion
Model M¶
Parameters model M¶
name description default Laplace cgs gate-source capacitance 0 FALSE cgb gate-bulk capacitance 0 FALSE cdg drain-gate capacitance 0 FALSE cdb drain-bulk capacitance 0 FALSE csb source-bulk capacitance 0 FALSE gm forward transconductance 1E-3 FALSE gb bulk transconductance 0 FALSE go output conductance 0 FALSE
Model MD¶
Parameters model MD¶
name description default Laplace cgg gate-gate capacitance 0 FALSE cdg drain-gate capacitance 0 FALSE cdd drain-drain capacitance 0 FALSE gm forward transconductance 1E-3 FALSE go output conductance 0 FALSE
Examples¶
Below three ways of defining a MOS in a circuit. The first example calls the mos model M with its default parameters and then overrides these parameters by local definitions in the call. The model parameter gm is passed as global parameter gm.
M1 D G S B M gm={g_m} gb = 150u go = 100u cgs = 0.2p cdg = 10f
The second example calls the model from a library file and redefines g_m as a global parameter.
M1 D G S B myMOS gm = {g_m}
.include myMOS.lib
The third example calls a model and its parameters. For a given process, geometry and device operating point, these small-signal parameters can be obtained from a SPICE simulation.
M1 D G S B M1
.model M1 M gm = 2m gb = 150u go = 100u cgs = 0.2p cdg = 10f
The next example shows the application of a differential-pair MOS.
M1 D1 D2 G1 G2 myDiffPairMOS
*parameters of the single MOS
.param g_m = 1m g_o = 100u c_gs = 0.2p c_dg = 10f c_db = 5f
*parameters of the diff. pair MOS
.model myDiffPairMOS MD
+ gm = {g_m/2}
+ go = {g_o/2}
+ cgg = {c_gs/2}
+ cdg = {c_dg}
+ cdd = {c_db/2}
O: Operational amplifier¶
SLiCAP has two built-in models for operational amplifiers:
- A small-signal model for a voltage-feedback operational amplifier: model OV
- A small-signal model for a current-feedback operational amplifier: model OC
Models¶
name description type OV Voltage-feedback OpAmp expansion OC Current-feedback OpAmp expansion
Model OV¶
Parameters model OV¶
name | description default Laplace cd differential-mode input capacitance 0 FALSE cc common-mode input capacitance 0 FALSE gd differential-mode input conductance 0 FALSE gc common-mode input conductance 0 FALSE av voltage gain 1E6 TRUE zo output impedance 0 TRUE
Model OC¶
Parameters model OC¶
name description default Laplace cp input capacitance non-inverting input 0 FALSE gp input conductance non-inverting input 0 FALSE cpn input capacitance 0 FALSE gpn input conductance 0 FALSE gm input stage transconductance 20E-3 FALSE zt output stage transimpedance 1E6 TRUE zo output impedance 0 TRUE
Examples¶
O1 inP inN out 0 AD8610
.model AD8610 OV
+ cd = 15p
+ cc = 8p
+ av = {300k*(1-s*1.3n)/(1+s*2.4m)/(1+s*1.3n)}
+ zo = 20
O1 inP inN out 0 LT1223
.model LT1223 OC
+ cp = 1.5p
+ gp = 100n
+ gm = 65m
+ zt = {5M/(1+s*680u)/(1+s*1.6n)}
+ zo = 30
Q: 4-terminal BJT¶
SLiCAP incorporates three models for 4-terminal Bipolar Junction Transistors (BJTs):
Model QV for a single vertical BJT
Model QL for a single lateral BJT
Model QD for a differential pair.
The latter one facilitates the design and analysis of negative-feedback amplifiers in which one controlled source that models the gain of the differential-pair BJT can be selected as loop gain reference variable.
Models¶
name description type QV Four-terminal vertical BJT expansion QL Four-terminal lateral BJT expansion QD Four-terminal diff. pair BJT expansion
Model QV¶
Parameters model QV¶
name description default Laplace cpi internal base-emitter capacitance 0 FALSE cbc internal base-collector capacitance 0 FALSE cbx external base-collector capacitance 0 FALSE cs collector-substrate capacitance 0 FALSE gpi internal base-emitter conductance 1E-3 FALSE gm transconductance 0 FALSE go output conductance 0 FALSE gbc internal base-collector conductance 0 FALSE rb base resistance 0 FALSE
Model QL¶
Parameters model QL¶
name description default Laplace cpi internal base-emitter capacitance 0 FALSE cbc internal base-collector capacitance 0 FALSE cbx external base-collector capacitance 0 FALSE cs base-substrate capacitance 0 FALSE gpi internal base-emitter conductance 1E-3 FALSE gm transconductance 0 FALSE go output conductance 0 FALSE gbc internal base-collector conductance 0 FALSE rb base resistance 0 FALSE
Model QD¶
Parameters model QD¶
name description default Laplace cbb internal base-base capacitance 0 FALSE cbc internal base-collector capacitance 0 FALSE cbx external base-collector capacitance 0 FALSE gbb internal base-base conductance 0 FALSE gm forward transconductance 1E-3 FALSE gcc colector-collector conductance 0 FALSE gbc internal base-colector conductance 0 FALSE rb base resistance 0 FALSE
Examples¶
Below a specification of a BJT of which the model parameters are expressed in SPICE model parameters, the operating point current I_C and the operating voltage V_CE. The expressions are simplifications of the nonlinear device equations for a bipolar transistor.
Q1 C B E S QV
+ gm = {g_m}
+ gpi = {g_m/beta_F}
+ go = {(I_c+V_ce)/VAF}
+ cbc = {c_bc}
+ cbx = {c_bx}
+ cpi = {(CJE + TAUF*g_m)}
+ rb = {r_b}
+ gbc = {g_bc}
.param gm = I_c/U_T
Below a specification of a BJT that uses small-signal parameters in an operating point as they can be determined with the aid of a SPICE operating point simulation.
Q1 C B E S Q1
.model Q1 QV
+ gm = 20m
+ rb = 50
+ go = 10u
+ gbc = 0
+ cpi = 2p
+ cbc = 0.05p
+ cbx = 0.05p
+ cs = 0.2p
Below a specification of a lateral BJT that uses small-signal parameters in an operating point as they can be determined with the aid of a SPICE operating point simulation.
Q1 C B E S Q1
.model Q1 QL
+ gm=20m
+ rb=50
+ go=10u
+ gbc=0
+ cpi=2p
+ cbc=0.05p
+ cbx=0.05p
+ cs=0.2p
Below an example of a differential pair BJT of which the parameters are related to those of the single transistor stage, biased in the same operating point as the transistors of the differential pair.
Q1 C1 C2 B1 B2 myDiffPairBJT
.model myDiffPairBJT QD
+ gm = {I_c/2/U_T}
+ gpi = {I_c/2/U_T/beta_AC}
+ go = {2*(I_c+V_ce)/V_AF}
+ cbc = {c_bc}
+ cbx = {c_bx}
+ cpi = {(CJE + TAUF*I_c/U_T)/2}
+ rb = {r_b}
* below the device parameters of the single transistor
.param r_b = 50 V_AF=50 g_bc = 0 CJE = 2p c_bc = 0.05p c_bx = 0.05p beta_AC=100
* below the operating point the single transistor
.param I_c = 1m V_ce=5
R: Resistor¶
The default model type for a resistor is R. Zero value for its resistance causes a divide by zero error while building the matrix. If zero value is required, e.g. because of parameter stepping, model type r should be used.
Models¶
name description type Ii Io R Resistor resistance > 0 stamp FALSE FALSE value Resistor resistance >= 0 stamp FALSE TRUE
Model R¶
Parameters model R¶
name description default Laplace value resistance 1 FALSE
Model r¶
Parameters model r¶
name description default Laplace value resistance 1 FALSE dcvar variance 1 FALSE
Examples¶
The examples below illustrates four different ways for specifying a resistor that is connected between the nodes nP and nN and has a numerical value of 10kOhm.
R1 nP nN 10k
R1 nP nN {20 * alpha}
R1 nP nN r value = {R_a} dcvar = {(sigma * R_a)^2}
R1 nP nN myR
.model myR R value = {20 * alpha}
.param alpha = 500
T: Ideal transformer¶
SLiCAP has a built-in model for an ideal transformer.
Model T¶
Parameters model T¶
name description default Laplace value turns ratio 1 FALSE
Examples¶
T1 secP secN priP priN {Vpri/Vsec}
T1 secP secN priP priN T value={Vpri/Vsec}
T1 secP secN priP priN myTrafo
.model myTrafo T value={Vpri/Vsec}
V: Independent voltage source¶
Model V¶
Parameters model V¶
name description default Laplace value Voltage (Laplace transform) 0 TRUE dc DC value [V] 0 TRUE dcvar Variance of DC value [V^2] 0 TRUE noise Noise voltage density [V^2/Hz] 0 TRUE
Examples¶
* Both definitions are equivalent:
V1 n1 n2 20m
V1 n1 n2 V value = 20m
Vin 0 input V value = {V_s} noise = 1e-16 dc = 0 dcvar = 10e-8
.param V_s = {1/s}; Step of 1V starting at t = 0
W: Gyrator¶
SLiCAP is often used for conceptual design and for this reason the gyrator has been included.
Model W¶
Parameters model W¶
name description default Laplace value transconductance 1 FALSE
Examples¶
Below two definitions of a gyrator with a conversion gain of 10mA/V.
W1 outP outN inP inN 10m
W1 outP outN inP inN W value = 10m
X: Sub circuit call¶
See examples in section: .subckt … .ends lines.
Z: Impedance¶
Model Z¶
Parameters model Z¶
name description default Laplace value impedance 0 TRUE
Examples¶
The examples below illustrates four different ways for specifying an impedance between the nodes nP and nN that consists of a parallel connection of a resistor with resistance \(R\) and a capacitor with capacitance \(C\).
Z1 nP nN {R/(1+s*R*C)}
Z1 nP nN Z value = {R/(1+s*R*C)}
Z1 nP nN {R/(1+s*tau)}
.param tau = {R*C}
R1 nP nN {R}
C1 nP nN {C}
Z1 nP nN myZ
.model myZ Z value = {R/(1+s*R*C)}