Manuals >Reference >MNS Simulator
Print version of this Book (PDF file)
prevnext

Circuit Model Description

This section explains the circuit descriptions for the MNS simulator.

Selecting Simulator Options

MNS simulation options are specified using the MNS_OPTIONS variable in the Setup DUT or System Variable tables. Enter the options in the value section of the variable exactly as they should appear in the MNS options command.

Entering Circuit Descriptions

The circuit description is entered into the IC-CAP Circuit Editor or the Test Circuit Editor. The circuit description includes the necessary definitions of devices, sources and components, as well as node connections and model descriptions. MNS accepts a netlist description that is different from SPICE and Saber simulators.

Parameter Table Generation

The circuit description is parsed by IC-CAP and specific model information (such as parameters and their corresponding values) as well as circuit component values are reflected in the Parameters table. Model parameters and component values specified in the circuit description entered in the Circuit Editor are saved in the Parameters table. Device parameters specified in the model call statement are saved in the DUT Parameters table—unless a Test Circuit is specified, in which case, parameter values specified in the test circuit description are saved in the DUT Parameters table.

Non-numeric Parameter Values

MNS allows non-numeric values for a number of parameters in predefined component definitions. One example is the BJT model parameter npn. This parameter can take on the value of yes if it is an nmos device. Alpha format parameters do not appear in the IC-CAP Parameters table but do appear in the simulation input decks.

Circuit descriptions must be entered with valid model and parameter names for the particular model being used.

Node Names

MNS accepts alphanumeric names as well as numbers to represent nodes. There is no limit on the number of characters allowed in a node name; however, delimiters or non-alphanumeric characters are not allowed. Also, a node name that begins with a digit must consist only of digits.

Comments

To indicate comments in an MNS input deck, start an input line with a semicolon (;). All text on the line following the semicolon will be ignored.


Note


MNS will treat the suffix M as MEG and m as milli, whereas IC-CAP parses both M and m as milli. When specifying a value multiplied by10-3 use m; when specifying a value multiplied by 106 use MEG.


Device Model Descriptions

A device model is used to characterize a single MNS-defined element of any type. This specification requires a model definition that describes the device and an instance statement that calls the model definition.

The model description specifies the value of a device model that describes a particular element. When a parameter is not specified, the default value in the model is used. The general form of the model definition is:

 model MNAME TYPE PNAME1 = PVAL1 PNAME2 = PVAL2...

where

MNAME is the model name. (Regardless of the model name entered into the MNAME field of the MNS model definition statement, IC-CAP substitutes this field with the name of the Model as it is called in the Model List when the simulator input deck is built.)

TYPE is a valid MNS element type.

PNAMEs are parameter names available for the particular model type.

PVALs are the parameter values.

A backslash immediately followed by a return (no space between the backslash and the return) at the end of a line indicates that the statement is continued on the next line This continuation character is often used for easier readability when specifying the model description.

The general form of the instance statement that calls the device model is:

 TYPE :DNAME NNAME1 NNAME2...NNAMEN DPAR1 = DVAL1 
DPAR2 = DVAL2...DPARN = DVALN

where

TYPE is the instance type descriptor. This field can contain either the MNS instance type name or a user-supplied model or subcircuit name.

DNAME is the device name.

NNAMEs denote node names.

DPAR is a predefined DUT parameter name.

DVAL is the specified DUT parameter value. Refer to the MNS User's Guide for DUT parameter names available for each model.

Subcircuit Model Descriptions

A subcircuit definition represents a circuit that contains more than 1 device. The syntax for defining a subcircuit is identical to the syntax used for the MNS input language.

The general form of the subcircuit definition is:

 define SUBCKTNAME (NNAME1 NNAME2 ...NNAMEN)
parameters PAR1 = VAL1 PAR2 = VAL2 ...PARN = VALN
< body of subcircuit >
end SUBCKTNAME

where

SUBCKTNAME is the name of the subcircuit.

NNAMEs are the node names of the external nodes of the subcircuit. These external nodes are used to connect the subcircuit to another circuit.

PARs are the names of the parameters passed into the subcircuit. These parameters are optional in a subcircuit definition.

If parameters are specified, the assigned default values VAL are also optional. A parameter is assigned to this default value if the parameter is not specified in the subcircuit call.

The body of the subcircuit contains element statements. It can contain calls to other subcircuits but it cannot contain other subcircuit definitions.

The subcircuit definition is completed using the end SUBCKTNAME statement.

Calling a subcircuit definition allows you to insert all instances specified within the subcircuit into the circuit. The call requires a syntax identical to the syntax used in the MNS input language for any instance statement. The general form of the instance statement is:

 TYPE :INAME NNAME1 NNAME2....NNAMEN PAR1 = VAL1 
PAR2 = VAL2......PARN = VALN

(While the syntax shown here is correct, passed parameters are ignored by IC-CAP.)

where

TYPE is the instance type descriptor. If a subcircuit is being called, this field would contain the subcircuit name denoted by SUBCKTNAME.

INAME is the instantiated name of the subcircuit.

NNAMEs denote node names.

PARs are the subcircuit parameter names.

VALs are the specified subcircuit parameter values.

The following is an example of a complete subcircuit definition and subcircuit call.

    • Defined by the user in the Circuit folder:
options ascii=no 
define opamp1 (2 3 4 6 7)
; Internal OpAmp circuit
; using Boyle-Pederson Macro Model
; Input differential amplifier
npn1:Q1 10 2 12
npn2:Q2 11 3 13
model npn1 bjt npn=yes is = 8E-16 bf = 52.81
model npn2 bjt npn=yes is = 8.093E-16 bf = 52.66
r:RC1 7 10 r=4352
r:RC2 7 11 r=4352
c:C1 10 11 c=4.529E-12
r:RE1 12 14 r=2392
r:RE2 13 14 r=2392
r:RE 14 0 r=7.27E+06
c:CE 14 0 c=7.5E-12
: Power dissipation modeling resistor
r:RP 7 4 r=1.515E+04
: 1st gain stage
vccs:GCM 0 15 14 0 gm=1.152E-09
vccs:GA 15 0 10 11 gm=0.0002298
r:R2 15 0 r=1E+05
; Compensation capacitor
c:C2 15 16 c=1E-11
; 2nd gain stage
vccs:GB 16 0 15 0 gm=37.1
r:RO2 16 0 r=489.2
dmod1:D1 16 17
dmod1:D2 17 16
model dmod1 diode is = 3.822E-32
r:RC 17 0 r=0.0001986
vccs:GC 0 17 6 0 gm=5034
; Output circuit
r:RO1 16 6 r=76.8
dmod2:D3 6 18
dmod2:D4 19 6
model dmod2 diode is = 3.822E-32
ivs:VC 7 18 vdc=1.604
ivs:VE 19 4 vdc=3.104
; Input diff amp bias source
ics:IEE 14 4 idc=2.751E-05
end opamp1
    • Defined by the user in the Test Circuit folder:
;Inverting Amplifier
define inv_amp (1 2 3 4 6 7 )
opamp1:X1 2 3 4 6 7
r:Rf 6 2 r=1E+04
r:Rin 2 1 r=2000
r:Rgnd 3 0 r=0.001
end inv_amp
    • Added by IC-CAP to the circuit description:
inv_amp:XCKT 1 2 3 4 5 6
; START SOURCES
ivs:V1GROUND 1
0 vdc=0 vac=1 ivs:V7GROUND 6 0 vdc=15
ivs:V5GROUND 4 0 vdc=-15 ; END SOURCES
r:RO2 2 0 100000
r:RO3 3 0 100000
r:RO5 5 0 100000
stim:swpfreq start=1000 stop=1e=07 dec=3
ac:ac1 stim=swpfreq var="freq"

For more information on MNS subcircuit definitions, refer to the MNS User's Guide.


prevnext