The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 16th, 2024, 1:37pm
Pages: 1
Send Topic Print
MonteCarlo on Circuit Parameters? (Read 6392 times)
Jess Chen
Community Fellow
*****
Offline



Posts: 380
California Bay Area
MonteCarlo on Circuit Parameters?
May 22nd, 2006, 5:38pm
 
Does anyone know how to set up a Monte Carlo analysis for a purely behavioral circuit in the Analog Artist environment? I have several variables in my ADE window that specify parameters of VerilogA blocks. I need to do a Monte Carlo analysis that randomly picks values for the ADE variables. Anyone?

-Jess
Back to top
 
 
View Profile   IP Logged
ACWWong
Community Fellow
*****
Offline



Posts: 539
Oxford, UK
Re: MonteCarlo on Circuit Parameters?
Reply #1 - May 23rd, 2006, 3:34am
 
You can use the

$rdist_uniform(seed, start_range, end_range); for uniform

or

$rdist_normal(seed, mean, sigma); for gaussian

if you make the arguments variables in ADE i guess you should be able to do what you want...
Back to top
 
 
View Profile   IP Logged
ACWWong
Community Fellow
*****
Offline



Posts: 539
Oxford, UK
Re: MonteCarlo on Circuit Parameters?
Reply #2 - May 23rd, 2006, 3:54am
 
i just tried it myself, stepping the seed in a parametric run. its seems to work fine.

hope this helps...
Back to top
 
 
View Profile   IP Logged
Jess Chen
Community Fellow
*****
Offline



Posts: 380
California Bay Area
Re: MonteCarlo on Circuit Parameters?
Reply #3 - May 23rd, 2006, 8:07am
 
ACWWong,

Thanks for the suggestion. I had thought of sweeping a random core random number generator seed but unfortunately not all of the parameters are in VerilogA blocks. My subcircuit is a mix of VerilogA blocks, resistors, and capacitors.

I think the problem is associated with pPar parameters. I'm using pPar parameters to specify the VerilogA and Spectre primitive parameters inside the subcircuit. Sourcelink gives an example of how to setup in-line subcircuits for Monte Carlo analysis but that does not seem to work with out-of-line(?) subcircuits, circuits defined through a Composer schematic. I would also like to use the Monte Carlo historgram display, which is not available in the parametric plotter. There's a sweep button on the Monte Carlo interface but I see no way to set the limits of the sweep.

-Jess
Back to top
 
 
View Profile   IP Logged
ACWWong
Community Fellow
*****
Offline



Posts: 539
Oxford, UK
Re: MonteCarlo on Circuit Parameters?
Reply #4 - May 23rd, 2006, 9:00am
 
ahh.. i see you want to use the Monte-carlo tool to vary other things, as well as your verilogA...

The sweep field of the MC GUI takes a list, but unforunately repeats the MCruns over those values, ie. doesn't work like "parametric set".

The perhaps a way forward (if passing pPar is a problem) would be to use OCEAN, and nest your verilogA desVar's inside a monteCarlo run. Perhaps you could link the seed of the desVar to random output from the MCrun itself ???

cheers
alan
Back to top
 
 
View Profile   IP Logged
Jess Chen
Community Fellow
*****
Offline



Posts: 380
California Bay Area
Re: MonteCarlo on Circuit Parameters?
Reply #5 - May 23rd, 2006, 9:43am
 
Hmmm... Perhaps Ocean is indeed one way to proceed. However, that gives me another idea. If I must use a scripting language, I might as well use a potent one. I'm not very familiar with Ocean but I believe its data analysis capabilities are far inferior to some external tools. I am more familiar with Mathematica and Matlab. Both external tools have much better data manipulation capabilities and these capabilities are well documented and easy to use. I could use Ocean to run the basic analysis but then embed the Ocean run command in an external Mathematica or Matlab loop. Part of the external loop could create a file with the random parameters that the netlist imports through an include or model file. I could also record the results of interest with a VerilogA block. In general, another part of the external loop could read the recorded results and alter the design parameters to semi-automate the design and/or data reduction process.

It's too bad there is no easy way to do such a basic thing completely within the ADE environment. Thanks for the suggestion.

-Jess
Back to top
 
 
View Profile   IP Logged
ACWWong
Community Fellow
*****
Offline



Posts: 539
Oxford, UK
Re: MonteCarlo on Circuit Parameters?
Reply #6 - May 23rd, 2006, 10:39am
 
Ocean's data manipulation is not a patch on matlab, but you can still coerce to do most things simple loops and access to all the calculator functions.

There probably is a way in dfII environment to do what you want, perhaps when Andrew reads this he'll know the simple answer!!!

cheers
alan
Back to top
 
 
View Profile   IP Logged
Jess Chen
Community Fellow
*****
Offline



Posts: 380
California Bay Area
Re: MonteCarlo on Circuit Parameters?
Reply #7 - May 24th, 2006, 10:53am
 
Cadence helped me find the problem with my Monte Carlo analysis. I knew I had to describe the tolerances and distributions for the variables in a file and then add that file to the model list. I did not know that that file MUST have a ".scs" suffix or the tolerances are ignored. My file did not have any suffix. Adding the suffix solved the problem. Cadence also explained that I need to use inherited parameters for the toleranced parameters inside my VerilogA blocks. There's a thorough description of the inherited parameter trick in Sourcelink.

-Jess
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.