This attribute allows you to specify the model or subcircuit to be used for component simulation. You can specify the name of a model in the same library file, you can specify the name of a model in an external file, or you can directly specify the values of the model parameters.

To specify the model name

A model or subcircuit must be specified for the following types of elements: Diode, BJT, JFET, MOSFET, MESFET, Voltage-controlled Switch, Current-controlled Switch, Lossy Transmission Line and Uniform Distributed RC Lines. The indication of a model is optional for resistors, and capacitors while a model is not required for all other elements.

If the model name is not specified, for items for which a model is required, the component value is used as the model name. For example, if no model is specified for a 1N4007 diode then it is associated with the model or subcircuit named 1N4007.

AttenzioneSyntax:
<model_name>[@<file_name>]
model_name

Specify the model name to associate with the component. The model must be defined in a library of SPICE models. See To create a library of SPICE models.

file_name

This part is optional. If the specified model resides in a file outside the library, you can also specify the file name. The file name can also be specified via the parameter LIB. It is not necessary to specify the name of the external file if it has already been inserted in the list of external libraries declared in the dialog box Job Properties » Libraries.

To specify model parameters

You can directly specify the model parameters by indicating the model type and then the parameters.

AttenzioneSyntax:
<model_type>([<param_name>=<value>]*)
model_type

Specifies the type of model. Devices can only reference models of a corresponding type. Must be one of the types outlined in the table that follows:

Device Model type Description

A - XSPICE device

GAIN, SUMMER, MULT, DIVIDE,
LIMIT, CLIMIT, PWL, ASWITCH,
ZENER, ILIMIT, HYST, D_DT, INT,
S_XFER, SLEW, LCOUPLE, CORE,
SINE, TRIANGLE, SQUARE, ONESHOT,
CMETER, LMETER, CAPACITOR,
INDUCTOR, DAC_BRIDGE, ADC_BRIDGE,
DAC, ADC, D_OSC, D_BUFFER,
D_INVERTER, D_AND, D_NAND,
D_OR, D_NOR, D_XOR, D_XNOR,
D_TRISTATE, D_OPEN_E, D_OPEN_C,
D_PULLUP, D_PULLDOWN, D_DFF,
D_JKFF, D_TFF, D_SRFF, D_DLATCH,
D_SRLATCH, D_STATE, D_TABLE, D_FDIV,
D_SOP, D_RAM, D_SOURCE

XSPICE model

C - Capacitor

C
CAP

SPICE3 Capacitor model
PSPICE Capacitor model

D - Diode

D

Diode model

J - JFET

PJN
NJF

P-channel JFET model
N-channel JFET model

L - Inductor

IND

Inductor model

M - MOSFET

PMOS
NMOS

P-channel MOSFET model
N-channel MOSFET model

O - Lossy transmission lines

LTRA

Lossy transmission line model

Q - BJT

PNP
NPN

PNP BJT model
NPN BJT model

R - Resistor

R
RES

SPICE3 Resistor model
PSPICE Resistor model

S - Voltage controlled switch

SW
VSWITCH

SPICE3 Voltage controlled switch
PSPICE Voltage controlled switch

U - Uniform distributed RC

URC

Uniform distributed RC model

W - Current controlled switch

CSW
ISWITCH

SPICE3 Current controlled switch
PSPICE Current controlled switch

X - Subcircuit call

Subcircuit name

Subcircuit model

Z - MESFET

PMF
NMF

P-channel MESFET model
N-channel MESFET model

 Device

GATES
FFLOP

Code Model

param_name=value

Parameter values are defined by appending the parameter name followed by an equal sign and the parameter value. Model parameters that are not given a value are assigned the default values. The name must begin with an alphabetic character. The value can be a constant value or a numeric expression. The expressions must be enclosed in braces.

Examples

D (IS=50.2p RS=0.620 N=1.10 CJO=92.8p VJ=0.750 M=0.330 TT=50.1n)

To specify the subcircuit

To directly specify the subcircuit it is necessary to insert as first term the reserved word SUBCKT. The definition of the subcircuit must always be terminated by .ENDS. The syntax is as follows:

AttenzioneSyntax:
.SUBCKT <name> <node>*
......
elements

......
.ENDS
.SUBCKT

This statement marks the beginning of a subcircuit definition. The subcircuit definition ends with the .ENDS statement. All statements between the .SUBCKT and the .ENDS statements are included in the subcircuit definition.

name

Is the subcircuit name. The name is used by an X (Subcircuit Instantiation) device to reference the subcircuit.

node

Are the external nodes. Do not use 0 (zero) in this node list. Zero is reserved for the global ground node. There must be the same number of nodes in the subcircuit calling statements as in its definition. When the subcircuit is called, the actual nodes (the ones in the calling statement) replace the argument nodes (the ones in the defining statement). The order of the subcircuit input nodes must match that of the corresponding SPICE element. For more information on the order of the SPICE elements nodes see Order of nodes in the SPICE elements.

elements

The group of element lines which immediately follow the .SUBCKT line define the subcircuit. Control lines may not appear within a subcircuit definition; however, subcircuit definitions may contain anything else, including other subcircuit definitions, device models, and subcircuit calls. Note that any device models or subcircuit definitions included as part of a subcircuit definition are strictly local (i.e., such models and definitions are not known outside the subcircuit definition). Also, any element nodes not included on the .SUBCKT line are strictly local, with the exception of 0 (ground) which is always global.

.ENDS

The "Ends" line must be the last one for any sub-circuit definition. The subcircuit name, if included, indicates which subcircuit definition is being terminated; if omitted, all subcircuits being defined are terminated. The name is needed only when nested subcircuit definitions are being made. Since subcircuits can be listed sequentially, with the same effect, it is not recommended that subcircuits are nested.

Examples

  Copy codeCopy code
.SUBCKT 1N4738A 1 2
*Terminals      A K
D1 1 2 DF
DZ 3 1 DR
VZ 2 3 7.33
.MODEL DF D ( IS=50.2p RS=0.620 N=1.10
+ CJO=92.8p VJ=0.750 M=0.330 TT=50.1n )
.MODEL DR D ( IS=10.0f RS=0.288 N=1.15 )
.ENDS

See also