Virtuoso Monte Carlo Inductor Problem

For an LNA design, the simulations for the inductors and the simulation for the rest of the components (transistors, capacitors, resistors etc.) are done in two different software packages. The inductors are simulated in EMX and the other components are part of the Cadence Virtuoso package. To include the inductors as part of the design, we take the S parameter files generated from EMX simulations and set the inductor in the design to an n-port view and make it point to the S parameter files generated by the EMX program.

Now when we run a monte carlo analysis, that’s basically simulating for different manufacturing variations. This only varies the models that are part of the cadence package, not the inductors that we have in the design. The inductors are pointing to the same S-parameter files for each iteration of the monte carlo run. So the design is not being "truly" monte carlo simulated for the entire LNA design.

In EMX, there is a way to perform monte carlo on the inductors, and they would generate some n amount of S parameter files, one for each nth iteration. What I thought could be done to make a true monte carlo analysis on the design in cadence is pause after each iteration of the simulation, and switch the file that the n-port view is pointing to and do this for each iteration. In this sense, the monte carlo run is pointing to a different S parameter for each iteration that contains manufacturing variations that were simulated for in the EMX folder.

So the question is, is there any way to pause after each iteration of the monte carlo simulation in ADE XL or using SKILL/Ocean?

EDIT

I think a better solution would be to utilize the spice .ALTER command. This will rerun while altering whatever you specify. So, suppose you would normally specify a MC with 200,000 data points (just as example) and you have 200 s-parameter models generated for the inductors. Create 200 .ALTER statements, one for each s-parameter model, and instead run 1000 random data points. Total you would have 200000 MC runs with the randomly included s-parameter models.

200 might seem tedious but could easily be done with any scripting language, for example perl psueudocode (copy and paste whatever this generates into your spice deck):

my $count = 0; foreach my$model (ls dir/to/folder/with/smodels/*.<extension_for_smodels>) {
print $spice_file_handle '.ALTER '."case$count\n";
print $spice_file_handle '.INCLUDE '."'$model'\n";
}
print \$spice_file_handle '.END'


If each include file names the inductor module the same way, each alter should over-write the previous models, for the new runs of MC.

END EDIT

I am unsure of how you can get this to work with your current idea, because the SPICE Monte Carlo analysis is defined per parameter.
So, each Monte Carlo run of the full design will not correspond 1:1 to a s-parameter model generated by EMX.

For example, the MC analysis on one of your inductors is proportional to it's nominal parameter values. Choosing just one, lets say one variable is the parasitic capacitance between the inductor and a nearby wire. The nominal value is 1fF. So this parameter combined with all the others are statistically analyzed, and one of those data point slices (one point in a MC scatter plot) contains this parasitic capacitance at 0.9fF, 10% off its nominal value (along with all the other internal parameters which also vary a bit). How does this model match with the current MC run in SPICE? How would SPICE know which one of these EMX s-parameter files to choose, because its own current MC run is a defined by a list of internal parameters that vary by some %-age from their nominal value.

It's not so easy to link one up to the other.

I think a more straightforward way would be to bring the nominal inductor parameters from the n-port model into the SPICE run, and allow SPICE to run MC like normal SPICE parameters. Define them as .PARAM at the top level and then as MC variables.

• This question is more related pausing in between iterations. Let say that I used a random number generating algorithm to pick the file that is to be used in each iteration. Why would we need to match this with the current MC? Wouldn't using a random number generator to pick a file solve the problem of telling SPICE which file to use in the simulation? – Zmixma Jul 20 '16 at 21:39
• Yes, that would solve the problem. Afaik that is not possible though. What you may want to do is do a foreach loop (at shell or with Perl) on each EMX s-parameter file, doing MC analysis for each one. If you would normally have 200000 MC runs, but you have 200 EMX s-parameter files, instead do 1000 MC runs per single s-parameter file and compile the results. This could be done in spice with .ALTER on the s-paramater include. – jbord39 Jul 20 '16 at 21:42