Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
68
Добавлен:
06.06.2017
Размер:
3.31 Mб
Скачать

.LOADOP

General Form (Schematics only)

.LOADOP

Example

.LOADOP

This statement loads a previously saved State Variables file prior to the operating point calculation in AC analysis. The contents of the file are expected to provide a good approximation to a stable operating point.

The command lets you use transient analysis to produce an operating point, save it with the State Variables Editor, then use it as an initial estimate for an AC analysis operating point. The name of the file loaded is:

CIRCUITNAME.TOP

This command is equivalent to a set of .NODESET commands for each node in the circuit.

307

.MACRO

General Form (Schematics)

.MACRO <alias> <macro circuit name(parameter list)>

Examples

.MACRO MCR3818_2 SCR(50m,40m,1u,1,50,50MEG,20u,.5,1)

.MACRO MAC320_4 TRIAC(6m,50m,1.5u,1.4,200,50MEG,0,1,1)

.MACRO KDS_049_S XTAL(4.9152MEG,120,30K)

This statement functions much like a .DEFINE statement. It provides a way to replace lengthy macro parameter calls in a macro's VALUE attribute with short model names that compactly describe the behavior of the macro.

For an example of how this works, load the library file THY_LIB.LIB and search for B25RIA10. You will find the following .MACRO statement :

.macroB25RIA10SCR(100m,60m,.9u,.9,100,100MEG,110u,1,1)

When you run an analysis on a circuit that uses this part, the FILE attribute B25RIA10 is replaced by SCR and the parameters are assigned values from the macro statement (100m,60m,.9u,.9,100,100MEG,110u,1,1) in the same order as defined in the .PARAMETERS statement within the SCR macro itself.

The SCR macro's statement is:

.PARAMETERS(IH=50mA, IGT=40mA,TON=1uS, VTMIN=1V, VDRM=50V, DVDT=50Meg,TQ=20Us,K1=1, K2=1)

When a B25RIA10 is used, its IH parameter is set to 100m, its IGT parameter is set to 60m, its TON parameter is set to .9u, and so on.

308 Chapter 20: Command Statements

.MODEL

General Form (SPICE or schematics)

.MODEL <model name> [AKO:<reference model name>] <model type>

+([<parameter name>=<value>]

+[LOT[t&d]=<value>[%]] [DEV[t&d]=<value>[%]] )

Examples

.MODEL Q1 NPN (IS=1e-15)

.MODEL VIN1 PUL (Vone=10V p1=0 p2=.1u p3=10u p4=10.1u p5=15u)

.MODEL M1 NMOS (Level=3 VTO=2.5 LOT=30% DEV=1%)

.MODEL R1 RES (R=2.0 TC1=.015)

.MODEL 2N2222A AKO:2N2222 NPN (BF=55 ISE=10F)

.MODEL NPN_A NPN (RE=12 LOT/1/GAUSS=30% DEV/2/UNIFORM=2%)

The model statement is one way to define the electrical behavior of a device. Others include binary model libraries created by the Model Editor or the MODEL program. <model name> is the name used to reference or access a particular model. <value> may contain simple run-invariant expressions as in this example:

.MODEL M2 NMOS (VTO=3.5+TEMP*.0015...

This is legal because TEMP (operating temperature) is constant during the run.

The AKO (an acronym for A Kind Of) option lets you clone new models from existing ones. All of the AKO parameters except LOT and DEV tolerances are identical to the parent, except where overridden by the specified model values. In the following example, the 1N914A has the same parameters as the 1N914 except RS, which is 10.

.MODEL 1N914A AKO:1N914 D (RS=10)

Tolerances may be specified as an actual value or as a percentage of the nominal parameter value. Both absolute tracking tolerances (LOT) and relative (DEV) tolerances may be specified.

Both types of tolerance are specified by placing a keyword after the parameter:

[LOT[t&d]=<tol1>[%]][DEV[t&d]=<tol2>[%]]

This example specifies a 10% tolerance for the forward beta of Q1.

309

.MODEL Q1 NPN (BF=100 LOT=10%)

[t&d] specifies the tracking and distribution, using the following format:

[/<lot#>][/<distribution name>]

These specifications must follow the keywords DEV and LOT without spaces and must be separated by "/".

<lot#> specifies which of ten random number generators, numbered 0 through 9, are used to calculate parameter values. This lets you correlate parameters of an individual model statement (e.g. RE and RC of a particular NPN transistor model) as well as parameters between models (e.g. BF of NPNA and BF of NPNB). The DEV random number generators are distinct from the LOT random number generators. Tolerances without <lot#> get unique random numbers.

<distribution name> specifies the distribution. It can be any of the following:

Keyword

Distribution

UNIFORM

Equalprobabilitydistribution

GAUSS

Normal or Gaussian distribution

WCASE

Worst case distribution

If a distribution is not specified in [t&d], the distribution specified in the Monte Carlo dialog box is used.

The model statements of the capacitor, inductor, resistor, diode, GaAsFET, JFET, MOSFET, and BJT devices can individually control the two temperatures:

Measurement temperature: This is the temperature at which the model parameters are assumed to have been measured. It serves as a reference point for temperature adjusting the parameter values. The default value is the value set by a .OPTIONS TNOM statement, if present, or if not then the TNOM Global Settings value (which defaults to 27° C).

Device operating temperature: This is the temperature used to adjust the model parameters from their measured values.

To modify the measurement temperature, specify a value for the model parameter, T_MEASURED. For example,

.Model M710 NMOS (Level=3 VTO=2.5 T_MEASURED=35)

310 Chapter 20: Command Statements

There are three ways to modify the device operating temperature:

Keyword

Device operating temperature

T_ABS

T_ABS

T_REL_LOCAL

T_REL_LOCAL + T_ABS(of AKO parent)

T_REL_GLOBAL T_REL_GLOBAL + global temperature

Global temperature is determined as follows:

SPICE circuits

In SPICE circuits, global temperature is set by the .TEMP statement, if present, or a .OPTIONS TNOM=XXX, if present, or by the TNOM Global Settings value. When you select an analysis type, global temperature is determined and placed in the Temperature field of the Analysis Limits dialog box. When this dialog box comes up, you can change the temperature prior to starting the analysis run.

Schematics

In schematics, global temperature is the value in the Temperature field of the Analysis Limits dialog box. .TEMP statements have no effect.

Examples

In this example, the operating temperature of N1 is 47° C:

.TEMP 47

.MODEL N1 NPN(BF=50)

In this example, the operating temperature is 35° C:

.MODEL N1 NPN(BF=50 T_ABS=35)

In this example, the operating temperature of N1 is 30° C and of N2 is 55° C:

.MODEL N1 NPN(BF=50 T_ABS=30)

.MODEL N2 AKO:N1 NPN(T_REL_LOCAL=25)

In this example, the operating temperature of N1 is 75° C:

.TEMP 35

.MODEL N1 NPN(BF=50 T_REL_GLOBAL=40)

See Chapter 22, "Analog Devices" for more information on the exact effects of device operating temperature on particular device parameters.

311

.NODESET

General Forms (SPICE or schematics) Analog nodes

.NODESET <V(<analog node1>[,<analog node2>]) = <voltage value>>*

Inductors

.NODESET <I(<inductor>) = <current value>>*

Digital nodes

.NODESET <D(<digital node>) = <digital value>>*

Examples

.NODESET V(IN1)=45UV V(OUT)=1.2MV

.NODESET V(7)=4 D(H1)=1

.NODESET I(L10)=3.5ma

The .NODESET statement provides an initial guess for node voltages, currents, and digital logic states during the AC and transient analysis operating point calculation. It assigns the analog or digital value to the node but, unlike the .IC statement, it does not hold the value during the entire operating point calculation. If both an .IC and a .NODESET statement are present in the circuit, the .IC statement takes precedence (the .NODESET statement is ignored).

Note that using .NODESET statements to set the voltage across inductors or voltage sources is futile as their initial voltages are predetermined.

This command can affect transient analysis even when the operating point is skipped, because it sets state variables.

312 Chapter 20: Command Statements

.NOISE

General Form (SPICE files only)

.NOISE V(<node1>[,<node2>]) <source name> [<interval value>]

Examples

.NOISE V(10) V1

.NOISE V(4,3) VAC1 50

.NOISE V(10,12) I1 100

The noise command arguments are placed into the proper MC7 Analysis Limits dialog box fields upon selecting AC from the Analysis menu. The user should then select either ONOISE, INOISE, or both, for the X or Y expression of one of the plots. Simply selecting one of these variables enables the Noise analysis mode.

V(<node1>[,<node2>]) is any valid AC voltage variable and defines the output at which to measure the noise value. <source name> can be either an independent current or voltage source. It defines the input node(s) at which to calculate the equivalent input noise (inoise).

Noise analysis calculates the RMS value of the noise at the output specified by V(<node1>[,<node2>]), arising from the contributions of all noise sources within the circuit. All semiconductors and resistors contribute noise.

Note that selecting one of the noise variables precludes plotting normal AC small signal variables, like node voltages. You can't, for instance, plot INOISE and V(1) at the same time.

313

.OP

General Form (SPICE files only)

.OP

Example

.OP

In a SPICE file, this command normally specifies that the results of the operating point calculation be printed. Since these are always printed to the Numeric Output window and the CIRCUITNAME.TNO or CIRCUITNAME.ANO file anyway, this command is redundant and has no effect.

314 Chapter 20: Command Statements

.OPT[IONS]

General Form (SPICE or schematics)

.OPTIONS [<option name>]* [<option name>=<option value>]*

Examples

.options GMIN=1e-9 VNTOL =1n ABSTOL=1n DEFAS=.1u

.options NOOUTMSG

This command lets you change the value of one or more constants for a particular circuit. The Options statement overrides Global Settings values. Individual options are described in detail in the Global Settings section of Chapter 2, "The Circuit Editor".

315

.PARAM

General Form (SPICE or schematics)

.PARAM <<name> = {<expression>}>*

Examples

.PARAM VSS = 5 VEE = -12

.PARAM RISETIME={PERIOD/10}

The .PARAM statement is similar to the .DEFINE statement. It is available for use in both circuit files and libraries. It is provided mainly to ensure compatibility with some commercial vendor libraries.

Curly brackets, "{" and "}" must enclose the definition and usage of the variable. Brackets are not required in the .PARAM statement if the variable is a constant, as in the first example above.

For example, if BF1 were defined as follows:

.PARAM BF1={100+TEMP/20}

Then you could use it in a model statement like so:

.MODEL Q1 NPN (BF={BF1})

Here is the equivalent .DEFINE statement:

.DEFINE BF1 100+TEMP/20

Here is the equivalent usage:

.MODEL Q1 NPN (BF=BF1)

Essentially, the .PARAM statement requires curly brackets in definition and use and the .DEFINE does not.

As with the .DEFINE statement, <name> can't be a reserved variable name, such as T (Time), F (Frequency), or S (complex frequency), or a reserved constant name such as VT, TEMP, PI, or GMIN.

316 Chapter 20: Command Statements

Соседние файлы в папке Micro-Cap v7.1.6
  • #
    06.06.20171.32 Кб60model.CNT
  • #
    06.06.201776.72 Кб62MODEL.HLP
  • #
    06.06.20173.72 Кб60NETHASP.INI
  • #
    06.06.2017450 б59os.dat
  • #
    06.06.2017545 б63READ.ME
  • #
    06.06.20173.31 Mб68RM.PDF
  • #
    06.06.2017226.69 Кб61setup.bmp
  • #
    06.06.201795 б59SETUP.INI
  • #
  • #
    06.06.201749 б60setup.lid
  • #
    06.06.20172.04 Mб59Standard.cmp