Product Documentation
Spectre Classic Simulator, Spectre APS, Spectre X, Spectre XPS, Spectre FMC Analysis, and Legato Reliability Solution User Guide
Product Version 23.1, September 2023

6


Spectre FMC Analysis

As the process feature sizes have scaled down, the impact of device mismatch on circuit performance has increased and more Monte Carlo simulations are required to analyze the impact of this mismatch on performance metrics. With standard Monte Carlo algorithms, it is not feasible (high cost) to complete even the one million Monte Carlo simulations needed in memory design to determine 4 sigma yield numbers. For high-sigma yield analysis, more than one billion simulations would be required.

Spectre FMC Analysis has an advanced algorithm to accelerate the high-sigma yield estimation. It lets you extract the useful statistical information without running the full set of Monte Carlo samples, especially for high-sigma analysis.

For more details, refer to the following topics:

Technology and Overview

Use Model and Applications

Setup to Enhance the Performance of a Fast Monte Carlo Simulation

Post-Process Fast Monte Carlo Data

Technology and Overview

Fast Monte Carlo runs a group of samples initially and obtains the measurements. Then, the library with newer algorithm builds a model and predicts the worst sample based on the result and specifications set by user. It may take a few group iterations from model building, worst sampling prediction and verification to find out the tail of distribution. This Fast Monte Carlo technology improves performance greatly and reduces memory cost when compared to the normal Monte Carlo simulation.

In addition to the new approach adopted in Monte Carlo Analysis and the auto-stop enabled to shorten the simulation time, Fast Monte Carlo also supports multi-processes distribution to further speed up the performance. Sample generation, model evaluation and simulation are now processed by parallel workers.

A typical distribution flow for Fast Monte Carlo is shown below.

Use Model and Applications

In addition to the brute-force setup, the use model for Fast Monte Carlo analysis involves the following tasks:

Setting up a Fast Monte Carlo Goal

Specifying the Fast Monte Carlo Method

Enabling Sweep Sigma Trend with Fast Monte Carlo in a Single Run

Specifying Other Parameters for Fast Monte Carlo

Enable Moments in Fast Monte Carlo

Yield Estimation with Brute Force Monte Carlo

Setting up a Fast Monte Carlo Goal

From the netlist, identify a list of measurements that are used to verify the correct functional behavior of the design under test and specify those measurements as goals to drive the high-sigma analysis.

You can specify goals by using the target block in the statistics statement. Syntax of the target block is shown below.

The syntax for this block is as follows;

statistics {
target {
goal <measurement_name> min=<value>
goal <measurement_name> max=<value>
goal <measurement_name> min=<value> max =<value>
}
}

You can specify either a single measurement name with a min goal, max goal or both min and max goals, or multiple measurement names with a min goal, max goal or both min and max goals.

The keyword of max intends to look for the worst tails on the positive sigma side of the statistics distribution while min is to find the negative sigma side. The values for min and max set the criteria for Spectre to count the number of #pass or #failed for each iteration. They can also be used for setting autostop conditions through parameter fmcnumfails.

Only the measurements specified using .MEASURE syntax can be used as goals in Spectre command-line flow. The goal cannot be from a measurement that is defined using the MDL format or evaluated in a post-processing mode using OCEAN.

An example of a targets block is shown below.

.MEASURE tpdr
+ TRIG v(b) VAL='PWR_SUPPLY/2' FALL=1
TARG v(c) VAL='PWR_SUPPLY/2' RISE=1
.MEASURE tpdf
+ TRIG v(b) VAL='PWR_SUPPLY/2' RISE=1
TARG v(c) VAL='PWR_SUPPLY/2' FALL=1
.MEASURE tpd param='(tpdr+tpdf)/2'
Simulator lang=spectre
// Use the targets block in the statistics statement to
// define which measurements are to be analyzed with FMC
statistics { targets {
goal tpd min=8p max=10p
}
}

Best practices to avoid unnecessary issues that may seem like a product defect:

Specifying the Fast Monte Carlo Method

Use the fmcmethod parameter to specify the method or algorithm to be used and the outputs required for your design. FMC can use three methods, worstsample, yield, and yieldest to obtain the statistical result. Amongst the first two, it is recommended to use worstsample because it allows exploration of high-sigma tails with more useful information while yield is more of a pass/fail analysis.

The Worstsample Method

For worstsample, specify any two of the following three parameters in the Monte Carlo statement.

Parameter Description

numruns

Controls the MC sample space of interest, or the total number of MC samples to be considered while trying to find the worst-case samples.

fmcinitruns=50

Specifies the number of runs in FMC initial group to build the model.

fmcsigma

Specifies a target yield in an easier form like a sigma value. Instead of specifying at target yield of 99.996832875816693 %, the user can specify it as a sigma value, fmcsigma=4. The maximum sigma value supported is 6 sigma.

fmcnumtailsamples

Controls the number of high sigma tail samples to be estimated.

The following are examples of multiple combinations of any two parameters:

The following settings are equivalent because for one million samples, the sample at 4.2 sigma is the 14th worst sample while FMC will report 14 samples and the sigma range is (4.2, 4.89) when numruns=1M fmcsigma=4.2.

 "numruns=1M fmcsigma=4.2, or 
 "fmcsigma=4.2 fmcnumtailsamples=14, or
 "numruns=1M fmcnumtailsamples=14

Below are examples of multiple combinations of any two parameters.

mc1 montecarlo numruns=20000 firstrun=1 seed=12345 variations=all \
donominal=no savefamilyplots=no \
fmcmethod=worstsample fmcsigma=3 {
tran tran step=1p stop=2n
}

The Yieldest Method

Spectre FMC estimates the failure rate based on the boundaries of measurement goal with much fewer sample set by fmcbudget. This feature provides the approximation result so that you can use it as a reference to set up the FMC worst sample simulation if you don't know what yield is expected for the design.

mc1 montecarlo numruns=1e+6 fmcmethod=yieldest fmcbudget=3000 “
fmcconfidence=0.95 {
tran tran step=1p stop=tran_time autostop=yes method=gear2
}

Enabling Sweep Sigma Trend with Fast Monte Carlo in a Single Run

Use the fmcsweepsigma parameter to yes to enable sweeping of variations from 3 sigma to a high sigma achieved with the number of samples in stages. It allows to get the entire trend in a single FMC run instead of running multiple simulations for 3 sigma, 4 sigma, 5 sigma and 6 sigma separately.

The following example shows how fmcsweepsigma is specified in the montecarlo statement:

mc1 montecarlo fmcmethod=worstsample numruns=1e6 fmcnumtailsamples=14 
fmcsweepsigma=yes {tran tran stop=2n }

When running high sigma simulation is too expensive, this sigma sweeping based on lower sampling numbers can provide an idea of high sigma.

When fmcsweepsigma is enabled, the simulation saves a file named worst_by_stage_*.csv. You can post-process this file with a python script plot_sweep_sigma.py to generate the sigma trend plots.

Related Topic

plot_sweep_sigma

Specifying Other Parameters for Fast Monte Carlo

The following table describes other Fast Monte Carlo parameters supported by Spectre.

Parameter Description

fmcconfidence=0.95

Specifies the confidence value in the range 0.5 to 1. Default value is 0.95.

fmcinitruns=50

Specifies the number of runs in Fast Monte Carlo initial group required to build the model.

fmcnumfails=0

Stops a certain spec during Fast Monte Carlo process when the number of failed iterations reach the value set for this parameter.

By default, Fast Monte Carlo does not check failed iterations.

fmcdumpcontribution=0

Saves device mismatch contribution into the default Fast Monte Carlo file, netlist.fmc.log, in the descending order.

Specify a positive value to save the number of devices for contribution. Specify a negative value to save the contribution for all devices. Specify zero to turn off the output.

Enable Moments in Fast Monte Carlo

The Fast Monte Carlo analysis is designated to identify the worst samples at both tails of distribution so that the moments are not supported by default. It can support the moments by increasing the default value of the fmcinitruns parameter from 50 to 1000. You can define this parameter explicitly in Monte Carlo statement to override the default number.

When the following statement is set, the moments computation for target goal distributions is enabled.

mc1 montecarlo numruns=1e+6 firstrun=1 seed=12345 variations=all 
donominal=no savefamilyplots=no
fmcmethod=worstsample fmcsigma=4.2 fmcmoments=yes {
tran tran step=1p stop=tran_time autostop=yes method=gear2
}

Initial group of size 1000 samples is used to compute the moments.

When simulation is done, the information about moments of 1000 samples is saved in the last section of output file of *.fmc.log as given below.

FMC moments of spec distributions:
Spec: tpd
Mean = 1.2226e-11
Variance = 1.49197e-24
Stddev = 1.22146e-12
Skewness = 0.662279
Kurtosis = 0.981272

Yield Estimation with Brute Force Monte Carlo

To estimate the sigma for the measurement goal with much fewer samples, you can use the spectre_yieldest command. This command runs the Brute Force Monte Carlo simulation.

Syntax:

spectre_yieldest [spectre_cmds...] [yieldest_cmds...] netlist_with_mc

where,

spectre_cmds can be +aps +mt=2

yieldest_cmds can be one or more of the following:

netlist_with_mc is a regular netlist file that contains Monte Carlo analysis and statistical target (goal) definition. The netlist or configure file that contains the Monte Carlo analysis and the target goal has to be specified at the end of the command line.

For consistent results between Fast Monte Carlo and Brute Force Monte Carlo, ensure that the sampling, firstrun, and seed parameters have the same values for both simulations. In Spectre, the default value of sampling method is standard. The default method in ADE is lds.

Setup to Enhance the Performance of a Fast Monte Carlo Simulation

The run time is truly critical when the sampling number of Monte Carlo runs a million times for a high sigma requirement. You can use the following features to enhance the performance of a Fast Monte Carlo run:

Distributing a Fast Monte Carlo Run

Parameters to Accelerate Performance

Enabling AutoStop to Save Run Time

Distributing a Fast Monte Carlo Run

The distribution process can be launched by +mp specified in Spectre command line. It is always recommended to enable +mp for Fast Monte Carlo to build up the model and predict worst samples with multiple workers to achieve the best performance speedup.

The Fast Monte Carlo analysis supports three distribution mechanisms.

When using fork in distribution mode on a terminal of the requested farm machine, add +mplauncher=ksh in the command line to run all distributed processes on the same machine locally. Otherwise, Spectre launches multiple processes when it detects a farm environment.

Parameters to Accelerate Performance

You can add the following parameters in the Monte Carlo statement to accelerate the performance of a simulation:

Parameter Description

fmcmode=fast

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

fmcmaxbufsize=1

Specifies the FMC maximum buffer size. Default value is 1GB.

For each process to store and process the sampling data, Spectre allocates memory of the size set by fmcmaxbufsize. If the assigned buffer size is less than the required size, the run time is limited due to the insufficient memory size. You can set fmcmaxbufsize to a larger size according to the physical memory size of the host to speed up the performance. Spectre automatically reduces the buffer size to the required size if fmcmaxbufsize is more than the size required.

Enabling AutoStop to Save Run Time

The target goal is defined by the .measurement statement. Most of time, the measurements are achieved prior to the stop time set in transient. You can stop the transient simulation once the measurements are completed to save the simulation time further.

Alternatively, enable auto-stop by setting autostop=yes in the transient statement.

tran tran step=1p stop=tran_time autostop=yes

Post-Process Fast Monte Carlo Data

Spectre provides the following two commands to let you post process the Monte Carlo data:

spectre_fmcverifier

plot_sweep_sigma

spectre_fmcverifier

This command lets you view the sample data distribution for the Brute Force Monte Carlo and Fast Monte Carlo, use the spectre_fmcverifier binary utility. It plots the QQ plot and histogram plot.

Syntax

spectre_fmcverifier [-h] [-mc MC] [-mcdir MTCDIR] [-csvbfmc CSVBFMC] 
[-legendloc LEGENDLOC] [-worstnum WORSTNUM]
[-fmc FMC] [-csvfmc CSVFMC] [-fmcnumruns FMCNUMRUNS] [-goal GOAL]
[-qqplot] [-histo] [-plotsigma] [-plotall] [-switch]

Options

Parameter Description

-h

Prints this help message and exits.

-mc MC

Specifies brute force montecarlo results mt0 file or MC scalar file (mcdat file).

-mcdir MCDIR

Specifies the results directory for brute force montecarlo, the binary collects all the mt0 files in the directory.

-csvbfmc CSVBFMC

Specifies brute force montecarlo results in CSV file.

-legendloc LEGENDLOC

Specifies the legend location. Default is UL (upper left). You can change it to LR (lower right), LL, or UR.

-worstnum WORSTNUM

Specifies the worst #num samples to search from brute force montecarlo results mt0.

-fmc FMC

Specifies the Spectre public logs. For example,

-fmc "log1 log2"

-csvfmc CSVFMC

Specifies FMC result in .csv file. You also needs to provide fmc numruns by -fmcnumruns, to enable the tool to plot qqplot.

-fmcnumruns FMCNUMRUNS

Specifies FMC numruns by this parameter if want to plot qqplot by read fmc data through csv file. This number must be smaller or equal to the BFMC total numruns.

-goal GOAL

Specifies the FMC goal(s) want to check. For example,

-goal "spike droop"

-qqplot

Plots QQ-plots for FMC and BFMC. Comparison table is printed by default.

-histo

Plots a histogram for BFMC data.

-plotsigma

Plots a sigma distribution for different FMC number runs.

-plotall

Plots both QQ-plot and histogram.

-switch

Switches QQ-plot X/Y axis as sigma vs goal, instead of goal vs sigma.

plot_sweep_sigma

This python script post processes the data from FMC sigma sweeping. The output file worst_by_stage_*.csv is generated from FMC simulation with the goal name.

A file with *_H in its name contains the sigma values on maximum boundary. A file with *_L in its name contains the sigma values on minimum boundary.

Syntax

plot_sweep_sigma.py [options]

Options

Parameter Description

-h, --help

Displays this help message and exits

FILE, --file=FILE

Worst by stage file.

-l, --left

Extrapolates left tail.

-m MEASURE,
--measure=MEASURE

Name of the measurement.

-q, --quiet

Specifies whether to print status messages to stdout

Examples:

%cdspython -64 ../bin/plot_sweep_sigma.py 
-f out_sweep_sigma_1M_mp32/worst_by_stage_tpd_H.csv -m tpd
%cdspython -64 ../bin/plot_sweep_sigma.py -h


Return to top
 ⠀
X