To enable Monte Carlo methods, a statistical model is needed. This is a model ..... However, it is difficult to determin
Statistical Modeling for Monte Carlo Simulation using Hspice
Kerwin Khu
Chartered Semiconductor Manufacturing Ltd
[email protected]
ABSTRACT With today's stringent design margins, designers can no longer rely on fixed corner models to produce optimal designs. Monte Carlo simulation is essential for generating realistic worst-case conditions in circuit simulators. To enable Monte Carlo methods, a statistical model is needed. This is a model that not only describes the expected device performance, but the expected variation as well. This paper shows how a statistical model can be developed from fixed corner models. Foundries or library vendors normally provide at least 3 fixed corner models (for typical, fast, and slow cases). The method described here uses the parameters of the fixed corner models to generate the appropriate variation. This paper will also show sample circuits that demonstrate the benefits of having a statistical model.
Table of Contents 1.0 1.1 1.2 1.2.1 1.2.2 2.0 2.1 2.1.1 2.1.2 2.2 2.3 2.4 2.5 3.0 4.0 5.0
Background ........................................................................................................................3 Process Variations..............................................................................................................3 Application in Design ........................................................................................................3 Overdesign .....................................................................................................................3 Digital Corners...............................................................................................................4 Statistical Modeling ...........................................................................................................4 Statistical vs. Corner ..........................................................................................................4 Corner Model as Special Case of Statistical Model.......................................................4 Key Outputs ...................................................................................................................5 Determining NMOS Variance and PMOS Variance .........................................................5 Determining NP Covariance ..............................................................................................6 Illustration of Statistical Model Matching .........................................................................7 Examples of Monte Carlo Simulation ...............................................................................8 Conclusions and Recommendations ..................................................................................9 Acknowledgements............................................................................................................9 References..........................................................................................................................9
Table of Figures Figure 1 – Data spread vs. Fixed Corners ......................................................................................3 Figure 2 – NMOS vs. PMOS Scatter Plot......................................................................................5 Figure 3 – Determining statistical parameters from corner parameters (illustration) ....................6 Figure 4 – Effect of correlation on Monte Carlo simulation..........................................................6 Figure 5 – Example Output Scatter Plot ........................................................................................7 Figure 6 – Transfer function of a CMOS inverter (DC analysis)...................................................8 Figure 7 – Waveform of a Ring Oscillator (Transient analysis) ....................................................8 Figure 8 – Gain Bandwith of a CMOS amplifier (AC analysis)....................................................9
SNUG Singapore 2006
2
Statistical Modeling for MC Simulation
1.0 Background 1.1 Process Variations If transistor manufacturing were perfect, there would be no need for statistical modeling. However, variations are inherent in the manufacturing process. The same transistor design can show different performance when fabricated using different equipment, at different locations, or during different times. In order to capture these variations of performance, a statistical model is necessary. 1.2 Application in Design 1.2.1
Overdesign
Designers normally start their design using the nominal values for process parameters. After the initial design is completed, worst-case checking is done by running the design against extreme values for process parameters. In the case of MOSFETs, nominal values are captured in what is known as a “typical” library, while extreme process values are captured in 4 corner libraries called FF, SS, FS, and SF (referring to fast NMOS and PMOS, slow N and P, fast N/slow P, and slow P/fast N, respectively).
Source: Wong, et al [1]
Figure 1 – Data spread vs. Fixed Corners There are some problems with this approach. Chiefly, fixed corners tend to be too pessimistic. As illustrated in Figure 1, there are some extreme combinations of process parameters that are too unrealistic. Thus, a corner-based methodology often leads to overdesign [1]. The design may still work, but it will take a larger die area and more design effort to achieve the same function.
SNUG Singapore 2006
3
Statistical Modeling for MC Simulation
1.2.2
Digital Corners
Another issue is that fixed corners are typically digital corners [2]. That is, a fast MOS, for example, is defined as one where the Ion (on current) is high. Thus, the FF, SS, FS, and SF corners represent process extremes in the case of digital design. But is this still true for the case of analog design? In many cases, Ion is less of a factor and hence the fixed corners may not necessarily represent worst-case conditions for these designs. For these reasons, it is important to have a statistical design methodology to complement or even replace the existing corner-based design methodology.
2.0 Statistical Modeling The first step to statistical design is to ensure that the components needed are available. The two main requirements are an EDA tool and a statistical model. Fortunately, commercial SPICE simulators such as HSPICE have long had a Monte Carlo simulation option. The other requirement is a statistical model. Currently, some foundries and library vendors provide statistical models as part of their standard offering, but there are still others who do not. Furthermore, some of those that do offer statistical models may not have done rigorous testing to ensure consistency between the statistical and corner models. The following sections describe how to build a statistical model from vendorprovided corner models. 2.1 Statistical vs. Corner A statistical model (in our context) is just a SPICE-compatible model, like any other foundry or library vendor model, with one key difference. The process parameters are not fixed values, but instead are defined in terms of statistical distributions. 2.1.1
Corner Model as Special Case of Statistical Model
Due to the similarity of the statistical model to the fixed corner model, it is not hard to see that the statistical model is a generalization of the various corner models. Put another way, the corner models are specific instances of the statistical model, when the statistical model has extreme process values. This means that it is possible to generate corner models from the statistical model, given sufficient number of Monte Carlo runs. Conversely, it should be possible to determine the variations in the statistical model if the extreme process values and the process value distribution are known. The extreme process values can be read directly from the corner models. If the actual process value distribution is not known (which is likely the case), then a Gaussian distribution is a safe assumption.
SNUG Singapore 2006
4
Statistical Modeling for MC Simulation
2.1.2
Key Outputs
Before moving on to the process of building a statistical model, first consider the following scatter plot. Figure 2 shows an N vs. P plot with three key pieces of information: The spread (distribution) of the NMOS data, the spread of the PMOS data, and the correlation of the NMOS to the PMOS.
Figure 2 – NMOS vs. PMOS Scatter Plot The actual data being plotted could be any of several key figures of merit. For digital applications, the plots could be NMOS Ion vs. PMOS Ion, and NMOS Vt vs. PMOS Vt. For analog applications, it could be Gm or Gds at various biases.
2.2 Determining NMOS Variance and PMOS Variance If we assume that the process parameters follow a Gaussian distribution, then the NMOS and PMOS variances can be determined if we know the extreme process parameter values. These values can be read directly from the vendor’s corner model libraries. If for some reason this is not available, these values can be estimated from the silicon vendor’s process documentation. As illustrated in Figure 3, the statistical model’s parameters can be determined in a straightforward manner by assigning to each parameter Pj a distribution such that: Pj = agauss( PjTT , 12 ( PjFF − PjSS ), σ )
, ∀j
(1)
Where agauss is the HSPICE absolute gaussian function [3], PjTT , PjFF , and PjSS are the parameter values for the typical, fast, and slow libraries, respectively, and σ is the sigma difference that the fast and slow libraries represent (usually, it is 3 σ ).
SNUG Singapore 2006
5
Statistical Modeling for MC Simulation
If:
u0_tt = 0.01 u0_ff = 0.01 + 0.002 u0_ss= 0.01 – 0.002
Then: In stat model: u0 = agauss(0.01, 0.002, 3) Figure 3 – Determining statistical parameters from corner parameters (illustration) This procedure is repeated for each parameter Pj for which the typical (TT) and FF/SS libraries have different values. This is done for both the NMOS and PMOS models.
2.3 Determining NP Covariance The correlation of NMOS to PMOS is just as important as the absolute spread. If correlations are ignored, unphysical combinations can result [4].
Source: Inohira, et al [4]
Figure 4 – Effect of correlation on Monte Carlo simulation However, it is difficult to determine the correlation without a lot of statistical data. The best case is if the silicon vendor provides this data. Otherwise, estimating it with a reasonable value (say, correlation factor = 0.5) is better than assuming the correlation to be 0. Correlation in the statistical model can be achieved by using parameter values of this form:
SNUG Singapore 2006
6
Statistical Modeling for MC Simulation
Pj = c ⋅ Pjc + 1 − c ⋅ Pju
, ∀j
(2)
Where c is the correlation factor (a number between 0 and 1 inclusive), and Pjc and Pju are the correlated and uncorrelated components of Pj , respectively. Both Pjc and Pju take the form of (1). Equation (2) follows from the identity σ P2j ≡ σ P2jc + σ P2ju ; that is, the total variance in the parameter Pj comes from both the correlated and uncorrelated components. Equation (2) takes a slightly different form than in [7], but is based on the same principle. Combining (2) with (1), we get the final form: Pj = c ⋅ agauss( PjTT , 12 ( PjFF − PjSS ), σ ) + 1 − c ⋅ agauss( PjTT , 12 ( PjFF − PjSS ), σ )
, ∀j
Or, equivalently:
(
Pj = PjTT + 12 ( PjFF − PjSS ) c ⋅ agauss(0,1, σ ) + 1 − c ⋅ agauss(0,1, σ )
)
, ∀j
(3)
This is the final form of the equation that can be used for generating statistical models.
2.4 Illustration of Statistical Model Matching The following scatter plots illustrate the modeled distribution of certain key parameters plotted vs. the values predicted by the corner models. N vs P 4x1 Idsat (uA/um) NIdsat (uA/um)
PIdsat (uA/um)
250
300
350
400
-220 -210 -200 -190 -180 -170 -160 -150 -140 -130 -120
450
500
550
MC Corners
Figure 5 – Example Output Scatter Plot
SNUG Singapore 2006
7
Statistical Modeling for MC Simulation
2.5 Examples of Monte Carlo Simulation This example shows the Monte Carlo simulation of the transfer function of a CMOS inverter
Figure 6 – Transfer function of a CMOS inverter (DC analysis)
This example shows the Monte Carlo simulation of the waveform of a ring oscillator.
Figure 7 – Waveform of a Ring Oscillator (Transient analysis)
SNUG Singapore 2006
8
Statistical Modeling for MC Simulation
This example shows the Monte Carlo simulation of the gain bandwidth of a CMOS amplifier
Figure 8 – Gain Bandwith of a CMOS amplifier (AC analysis) These examples illustrate different ways in which a statistical model can be utilized, showing the best case and worse case performance, as well as the distribution.
3.0 Conclusions and Recommendations This paper presents a method to quickly generate a statistical model from data normally provided by the silicon vendor. This is a “paper” model – that is, it is not verified on silicon – but it can be used for initial Monte Carlo simulations or for comparison with the vendor’s own statistical model.
4.0 Acknowledgements Many thanks to my supervisor Yoo Yong Koo, and to Chew Kok Wai, Nikholas Toledo, and Michael Cheng, all of Chartered Semiconductor Manufacturing, for their valuable contributions and insight. Thanks also to Lim Guan Hui of National Technological University for his review and comments.
5.0 References [1] Ban P. Wong, Anurag Mittal, Yu Cao, and Greg Starr, Nano-CMOS Circuit and Physical Design. Wiley 2005.
SNUG Singapore 2006
9
Statistical Modeling for MC Simulation
[2] Colin McAndrew, “Statistical Modeling for Circuit Simulation”, 2003 Proc. Int. Symp. on Quality Electronic Design, San Jose, 2003. [3] HSPICE Simulation and Analysis User Guide. March 2005. [4] S. Inohira, T. Shinmi, M. Nagata, T. Toyabe, K. Iida, “A Statistical Model Including Parameter Matching for Analog Integrated Circuits Simulation”, IEEE Trans. Computer-Aided Design, Vol. 4, Oct 1985. [5] Steven Duvall, “Statistical Circuit Modeling and Optimization”, 2000 Proc. Int. Workshop on Statistical Modeling, Berlin, Oct 2000. [6] Christopher Michael and Mohammed Ismail, Statistical Modeling for Computer-Aided Design of MOS VLSI Circuits. Kluwer 1993. [7] Colin McAndrew and Patrick Drennan, “Device Correlation: Modeling using Uncorrelated Parameters, Characterization Using Ratios and Differences”, 2006 Proc. Workshop on Compact Modeling, Boston, 2006.
SNUG Singapore 2006
10
Statistical Modeling for MC Simulation