• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. RF Design
  3. Working around lack of sweeps in MC runs

Stats

  • Locked Locked
  • Replies 10
  • Subscribers 64
  • Views 15639
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Working around lack of sweeps in MC runs

MicheleA
MicheleA over 11 years ago

Hi all,

I need to run some MonteCarlo experiments on a circuit, while sweeping some of its parameters.

However, this is not possible within the current ADEXL (BTW, why?)

I am not very SKILLed...so here's where I need your help. The sweep space is not small, spanning some 90 pts, so the idea I come up with is to use some command line approach to work around the lack of a "GUI" interface.

Basically, I would run the MC simulation 90 times, with a 'same circuit' changing only for the value of two Design Variables.

In my overly simplified mind, I would end up with a script containing some 90 lines of this sort:

spectre (myCircuitSetup, DesVar1=1,DesVar2=1)

spectre (myCircuitSetup, DesVar1=1,DesVar2=2)

spectre (myCircuitSetup, DesVar1=1,DesVar2=3)

....

Now, the questions are basically HOW to implement such thing, provided this is a viable solution (which is question number zero):

1 - I have saved the Ocean script from ADEXL interface. This script is somewhat bulky (for instance, it contains the Corner definitions although there is no actual corner selection for simulation). Being ignorant as I am, I would then blindly create 90 copies of this with the modifications needed (the different DesVar declarations) in the right places. This would involve quite some work on my part to find an effective way to 'program' this text file manipulation. I am not skilled in any of the Phyton or any other shell programming but I will find my way through it. However, this just sounds too cumbersome, therefore:

2 - Is there another method to more elegantly pass to the simulator a same netlist, with same settings all the way thru, BUT for the value of some DesVar? Some for loop?

3 - What would be the suggested method to 'distribute' this huge job efficently? Some batch thingy? Basically I would like to reproduce the intelligent batch behavior you can have running behind the scenes when you couple sweeps with distributed computing.

Any hint would be really appreciated, thanks in advance! :)

Michele 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    Hi Michele,

    The main reason why you can't do variable/parameter sweeps at the same time as Monte Carlo is because Monte Carlo sweeps are in the same direction as the variable sweeps - you have corners in one direction, and variables/parameters/monte in the other - and this also affects how the results are displayed. There are a number of requests to support this - and I'm sure it will happen one day.

    Anyway, part of the reason why it's not too bad is that there already is a way of doing this. You can sweep a variable as part of a corner. Corners do not have to be single values of variables (or model file sections). Within a corner definition, you can say you want DesVar2=1,2,3,4,5 or DesVar=1:1:5 (1 to 5 in steps of 1), or use the GUI to define more complex sweeps, within log steps, or with inclusion lists, center span, etc. The corner will then contain a set of "sub corners" - indicated by a number at the bottom of the corner definition showing the total number of sub-corners. 

    Monte Carlo will then be run for each of these sub-corners, hence incorporating your variable sweeps.

    This is much simpler than the ideas you were proposing.

    Regards,

    Andrew. 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • MicheleA
    MicheleA over 11 years ago

    Hi Andrew,

    this is like a million times easier and more elegant! Many thanks for the tip, I did not know of this feature of the corners.

    Now, I just have to understand why the MC run did not preserve my modulated freq out of the ENV simulation :(

    I had saved data for family plots and all the rest.

    I have a feeling that this is related to APS, which I used to speed up the runs. In a previous adventure, I struggled quite a bit with saving transient OPs from a PSS. I needed the gm Vs. time for a mixer, and the steady state (time) result came quite handy. I remembered being able to save and display it, by using the save commands in an attached file...Then, all of a sudden, nothing helped and the gm data disappeared from the saved results. As it turned out, APS was not saving those curves no matter what. If I used the normal Spectre, everything worked fine.

    Let's see....And thanks!!

    Michele 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    Hi Michele,

    Which version of spectre are you using? I'll do some checks - if this is not being saved, then it's probably a bug that should be reported via customer support.

    Cheers,

    Andrew. 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • MicheleA
    MicheleA over 11 years ago

    Hi Andrew,

    just switched to MMSIM13.10.127

    And I checked, APS or Spectre makes no difference. Modulated Frequency is just not there.

    I look forward to hearing about your checks.

    Another thing: I ran a MC for a single point overnight, saving data to allow family plots. 200 points of an ENV simulation. The whole simulation folder weights some 500MB. I asked to plot a current Vs. time this morning around 8h10...I am still waiting...

    What can cause this? And more importantly, how can I exit this state without killing/restarting? A simple top command shows that the virtuoso process isn't doing anything...

    Cheers,

    Michele 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Frank Wiedmann
    Frank Wiedmann over 11 years ago

    You might also want to take a quick look at Cadence Solution 11850044 (see also http://www.designers-guide.org/Forum/YaBB.pl?num=1391751554).

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    The problem that I see is that I don't get the "time" output from envelope (envlp_td) if I do monte carlo - I only get harmonic time and spectrum (both of which are from the envlp_fd results). This is a bug - I've not seen it reported before though.

    I'm not sure what you mean by "Modulated Frequency" as an output of envlp though.

    Frank - I'm not convinced that you post or the solution that you've mentioned is relevant here. That's more to do with .measure or MDL outputs - which isn't the case here...

    As for the performance, I'm not sure why that would be. Unfortunately the envlp_fd results are still saved as PSF, and if you can cut down the number of signals saved, that would help. The "Time" output can be saved as either PSF or SST2 (not PSF XL yet, unfortunately) - do you know which it is? If you use the results browser, plot a signal from the envlp_td in ViVA, and then use the Trace Info assistant whilst selecting the trace you just plotted, it should tell you the output format.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • MicheleA
    MicheleA over 11 years ago

    Thanks Frank! Interesting since I do have some HDL in my test bench.

    Anyhow, it looks like the issue is in the retrieval of waveforms from ADEXL GUI. A simple right-click and plot yields the following:

    WARNING (OCN-6038): Results envlp are not available for /myPath/simulation/myCell/adexl_MC/results/data/MonteCarlo.0/psf/myCell. Use results() for a list of available results.

    I overlooked this all important message in the beginning and thought the system was stuck, but actually it was still working (although not updating the progress of another sim I was running, so that's why I thought system was stuck).

    However, by using the Results Browser I can access all results and also the much needed demodulated frequency. Only thing, it is contained in a directory called:  

    mc1_envlp-fm.envlp

    instead of the canonical envlp-fm....Strange, because the other data is in 'normally labeled' envlp_td and envlp_fd folders...
     
    Anyhow, I now have the results I was looking for, and with Andrew's tip it shouldn't be difficult to extend my sims to swept parameters.
     
    Thanks!
     
    Michele 
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • MicheleA
    MicheleA over 11 years ago

    Andrew,

    there is an output called like this among the ENV offer. I am hopefully attaching a snapshot of what I mean.

    BTW, is there a way to have images displayed inline without resorting to some img hosting? I mean, upload them and reference them from within the post editor?

    Cheers,

    Michele

    • 1.png
    • View
    • Hide
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Frank Wiedmann
    Frank Wiedmann over 11 years ago

    Andrew Beckett said:
    Frank - I'm not convinced that you post or the solution that you've mentioned is relevant here. That's more to do with .measure or MDL outputs - which isn't the case here...

    The problem described in Cadence Solution 11850044 will always occur when something is written to a file (not only measurements, but also nodesets etc.). This is something I do very often in my simulations and I thought that Michele might run into similar problems sooner or later.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    MicheleA said:
    BTW, is there a way to have images displayed inline without resorting to some img hosting? I mean, upload them and reference them from within the post editor?

     

    You can attach a single image to each post via the Options tab, but apart from that, you can't reference pictures from within the post unless they are hosted elsewhere, unfortunately. The "Content Selector" button in theory should do this, but I don't think you can upload your own pictures that way.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information