Product Documentation
Spectre Circuit Simulator Reference
Product Version 23.1, September 2023

Monte Carlo Analysis (montecarlo)

Description

The montecarlo analysis is a swept analysis with associated child analyses similar to the sweep analysis (see spectre -h sweep.) The Monte Carlo analysis refers to "statistics blocks" where statistical distributions and correlations of netlist parameters are specified (detailed information about statistics blocks is given below). For each iteration of the Monte Carlo analysis, new pseudo-random values are generated for the specified netlist parameters (according to their specified distributions) and the list of child analyses are then executed.

Expressions are associated with the child analyses. These expressions, which you constructed as scalar calculator expressions during Monte Carlo analysis setup, can be used to measure circuit metrics, such as the slew-rate of an op-amp. For each iteration during a Monte Carlo analysis, the expression results vary with the netlist parameters. Therefore, Monte Carlo analysis allows you to examine and predict circuit performance variations, which affect yield.

The statistics blocks allow you to specify batch-to-batch (process) and per-instance (mismatch) variations for netlist parameters. These statistically-varying netlist parameters can be referenced by models  or instances in the main netlist and may represent IC manufacturing process variation or component variations for board-level designs. The following description gives a simplified example of the Monte Carlo analysis flow:

perform nominal run if requested

if any errors in nominal run then stop

foreach Monte Carlo iteration {

if process variations specified then

apply process variation to parameters

if mismatch variations specified then

foreach subcircuit instance {

apply mismatch variation to parameters

}

foreach child analysis {

run child analysis

evaluate expressions

}

}

Syntax

Name montecarlo parameter=value ...

Parameters

Analysis parameters

numruns

100

Number of Monte Carlo iterations to perform (does not include the nominal run).

firstrun

1

Starting iteration number.

runpoints

[...]

Specifies a set of iteration indices to be simulated. Indices can be any positive integer values or values defined by a range function.

saverunpointsfile

Save file that contains the actual run points (iteration indices).

loadrunpointsfile

Load file that contains the run points (iteration indices) to be simulated.

variations

process

Level of statistical variation to apply. Possible values are process, mismatch and all.

sampling

standard

Method of statistical sampling to apply. Possible values are standard, lds and lhs.

numbins

0

Number of bins for latin-hypercube (lhs). The number is checked against numruns + firstrun - 1, and Max( numbins, numruns + firstrun -1 ) is used.

seed

Optional starting seed for random number generator.

config

Yaml file to set up Monte-Carlo configurations.

scalarfile

Output file that contains output scalar data.

paramfile

Output file that contains output scalar data labels.

dut

[...]

If set, the specified subcircuit instance have process and mismatch variations applied and the unspecified instance only have process variations applied. All subcircuits instantiated under this instance also have process and mismatch enabled. By default, mismatch is applied to all subcircuit instances in the design and process is applied globally. This parameter allows the test-bench to change and not affect the variations seen by the actual design.

ignore

[...]

If set, no variation is applied to specified subcircuit instances. In addition, all subcircuits instantiated under this instance do not have variation enabled. By default, the mismatch is applied to all subcircuit instances in the design and the process is applied globally.

dutparams

[...]

If set, only the specified statistical parameters have process and mismatch variations applied.

ignoreparams

[...]

If set, the specified statistical parameters are excluded from applying process and mismatch variation.

json

no

Output JSON file saves the variations and analysis settings. Possible values are no and yes.

accuracyaware

summary

Specifies the mode of run-time monitoring and early-termination of a montecarlo simulation. In summary mode, the statistics of measurement is only listed after the Monte-Carlo analysis finishes. In iteration mode, the statistics is printed out after each step of Monte-Carlo analysis. In autostop mode, analysis is terminated based on the criteria specified by the options minmaxpairs, and smooththresh. Possible values are summary, iteration, autostop and none.

minmaxpairs

[...]

Pairs of values that are used to specify the min and max of each measurement defined in ocean expressions. Simulation is terminated when the current iteration generates a measurement that resides outside the region of [min, max]. It is not necessary that the number of pairs equals the number of measurement. However, each defined pair has to be aligned with the corresponding ocean measurement. Extra number of pairs or measurement will be ignored when deciding upon early termination. This option is only active when accuracyaware=autostop.

smooththresh

0.0

Specifies the smoothness threshold of an averaged ocean measurement. The average takes place within consecutive non-overlapping 200-iteration windows. Suggested value is 1e-4 for a reasonably converged signal-average. This test of smoothness is only active when accuracyaware=autostop.

method

standard

Method used to run montecarlo analysis. Standard is the regular montecarlo analysis with varying netlist parameters. VADE is variation aware design with directly varying device parameters. Possible values are standard and vade.

ignoremode

default

Controls the type of variation that is applied to ignored devices, when variations=all. By default, the variation seen by ignored devices depends on whether the 'dut' or 'ignore' parameter is used. If 'dut' is used, then all non-DUT devices will get process variation. If the 'ignore' parameter is used, then devices in the 'ignore' list will use nominal values, i.e. have no variation. When ignoremode=nominal|process. the behavior is consistent for both 'dut' and 'ignore'. If ignoremode=nominal, then all devices in the 'ignore' list or devices that are not in the 'dut' list will use nominal values. If ignoremode=process, then all devices in the 'ignore' list or devices that are not in the 'dut' list will have process variation.. Possible values are default, nominal, process and both.

stdscale

default

Scale the standard deviation by the specified value. The default value is 1.0.

process_stdscale

default

Scale the standard deviation of process variation parameters by the specified value. The default value is 1.0.

mismatch_stdscale

default

Scale the standard deviation of mismatch variation parameters by the specified value. The default value is 1.0.

nscale

default

N Scale for both of process and mismatch variation parameters in uniform distribution by the specified value. The default value is 1.0.

process_nscale

default

N Scale for process variation parameters in uniform distribution by the specified value. The default value is 1.0.

mismatch_nscale

default

N Scale for mismatch variation parameters in uniform distribution by the specified value. The default value is 1.0.

dist

default

Force all MonteCarlo random variation distributions to the specified type. Possible values are default, unif, gauss and gamma.

processdist

none

Set all MonteCarlo process variation distributions to be the specified type. The default type is none. Possible values are none, unif, gauss, gamma, lnorm, sunif and lunif.

mismatchdist

none

Set all MonteCarlo mismatch variation distributions to be the specified type. The default type is none. Possible values are none, unif, gauss, gamma, lnorm, sunif and lunif.

ignore_type

[...]

If set, no variation is applied to specified types. Default is none. Possible values are none and memcell.

iteruseprevic

Controls if MC iterations use previous IC solutions. Possible values are none and nominal.

dumpvop

no

Whether to dump process/mismatch with new order. Possible values are no and yes.

loadvariationfile

Load file in csv format that contains the variation (iteration indices) to be simulated.

Saving Process Parameters

saveprocessparams

Whether to save scalar data for statistically varying process parameters that are subject to process variation. Possible values are no and yes.

processscalarfile

Output file that contains process parameter scalar data.

processparamfile

Output file that contains process parameter scalar data labels.

saveprocessvec

[...]

Array of statistically varying process parameters (which are subject to process variation) to save as scalar data in processscalarfile.

Saving Mismatch Parameters

savemismatchparams

no

Whether to save scalar data for statistically varying mismatch parameters that are subject to mismatch variation. Possible values are no and yes.

mismatchscalarfile

Output file that contains mismatch parameter scalar data.

mismatchparamfile

Output file that contains mismatch parameter scalar data labels.

dumpdependency

none

Whether to save a dependency map. Possible values are none and mismatch.

dependencymapfile

Specify the name of the output file that contains a dependency map, which indicates the pairing of mismatch parameters and subcircuit instances.

dependencyscalarfile

Output the random numbers that are used by mismatch parameters to a file.

dependencyparamfile

Output the mapping from mismatch parameters to corresponding subcircuit instances to a file.

Flags

donominal

yes

Whether to perform nominal run. Possible values are no and yes.

addnominalresults

no

Whether to add nominal run results to Monte Carlo run results. Possible values are no and yes.

paramdumpmode

no

Whether to fully dump process/mismatch parameters information. Possible values are no and yes.

dumpseed

no

Whether to dump seed parameters information. Possible values are no and yes.

nullmfactorcorrelation

no

Controls the mismatch variation correlation of parallel devices defined by m-factor. If set to yes, devices are assumed to get uncorrelated mismatch variations. If set to no, devices are assumed to get the same mismatch variation. Possible values are no and yes.

appendsd

no

Whether to append scalar data. Possible values are no and yes.

savefamilyplots

no

Whether to save data for family plots. If yes, this could require considerable disk space. Possible values are no and yes.

savedatainseparatedir

no

Whether to save data for an each plot in a separate directory. If yes, this could require considerable disk space. Possible values are no and yes.

evaluationmode

no

If set to yes, dump random numbers assigned to statistical parameters without running enclosed analyses. Possible values are no and yes.

diskstorage

no

If set to yes, mismatch data is stored on disk instead of memory while running a montecarlo analysis. Possible values are no and yes.

wfseparation

no

If set to yes, a separated directory by the name of nom is created for the nominal run and the directory names of individual iterations are simplified by removing the leading analysis names. Possible values are no and yes.

seedscramble

no

If set to yes, a scrambling procedure is applied to the seed value to generate a better random number sequence in the sense of randomness. Possible values are no and yes.

distribute

Distribute a Monte Carlo analysis to reduce simulation time by using more computer cores across multiple computers. Possible values are no, fork, rsh, ssh, lsf, sge, nc and auto.

numprocesses

Specifies the number of jobs in distributed mode.

usesamesequence

no

If set to yes, the random number sequence is maintained for a seed, even if there is a non-empty dut/ignore list. Possible values are no and yes.

rngversion

The version of random number generator. Possible values are v151.

Annotation parameters

annotate

sweep

Degree of annotation. Possible values are no, title, sweep and status.

title

Analysis title.

Fast Monte Carlo parameters (for all FMC methods)

fmcmethod

The FMC method to use. Possible values are worstsample and yieldest.

fmcbudget

Budget number of actual simulations for FMC algorithm. For fmcmethod=worstsample, default is no such limit; for fmcmethod=yieldest, default is 3000..

fmcconfidence

0.95

Specify the confidence value in the range of (0.5, 1).

Fast Monte Carlo parameters (only for Worst Sample method)

fmcmode

fast

The FMC mode to control the balance between performance and accuracy. Possible values are fast, conservative and explore.

fmcyield

Specify the FMC yield target in the range of (0.5, 1).

fmcsigma

Specify the FMC yield target by the sigma value.

fmcnumtailsamples

10

Request FMC to return the desired number of tail samples.

fmcinitruns

50

Specify number of runs in FMC initial group.

fmcnumfails

0

Stop a certain spec during FMC process if its number of failed iterations reaches fmcnumfails. Default is 0, where FMC will not check the number of failed iterations.

fmcmaxbufsize

1

Specify FMC maximum buffer size.

fmcscalarfile

Output file that contains FMC scalar data.

fmcdumpcontribution

0

dump device mismatch contribution lists into FMC log file, in descending order. Input a positive number to specify the number of devices to be dumped; input a negative number to dump all devices' contributions; input 0 to turn off this feature.

fmcmoments

no

Instructs FMC to perform computation of moments of the measurement distribution. Possible values are no and yes.

Fast Monte Carlo parameters (only for Yield Estimation method)

fmcsigmawidth

0.5

Specify the FMC yield estimation target width of confidence interval (in terms of sigma)..

Detailed Description and Examples:

sampling=[standard | lhs]

Determines the sampling behavior. This parameter can be set to standard, the default value, or lhs. lhs invokes latin-hypercube (LHS) method, while standard defaults to the existing standard sampling behavior.

numbins=value

Controls the number of subdivisions used in the LHS method.

If numbins is not specified, the number of subdivisions of the sampling space in LHS will be numruns + firstrun - 1. This parameter is active only when sampling is lhs. If numbins is set to a non-zero integer, the number of subdivisions will be assigned to the greater of the two values numbins or numruns + firstrun -1.

numruns:(default=100)

Specifies the number of Monte Carlo iterations to perform. The simulator performs a loop, running the specified child analyses, and evaluating any expressions numruns times.

runpoints:(no default)

Specifies the iteration indices to be simulated. Two types of settings are accepted: integers, and ranges. For example, runpoints=[10 range(15, 18) 20] is an acceptable setting, which is translated to perform the simulation of 10th, 15th, 16th, 17th, 18th, and 20th iterations.

seed:(no default)

Specifies the seed for the random number generator. By always specifying the same seed, you can reproduce a previous experiment. If you do not specify a seed, each time you run the analysis, you will get different results, that is, a different stream of pseudo-random numbers is generated.

scalarfile="filename"

Allows you to specify an ASCII file in which scalar data (results of expressions that resolve to scalar values) is written. The data from this file can be read and plotted in histograms by ADE. For each iteration of each Monte Carlo child analyses, Spectre (through Artil) writes a line to this ASCII file, which contains scalar data (one scalar expression per column, for example, slewrate or bandwidth). The default name for this file is of the form name.mcdata, where name is the name of the Monte Carlo analysis instance. This file contains only the matrix of numeric values. If you are an ADE Monte Carlo user, you will be more familiar with the term mcdata file for the scalar file. Additionally, when the ADE Monte Carlo tool is used to generate the Spectre netlist file, Spectre merges the values of the statistically varying process parameters into this file that contains the scalar data (results of expressions). This means that ADE can later read the data and create scatter plots of the statistically varying process parameters against each other, or against the results of the expressions. In this way, you can see correlations between process parameter variations and circuit performance variations. This data merging occurs whenever the scalarfile and processscalarfile are written in the same directory.

paramfile="filename"

Contains the titles, sweep variable values, and the full expression for each of the columns in the scalarfile. If you are an ADE Monte Carlo user, you will be more familiar with the term mcparam file for the paramfile. This file is created in the psf directory by default, unless you specify an alternative path with the file name.

processscalarfile="filename"

If saveprocessparams is set to yes,  the process (batch-to-batch) values of all statistically varying parameters are saved to this scalar data file. You can use saveprocessvec to filter out a subset of parameters in which case Spectre will save only the parameters specified in saveprocessvec to the processscalarfile). The processscalarfile is equivalent to scalarfile, except that the data in the scalarfile contains the values of the scalar expressions, whereas the data in processscalarfile contains the corresponding process parameter values. The default name for this file is of the form instname.process.mcdata, where instname is the name of the Monte Carlo analysis instance. This file is created in the psf directory by default, unless you specify an alternative path in the filename. You can load processscalarfile and processparamfile into the ADE statistical post-processing environment to plot/verify the process parameter distributions. If you later merge the processparamfile with the data in the scalarfile, you can then plot scalar expressions values  against the corresponding process parameters by loading this merged file into the ADE statistical postprocessing environment.

processparamfile="filename"

Contains the titles and sweep variable values for each of the columns in processscalarfile. These titles are the names of the process parameters.

processparamfile is equivalent to the paramfile, except that paramfile contains the name of the expressions, whereas processparamfile contains the names of the process parameters. The default name for this file is of the form instname.process.mcparam, where instname is the name of the Monte Carlo analysis instance. This file is created in the psf directory by default, unless you specify an alternative location with filename.

firstrun:(default=1)

Specifies the index of the first iteration. If the first iteration is specified as some number n greater than one, then the beginning n-1 iterations are skipped, that is, the Monte Carlo analysis behaves as if the first n-1 iterations were run, but without actually performing the child analyses for these iterations. The subsequent stream of random numbers generated for the remaining iterations will be the same as if the first n-1 iterations were actually run. By specifying the first iteration number and the same value for seed, you can reproduce a particular run or sequence of runs from a previous experiment (for example, to examine an outlier case in more detail).

variations={process,mismatch,all} (defaults to process).

Determines whether to apply only process (batch-to-batch) variations, or only mismatch (per-instance) variations, or both. This parameter assumes that you have specified appropriate statistical distributions in the statistics block. You cannot request that mismatch variations be applied unless you have specified mismatch statistics in the statistics block. You cannot request that process variations be applied unless you have specified process statistics in the statistics block.

saveprocessvec=[rshsp TOX ...]

If saveprocessparams is set to yes, this parameter saves the process (batch-to-batch) values of only those parameters that are listed in saveprocessvec to the processparamfile. This acts as a filter so that you do not save all process parameters to the file. If you do not want to filter the list of process parameters, do not specify this parameter.

donominal={yes,no}(defaults to yes).

Controls whether Spectre should perform a nominal run before starting the main Monte Carlo loop of iterations. If any errors are encountered during the nominal run (for example, convergence problems, incorrect expressions, and so on) then Spectre issues an appropriate error message and immediately abandons the Monte Carlo analysis.

If set to no, Spectre runs only the Monte Carlo iteration, and does not perform nominal analysis. If any errors are encountered during the Monte Carlo iterations, Spectre issues a warning and continues with the next iteration of the Monte Carlo loop.

addnominalresults={yes,no} (defaults to no).

Controls whether Spectre should append a nominal run results after the Monte Carlo run results in the data files.

paramdumpmode={yes,no}(defaults to no).

Controls whether Spectre should dump out each process/mismatch parameter distribution type, mean value, s.t.d. value, and correlation information into additional parameter files. The names for these files are instname.process_full.param, instname.mismatch_full.param, instname.process.correlate.param and instname.mismatch.correlate.param, where instname is the name of the Monte Carlo analysis instance.

dumpseed={yes,no} (defaults to no).

Controls whether Spectre should dump out seed parameter and iteration number into instname.seed file, where instname is the name of the Monte Carlo analysis instance.

nullmfactorcorrelation={yes,no} (defaults to no).

Controls whether Spectre should emulate a 0% correlation for mismatch devices with m-factor.

appendsd={yes,no}(defaults to no).

Specifies whether to append scalar data to an existing scalarfile, or to overwrite the existing scalarfile. This flag applies to both the scalar file and the processscalarfile.

savefamilyplots={yes,no}.

If set to yes, a data file (for example, psf) is saved for each analysis for each Monte Carlo iteration, in addition to the expressions scalar results that are saved to the ASCII scalar data file at the end of each iteration. Saving the full data files between runs enables the cloud plotting feature (overlaid waveforms) in ADE. It also enables you to define/evaluate new calculator measurements after the simulation has been run using the ViVA XL calculator. This feature could result in a huge amount of data being stored to disk, and it is advised that you use this feature with care. If you do decide to use this feature, it is advisable to keep the saved data to a minimum. If this parameter is set to no, data files are overwritten by each Monte Carlo iteration.

savedatainseparatedir={yes,no}.

If set to yes, a data file (for example, psf) is saved for each analysis for each Monte Carlo iteration in a separate directory, in addition to the expressions scalar results that are saved to the ASCII scalar data file at the end of each iteration. This feature can result in a huge amount of data being stored to the disk. Therefore, it is recommended that you use this feature with care and keep the saved data to a minimum. If this parameter is set to no, data files are overwritten by each Monte Carlo iteration.

annotate={no,title,sweep,status}

Specifies the degree of annotation. Use the maximum value of status to print a summary of the runs that did not converge, had problems evaluating expressions, and so on.

Hints to Improve Performance:

To get better run performance on small-sized designs, it is recommended to use the following settings:

1) Set the global option "narrate=compact" to reduce the annotation messages

2) Reduce the number of saved signals, or use the "save=nooutput" option

3) Use just the measure statement to measure the simulation results

Examples

// do a Monte Carlo analysis, with process variations only
// useful for looking at absolute performance spreads
mc1 montecarlo variations=process seed=1234 numruns=200 {
  dcop1 dc      // a child analysis
  tran1 tran start=0 stop=1u    // another child analysis
  // expression calculations are sent to the scalardata file
  export slewrate=oceanEval("slewRate(v("vout"),10n,t,30n,t,10,90 )")
}
// do a Monte Carlo analysis, with mismatch variations only
// useful for detecting spreads in differential circuit 
// applications, etc. Do not perform a nominal run.
mc2 montecarlo donominal=no variations=mismatch seed=1234 numruns=200 {
  dcop2 dc
  tran2 tran start=0 stop=1u
  export slewrate=oceanEval("slewRate(v("vout"),10n,t,30n,t,10,90 )")
}
// do both together...
mc3 montecarlo saveprocessparams=yes variations=all numruns=200 {
  dcop3 dc
  tran3 tran start=0 stop=1u
  export slewrate=oceanEval("slewRate(v("vout"),10n,t,30n,t,10,90 )")
}

Specifying Parameter Distributions Using Statistics Blocks

The statistics blocks are used to specify the input statistical variations for a Monte Carlo analysis. A statistics block may contain one or more process blocks (which represent batch-to-batch  type variations) and/or one or more mismatch blocks (which represents on-chip or device mismatch variations), in which the distributions for parameters are specified. Statistics blocks may also contain one or more correlation statements to specify the correlations between specified process parameters, and/or to specify correlated device instances (for example matched pairs). Statistics blocks may also contain a truncate statement that may be used for generating truncated distributions. The distributions specified in the process block are sampled once per Monte Carlo iteration and are typically used to represent batch-to-batch or process variations, whereas the distributions specified in the mismatch block are sampled on a per subcircuit instance basis and are typically used to represent device-to-device mismatch for devices on the same chip. In the case where the same parameter is subject to both process and mismatch variations, the sampled process value becomes the mean for the mismatch random number generator for that particular parameter.

Note: Multiple statistics blocks can exist, and in that case the blocks either accumulate or overlay. Typically, process variations, mismatch variations, and correlations between process parameters are specified in one statistics block. A second statistics block should be specified where actual device instance correlations are specified (that is, specification of matched pairs).

Statistics blocks can be specified using combinations of the Spectre keywords statistics, process, mismatch, vary, truncate, and correlate. Braces {} are used to delimit blocks.

The following example shows statistics blocks, which are discussed below along with syntax requirements.

// define some netlist parameters to represent process parameters

// such as sheet resistance and mismatch factors

parameters rshsp=200 rshpi=5k rshpi_std=0.4K xisn=1 xisp=1 xxx=20000 uuu=200

// define statistical variations, to be used

// with a MonteCarlo analysis.

statistics {

process { // process: generate random number once per MC run

vary rshsp dist=gauss std=12 percent=yes

vary rshpi dist=gauss std=rshpi_std // rshpi_std is a parameter

vary xxx dist=lnorm std=12

vary uuu dist=unif N=10 percent=yes

truncate tr=2.0 // +/- 2 sigma

...

}

mismatch { // mismatch: generate a random number per instance

vary rshsp dist=gauss std=2

vary xisn dist=gauss std=0.5

vary xisp dist=gauss std=0.5

truncate tr=7.0 // +/- 7 sigma

}

// some process parameters are correlated

correlate param=[rshsp rshpi] cc=0.6

// specify a global distribution truncation factor

truncate tr=6.0 // +/- 6 sigma

}

//  a separate statistics block to specify correlated (i.e. matched) components

// where m1 and m2 are subckt instances.

statistics {

correlate dev=[m1 m2] param=[xisn xisp] cc=0.8

}

//  a separate statistics block to specify correlation with wildcard, where

// I*.M3 matches multiple subckt instances, for examples, I1.M3, I2.M3, I3.M3, etc..

// Only the asterisk (*) is recognized as a valid wildcard symbol.

statistics {

correlate dev=[ I*.M3 ] param=[misx mixy] cc=0.8

}

Specifying Distributions

Parameter variations are specified using the following syntax:

vary PAR_NAME dist=<type> {std=<value> | N=<value>} {percent=yes|no}

The following types of parameter distributions are available: gaussian, lognormal, uniform, set-uniform, and gamma, corresponding to the keywords gauss, lnorm, unif, 'sunif', and 'gamma' respectively. For the gauss, the lnorm and the 'gamma' distributions, you specify a standard deviation using the std keyword.

Gaussian Distribution

For the gaussian distribution, the mean value is taken as the current value of the parameter being varied, giving a distribution denoted by Normal (mean,std). Using the example above, parameter rshpi is varied with a distribution of Normal (5k,0.4k)

Lognormal Distribution

The lognormal distribution is denoted by:

log(x) = Normal( log(mean), std )

where, x is the parameter being specified as having a lognormal distribution.

Note: log() is the natural logarithm function. For parameter xxx in the example, the process variation is according to:

log(xxx) = Normal( log(20000), 12 )

Uniform Distribution

The uniform distribution for parameter x is generated according to:

x = unif(mean-N, mean+N)

The mean value is the nominal value of the parameter x, and the parameter is varied about the mean with a range of +/- N. The standard deviation is not specified for the uniform distribution, but its value can be calculated by using the formula: std=N/sqrt(3).

Set-uniform Distribution

Set-uniform, or discrete uniform, distribution is specified by a finite set of values values=[val1 val2 ... valN] that are equally likely to be observed. Values can be provided one by one, or using range(<min>, <max>, <step>), or using expression <min>:<step>:<max>.

Gamma Distribution

Similar to Gauss distribution, the mean value for gamma distribution is the current value of the parameter being varied, giving a distribution denoted by Gamma(mean,std). The correponding shape parameter 'alpha' and scale parameter 'beta' are:

alpha = ( mean / std )^2

beta  = ( std )^2 / mean.

Notice: truncation factor is not available for gamma distribution, and it will always be complete gamma distribution for any set value of truncation factor.

Values as Percentages

The percent flag indicates whether the standard deviation std or uniform range N are specified in absolute terms (percent=no) or as a percentage of the mean value (percent=yes). For parameter uuu in the example above, the mean value is 200, and the variation is 200 +/- 10%*(200) i.e. 200 +/- 20. For parameter rshsp, the process variation is given by Normal (200, 12%*(200)), that is, Normal (200, 24). It is recommended that you do not use percent=yes with the lognormal distribution.

Process and Mismatch Variations

The statistics specified in a process block are applied at global scope, and the distributions are sampled once per Monte Carlo iteration. The statistics specified in a mismatch block are applied on a per-subcircuit instance basis, and are sampled once per subcircuit instance. If you place model cards and/or device instances in subcircuits, and add a mismatch block to your statistics block you can effectively model device-to-device mismatch for these devices/models.

Correlation Statements

There are two types of correlation statements that you can use: process parameter correlation statements and instance correlation statements.

Process Parameter Correlation

The syntax of the process parameter correlation statement is:

correlate param=[list of parameters] cc=<value>

This allows you to specify a correlation coefficient between multiple process parameters. You can specify multiple process parameter correlation statements in a statistics block to build a matrix of process parameter correlations. During a Monte Carlo analysis, process parameter values are randomly generated according to the specified distributions and correlations.

Mismatch Correlation (Matched Devices)

The syntax of the instance or mismatch correlation statements are:

correlate dev=[list of subcircuit instances] {param=[list of parameters]} cc=<value>

correlate dev=[<wildcard expr>] {param=[list of parameters]} cc=<value>

where, the device or subcircuit instances to be matched are listed in the list of subcircuit instances or regular expressions with asterisk (*), and the list of parameters specifies exactly which parameters with mismatch variations are to be correlated.

The instance mismatch correlation statement is used to specify correlations for particular subcircuit instances. If a subcircuit contains a device, you can effectively use the instance correlation statements to specify that certain devices are correlated (that is, matched) and give the correlation coefficient. You can optionally specify exactly which parameters are to be correlated by giving a list of parameters (each of which must have had distributions specified for it in a mismatch block), or specify no parameter list, in which case all parameters with mismatch statistics specified are correlated with the given correlation coefficient. The correlation coefficients are specified in the <value> field and must be between +/- 1.0.

Note: Correlation coefficients can be constants or expressions, as can std and N when specifying distributions.

Truncation Factor:

The default truncation factor for gaussian distributions (and for the gaussian distribution underlying the lognormal distribution) is 4.0 sigma. Randomly generated values that are outside the range of mean +/- 4.0 sigma are automatically rejected and regenerated until they fall inside the range. You can change the truncation factor using the truncate statement. The syntax is:

truncate tr=<value>

The following conditions should be considered while setting the truncate factor: The value of the truncation factor can be a constant or an expression.

Parameter correlations can be affected by using small truncation factors.

There are different truncate for process and mismatch blocks. If a truncate for process or mismatch block is not given, it will be set to the value of truncate in statistic block.

Notice: truncation factor is not available for gamma distribution, and it will always be complete gamma distribution for any set value of truncation factor.


Return to top
 ⠀
X