Monte Carlo analysis is a statistical technique used to analyze the behavior of a circuit under varying conditions of PVT (Process, Voltage and Temperature) caused by manufacturing or environmental variations (temperature, voltage, mismatch, etc)
The Monte Carlo simulation allows us to design a robust and reliable circuit, estimating how sensitive the circuit is to process variation and mismatch between devices on a single chip or wafer.
Let’s explore Monte Carlo in more detail…
Contents
The Monte Carlo Analysis is often confused with Corner analysis, because both techniques check how the circuit behaves under variations in process, supply and temperature (PVT) parameters… but they are slightly different!
Corners Analysis
The Corner analysis simulates the circuit with a combination of extreme process and environmental variations. It models the minimum and maximum values of each variation in device parameter caused by fabrication process deviations. However, it does not account for mismatch between devices!
The corner analysis can overcomplicate the problem, making it more challenging that it really is
Corner simulations model extreme cases that are highly unlikely to occur in real fabrication processes due to the inherent correlation between parameters.
Provides the worst-case scenario. If it works with corners, it will work at any PVT at the fabricated wafer.
Deterministic simulation. It simulates the 100% of the cases.
The number of simulations increase exponentially with each new variation parameter.
Does not account for random variations or mismatch between devices.
Worst extreme cases do not represent real-world variations (correlation).
Example
If the CMOS gate oxide thickness is large for NMOS, it will also be large for the PMOS. It is unrealistic to simulate a scenario where the thickness of the NMOS is at its minimum while the PMOS is at its maximum.
However, Corner analysis guarantees that the circuit will work under all possible conditions. Nevertheless, it often leads to overdesigning the circuit.
A standard corner analysis can involve numerous simulations, (i.e. 64, 128, 256, 512, etc) taking the maximum and the minimum values of the process variables. Here’s a simple example:
- CMOS thickness: wp, ws, wo, wz.
- Resistor value: wp, ws.
- Capacitor value: wp, ws.
- Temperatures: -40, 27 and 125ÂşC
- Voltage supply: depend on your supply source
A number of simulations: 4CMOS*2RES*2CAP*2TEMP*2Vsupply + Nominal= 65
The nomenclature used on the corner configuration varies from technology to technology. Some of the
- tm = typical
- ws = worst speed
- wp = worst power
- wo = worst one (fast NMOS & slow PMOS)
- wz = worst zero (slow NMOS & fast PMOS)
- tt = typical
- ff = fast NMOS fast PMOS
- ss = slow NMOS slow PMOS
- sf = slow NMOS fast PMOS
- fs = fast NMOS slow PMOS
Monte Carlo Simulation
Monte Carlo analysis is based on statistical distributions models.
It realistically simulates mismatches and process variation. During each simulation run, it calculates every variation parameter randomly according to a statistical distribution model.
The drawback of Monte Carlo is the large number of simulations required to achieve acceptable results. To obtain a significat sample, the number of simulations should be at least 200 and can go up to thousands. Although there is no minimum number of required simulations, as a rule of thumb, the more simulations performed, the more statistically significant the results will be.
Provides the a realistic-case scenario. If it works with corners, it will work at any PVT at the fabricated wafer.
Statistical simulation. It never simulates the 100% of the cases. The output is a statistical distribution of metrics.
The number of simulation is high. High computational power needed.
Complex to set up properly. Select the correct config, models, etc.
The amount of simulations to run with Monte Carlo, is much higher in comparison to the Corner analysis.
Example
Returning to the previous example with the gate oxide thickness. In the corner analysis, the worst-case scenario is simulated by using the minimum and maximum values of the thickness parameter, resulting in a variation of the threshold voltage.
But in real fabrication cases, if the NMOS is thin, the PMOS transistor will have also similar thickness. This area is shown in the yellow region.
Statistical Corner Models
Another type of corner analysis is known as “statistical corner models”. To perform this analysis, the data of thousands of real produced wafers are measured and parametrized. Therefore, the statistical corner analysis considers correlations of map parameters and reduces the variation range.
This analysis improves the Monte Carlo pure statistical method with the feedback of the real wafer measurements.
Example of a Monte Carlo simulation in Cadence
In this example, a relax oscillator is simulated. This clock has a configurable output frequency from 0.84MHz to 1.88MHz depending on a digital input of 4 bits (16 frequency steps).
The methodology is:
- Run anominal simulation to optimize and configure all the metrics.
- Do a corner simulation
- Perform a Monte Carlo
Nominal
First, we make sure that the simulation is working well in nominal conditions and try to shorten the simulation time as much as possible. If you want to run hundreds or even thousands of simulations, you have to optimize your computational resources.
Reduce the computational power:
- Reduce the transient simulation time
- Adjust carefully the resolution steps of each frequency
- Select only the minimal number of nets to be saved. However, they should be the minimum necessary to interpret the results and identify where the problem may come from
In the following picture, the nominal results for the oscillator are shown. The frequency f_0 and f_15 are the values to be tested on the simulation. The nominal values are 836kHz and1.89MHz
Corners
Let’s see later how much do they change with the process variations…
Before Monte Carlo a corner simulation is performed, in order to have a preview of the worst case and see the extremes cases. Monte Carlo results shold be inside the boundaries of the extreme corner cases.
For this example, the Corners simulations looked like:
Monte Carlo
To perform the Monte Carlo, first select the “Monte Carlo Sampling” simulation, as the picture below shows, and choose the number of simulations on the Monte Carlo configuration window:
Later, go to the Corners setup, as shown in the picture below, and choose the parameters to vary, Usually, the temperature, voltage, process and other parameters. In this case, variations on the temperature (-20-to+85°C) and in the power supply from 1.1V to 1.3V. Furthermore, depending on the technology, the model files will vary. In this example, I used 350µm from AMS.
In this other config example, the technology TSMC 180µm is used. I used MC column for Monte Carlo simulation and TT for regular corners simulation. Additionaly, more corners set-up are useful to have, for example, to vary only some parameters for special cases you may encounter. In the next example, I have the column MIM to vary only the MIM-capacitors.
Deactivate the nominal simulation because we already run and saved it. Then, run the Monte Carlo pressing the usual green play button.
The results are shown in the “Yield” window, similar as the picture below. In this window, the average, standard deviation, and other statistical parameters are detailed.
As Monte Carlo produces statistical results, a histogram plot is used to display the results graphically. For this, click on the histogram icon and then select “histogram”, as shown in the screenshot below.
A new window will pop up, and there you can play with the parameters or select which data you want to plot. If you want to combine all the cases you plotted (in my case 4 cases because of 2 temperatures and 2 VDD), you can click “Combine” to plot them all together, as shown in the next picture:
To export the graph, I recomend you to choose a white background to improve the appearance, especially if you insert it in your documentation or reports.
Example of Monte Carlo with ADE-XL
In this other example, I use the old ADE-XL simulator with a a cascode circuit is going to be used to make the Monte Carlo simulation. Sorry for the uggly schematic!!
First, add a DC simulation to save the operation point of the circuit.
To speed up the Monte Carlo simulation, you may configure multiple jobs in parallel, depending on how many cores you have available. In this example, I select 8 cores.
Go to Options>> Job setup.
The nominal DC-simulation, confirms the correct functionality of the cascode current mirror.
Create the desired metric to the output results. In this case, I chose the input and output current values (Ileft and Iright). I export them from the calculator into the output window in the ADE XL.
Add them at the output list at Outputs>>Setup:
In my case, I import the corner configuration from a file as a reference. You can always set up by hand.
Saved corners:
To perform the Monte Carlo Simulation the MC models must be selected. This step depend on each technology. To choose the variation on the NMOS transistor, the model cmosmc. If we wanted the Monte Carlo for the resistor, then select “resmc”.
Activate the MC corner configuration on the Data View window:
Go to the Monte Carlo configuration options by clicking on the icon and add the number of
After the simulation, you can right-click and select “histogram” to plot the results.
For a larger number of simulations:
Can you provide more detail regarding the models? I am mainly interested in how to setup a monte-carlo simulation from scratch.
Hello Monglebest, I dont understand which models do you need. Here I explain how to set up the Monte Carlo from scratch
Regards. Alberto
I am quite bus right now, but when I have more detailed information i will update the post!
Best Regards
Hi Alberto,
Very thorough walkthrough based on Cadence Virtuoso. The one thing that seems to be missing in every article I look at is how to determine the number of monte carlo samples required when setting up the simulation. Showing which information you used (ie; # tail points, confidence interval, sigma desired, etc.) and how you used it would make this article very useful.
Hello Terry,
Yes, you are right, this is a big topic. For this article I intended to focus on how to implement the Monte Carlo Analysis with Cadence. To know the minimum amount of points necessary, it is more statistical-related topic, that could be covered in other post.
Thanks for the feedback.
Alberto
Hello,
First I would like to thank you for your nice block, it is very useful to me
I have some questions please,
You have assumed that corner analyses is overdesigning our circuit, that is why MC simulation is a better method to evaluate the design, however, I saw you including the corners (WP, WS, WZ, WO)again in your MC setup, why you included it ?
I also saw you mixing corners in corner simulation like putting WS of a resistor model with WO of mos or capacitor, is that realistic?
Thank you
Hello Sennan,
In Monte Carlo, you chose “Monte Carlo Sampling” and also later in the corners column, I’ve chosen cmosmc for CMOS, which is meaning Monte Carlo for the cmos variations, what I wanted in this case.
You can read the word Corners, but they are not really that. Also, you can combine them in order to reduce the number of statistical simulations.
Hope that it helps you.
Best Regards, Alberto
Dear Albert,
Thank you for your fast response and help,
I now got it, you have deactivated the corners column in the time of MC simulation.
The second part of my question is still not clear,
I understand the meaning of WS, WO, WP and WZ for the MOSFET, but I don’t know what does it mean for resistors and capacitors?
Secondly, I see you are making combination of the possible corners, like ressitor with WP corner will be simulated with MOS with WS corner or any other different corners , is such of combination is possible ?
Thank you once again
Best Regards
Hello,
Yes, for this case ws, wo, wp and wz makes no sense for resistors and caps only for active CMOS. That is why i set them to “tm”.
Yes, you can combine them
It was helpful. Keep on posting!
Hi Alberto,
this is a great page indeed. I find your post on Monte Carlo analysis very crisp and clear. Thanks for that!
Will you please explain what do you mean by “worst one”and “worst zero”?
Hello Uma,
Worst One means that the NMOS is fast and the PMOS is slow. Also, idem for Worst Zero: Slow NMOS & Fast PMOS
Just in case the WP and WS are meaning:
WP: worst power (fast)
WS: Worst Speed (Slow)
Best Regards
Alberto
Hi Alberto,
If monte carlo simulation results have a big variance, how can i optimize this variance? I want a small variance. Thanks!
Hello Peter,
This variation is not about the Test Monte Carlo, but with your circuit… It will depend on your circuit you are simulating.
Best Regards
can you talk about .mcm file created by cadence when monte carlo analysis is done. this file has information about which parameters are contributing to variation.
Nice post ! Thanks for, posting on your blog mate! I shall email you some time. I did not know that MC simulations
Pingback: Design of a IC Thyristor-based ring oscillator in Cadence - Mis Circuitos
Hi Alberto,
Thank you so much for sharing this useful information. I have a quick question.
I just wonder where you got the figure, “Monte Carlo (yellow) versus Corner Analysis (blue region)”. If it is what you drew, could you please let me know what papers, articles, etc. have made you conclude that Corner Analysis covers Monte Carlo?
Warm regards,
JP
Hello JP,
It was taken from my scripts of my university in Austria. If I remember well, it was from the custom analog Layout subject.
Regards
Thanks Alberto for that detailed description. This is really made to explain, not to confuse as one can experience very often. You can see, there are a lot of questions around MC, but if you have to rely on Cadence help docu, you are lost…. 🙂
how to do the CNTFET monte carlo simulation in cadence tool
Hello,
I dindt experience the use of carbon nano tubes devices on Cadence, but the procedure would be quite similar. In will depend on the design kit PDK of your technology.
Best Regards
Alberto
Hi Alberto,
I am using umc 180nm. and when doing monte Carlo simulation. it is showing an error in comment “can’t run the simulation because an unknown parameter sigma has been specified .
Sorry I cant help you with this issue, try to write in the Cadence Forum.
Regards
Alberto
Hello, sir
I need to do the Monte Carlo simulation in cadence UMC65nm technology… please tell me any specific .lib file you want to choose.
Hello,
I dont know which specific .lib file you have to use for that technology. I would read the documentation of the technology or ask anyone who is working with your/ supervisors.
Regards
Alberto