3.1.8 Model References
Subcircuits and device models are referenced via special netlist entries of the following form. A model reference is recognized by the presence of the keyword Model in the value field.
Referencing models.
The following netlist entry references a transistor model NPN/DC and specifies numerical values for the transistor parameters IS, BF, and BR:
{Q1, {1 -> C, 2 -> B, 3 -> E}, Model -> NPN, Selector -> DC,
IS -> 1.*^-16, BF -> 100, BR -> 1}
To reference a parameter set, use the value-field option Parameters -> name, where name denotes the name of the parameter set defined with ModelParameters (see Section 3.1.10).
The following netlist entry includes a reference to the model parameter set DEFNPN.
{Q1, {1 -> C, 2 -> B, 3 -> E}, Model -> NPN, Selector -> DC,
Parameters -> DEFNPN}
When you read in circuit descriptions using the command ReadNetlist, the Model, Selector, and Parameters keys in the value fields of model references are returned in the generic form key -> key[devtype, parset, refdes], for example
{Q1, {1 -> C, 2 -> B, 3 -> E},
Model -> Model[BJT, DEFNPN, Q1],
Selector -> Selector[BJT, DEFNPN, Q1],
Parameters -> Parameters[BJT, DEFNPN, Q1]}
This approach permits an easy exchange of device models and parameter sets for each device or group of devices by means of pattern matching and rewriting (see also Section 3.4.1). In the default case, i.e. when no replacement rules are applied to these keys, the model name, the selector, and the parameter set key are rewritten as follows upon circuit equation setup:
Model -> devtype, Selector -> mode, Parameters -> parset
For the following model reference Q1, the generic right-hand sides of these rules are transformed as shown below if AnalysisMode -> AC.
{Q1,{2 -> C, 1 -> B, 0 -> E}
Model -> BJT, Selector -> AC, Parameters -> DEFNPN,
GM$ac -> 0.02, RPI$ac -> 5.0*^3, RO$ac -> 1.0*^4}
See also: Model, ModelParameters, Section 3.1.3.
|