• 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. Custom IC Design
  3. Getting more data after MC run directly in the Results table...

Stats

  • Replies 18
  • Subscribers 132
  • Views 1658
  • Members are here 0

Getting more data after MC run directly in the Results table?

StephanWeber
StephanWeber 20 days ago

Hi,

the ViVA calculator has some nice statistical functions, like average, stddev, skewness, kurtosis, and building more like Cpk or Jarque-Bera JB is not so difficult. But I struggle to get this not only in the calculator but really as output, e.g. to define a spec! E.g. we want Cpk>1.67 or  e.g. JB<3 for check for Gaussian data.

What works so far is this: 

I switch to Detailed table mode, select an output like Rsense or VoutDC, do a "plot across points", then I go to Viva and make "Send to Calculator", then I get an expression like swapSweep(Rsense "Design Points" "nom"), next I simply set x=swapSweep(Rsense "Design Points" "nom"). So it is no easy to get the mean and stddev and then to plot the Gaussian PDF of that fit.

However, I struggle to make that not only manually every time after the MC run but as output expression which would give a much higher automation. E.g. I want to see:

- The PDF plot for a fit for each MC analysis and my key outputs (I run MC vs VT corners)

- Also look for 5-sigma values

- Check if data is Gaussian, e.g. do also other fits like lognormal fit of JB is too large

- Or check at which corner the 5-sigma value is worst, etc.

This way I also do not need to plot Histograms etc. manually after each run.
His anybody done this before?

e.g. stddev(Rsense ?overall t) (with sweeps selected) works but skewness(Rsense ?overall t) (works in CIW!!) is changed to (skewness Rsense ?overall t)
same issue for kurtosis.

Are these Cadence-functions not registered in ADE?

Bye Stephan

  • Cancel
  • Sign in to reply
Parents
  • StephanWeber
    StephanWeber 19 days ago

    Hi Frank and Andrew,

    I followed Franks link and see something about famIsFamily(), this sounds very close to what I need, but I believe there is not only one hurdle.

    1. It is indeed interesting to pick the whole MC data, e.g. vs mc and vs corner, and then extract e.g. stddev vs mc for each corner.I

    2. I wonder what is easier calculating mean, stddev, etc. as separate output vs sweeps and then e.g. plot the fitted pdf by taking the 2 params

    3. OR I just take the whole data, calculate parameters internally, and return the fitted waveform (or even create multiple outputs)
    2. looks simpler and would also allow to directly sets specs. 

    However, using Virtuoso Studio 23.1-64b ISR15.37 already something simpler failed:

    I can calculate average and stddev vs sweeps, and get the correct MC mean and stddev, but it does not work for skewness() and for kurtosis(). I miss also the median as function.

     stddev(Rsense ?overall t) with sweeps is fine

     skewness(Rsense ?overall t) with sweeps is automatically modified by ADE immediately to  (skewness Rsense ?overall t) and is not working

    However, from CIW skewness(x) works, if I made x=expression got by sent to in Calculator.

    One further tricky part is this:

    Rsense is also an output expression, like value(mag((VF("/VRECT") - VF("/VMID"))) 1)

    And skewness(value(mag((VF("/VRECT") - VF("/VMID"))) 1)) WORKS in ADE.   => I believe this is what works on your side Andrew??

    So at the moment my conclusion is that in the version I use, skewness does not work on ADE outputs, but it works in CIW, Calculator and on signals.

    Any feedback of course highly appreciated, because manually with Send to Calculator and in it I can do already now all I need, like also overlaying a lognormal fits, shifted lognormal fit, etc.

    Bye Stephan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 19 days ago in reply to StephanWeber

    The point about making your code handle families and waveforms is just that it can handle any scenario. If it's supplied with the data across corners then it should work. Sometimes you might have the value across corners but just for a single corner (so it's still a waveform). Ensuring functions handle any kind of input data ensures they work in all scenarios. It doesn't force you to process the entire MC dataset in one go, but you can if you want.

    StephanWeber said:

     skewness(Rsense ?overall t) with sweeps is automatically modified by ADE immediately to  (skewness Rsense ?overall t) and is not working

    I tried this in IC23.1 ISR17 and IC25.1 ISR4 and in those versions, the ?overall t is not added. It works fine (?overall t is not supported by these functions - I can only guess it was a mistake that was corrected - I don't have time to test with the same subversion as you).

    In my example I had skewness(Voffset) where Voffset was the name of the output I wanted to find the skewness of. I didn't need to repeat the expression.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • StephanWeber
    StephanWeber 19 days ago in reply to Andrew Beckett

    GREAT, deleting  ?overall t makes all work! Thanks a lot, Andrew.

    So I can extract e.g. the MC count, the mean, stddev, skew and kurtosis, also a plot of pdf is possible. Will go on to make more in the next week.

    BUT one thing is strange:

    If I manually enter stddev() I get a correction with ?overall t added!

    That is the reason why I thought also skewness and kurtosis need that  ?overall t, but the opposite is true.

    Here are my exported outputs (all work nicely):
    ACS_FCS_DFT,Rsense,expr,value(mag((VF("/VRECT") - VF("/VMID"))) 1),point,t,,,Ohms,range 17.5m 28m,AC Rsense
    ACS_FCS_DFT,x,expr,Rsense,sweeps,t,,,Ohms,,
    ACS_FCS_DFT,x1,expr,value(mag((VF("/VRECT") - VF("/VMID"))) 1),sweeps,t,,,Ohms,,
    ACS_FCS_DFT,avgRsense,expr,average(Rsense ?overall t),sweeps,t,,,Ohms,,
    ACS_FCS_DFT,stddevRsense,expr,stddev(Rsense ?overall t),sweeps,t,,,Ohms,,
    ACS_FCS_DFT,skewRsense,expr,skewness(Rsense),sweeps,t,,,,,
    ACS_FCS_DFT,kRsense,expr,kurtosis(Rsense),sweeps,t,,,,,
    ACS_FCS_DFT,pdfN,expr,PdfNormal(0 1),sweeps,t,,,,,
    ACS_FCS_DFT,skewRsenseFull,expr,skewness(value(mag((VF("/VRECT") - VF("/VMID"))) 1)),sweeps,t,,,,,
    ACS_FCS_DFT,N,expr,sampleSize(Rsense),sweeps,t,,,,,

    For me it looks stddev is slightly differently implemented than e.g. skewness.

    Bye Stephan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 19 days ago in reply to StephanWeber
    StephanWeber said:

    BUT one thing is strange:

    If I manually enter stddev() I get a correction with ?overall t added!

    This is just because average and stddev existed for a long time before ADE XL/Explorer/Assembler and then had to be extended to support measure across sweeps/corners etc. It was hard to do that in a compatible way and so the ?overall t keyword was added to enable that. kurtosis and skewness are more recent additions and they were (I believe) designed from day one to cope with the result structures that ADE presents. I've not checked this, but I think that's what's going on.

    So it's history/legacy behaviour that is the likely reason.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • StephanWeber
    StephanWeber 15 days ago in reply to Andrew Beckett

    Again, many thanks, Andrew. I implemented now also a shifted lognormal fit, so I have to test a lot now.

    One thing could help: 

    Instead of calculating each value in a dedicated function, then using e.g. mean, stddev, skewness, etc. for the 3-parameter fit, it might be easier to put all that in one bigger function, and return multiple things as a list. 

    Also it might help to not define each output explicitly as ADE output, but doing the output creation also inside a skill script.

    So overall it could look like this:

    I have a dedicated ADE output like "Rsense" (plus many others, like Vout, accuracy, f3dB)

    We pass Rsense (complete waveform vs MC & corners) to a script.

    This script has a big function which calculates e.g. mean, stddev, skew, kurtosis, + model fit & yield in sigma from that fit, etc.
    And it creates new outputs (with specs) for ADE.

    I wonder is using the Run Plan + post-script the best way to go?
    Best would be to pass just a list of outputs (not all, but the most important ones e.g. all ADE point outputs with active spec) to the script. 

    Bye Stephan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 15 days ago in reply to StephanWeber

    Stephan,

    That doesn't really fit into the ADE use model. You can have an OCEAN script measurement which returns multiple outputs (it announces at the beginning of the script what those outputs will be, and then outputs the individual results throughout the script), but there's not a mechanism for a normal measurement function to add multiple rows in the table (I think this would be confusing). We could have a Swiss Army knife type function which can return multiple different things, and an argument determines which it use (e..g like the spectrumMeasurement function).

    Anyway, the right thing to do here is to contact customer support if you want an enhancement.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • StephanWeber
    StephanWeber 13 days ago in reply to Andrew Beckett

    Hi Andrew, 

    but can't we use a run plan, and use the pre-run script feature to create the additional desired ADE outputs, and after the run we see them in ADE Results table?

    That script could:

    Get all the  existing outputs
    And if e.g. a spec is set then add the add. outputs for stddevOutputname, skewnessOutputname, fits, etc.
    (using "meas across sweep" or even "across all" for get WC corner values)

    Bye Stephan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 13 days ago in reply to StephanWeber

    You can't add outputs in a run plan, so this approach won't work.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • StephanWeber
    StephanWeber 12 days ago in reply to Andrew Beckett

    Can't we go for

    ocnxlAddOrUpdateOutput("Calibrated_ParamName" CalResult) 

    or (as workaround)

    ocnxlUpdatePointVariable("ParamName" sprintf( nil "%L" CalResult)) 

    Like in the trimming flow example?

    Bye Stephan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 12 days ago in reply to StephanWeber
    StephanWeber said:

    Can't we go for

    ocnxlAddOrUpdateOutput("Calibrated_ParamName" CalResult) 

    or (as workaround)

    ocnxlUpdatePointVariable("ParamName" sprintf( nil "%L" CalResult)) 

    Like in the trimming flow example?

    No. These are for use in the per-test pre-run script. A run plan has (potentially) multiple tests, and even if these worked there (which they don't AFAIK) you would need to be able to specify which test the output gets added to.

    There would be no point anyway; as I mentioned earlier on, you can already add several outputs in an OCEAN script measurement. What you can't do is have a regular expression output which magically adds multiple outputs, which is what you were proposing earlier.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett 12 days ago in reply to StephanWeber
    StephanWeber said:

    Can't we go for

    ocnxlAddOrUpdateOutput("Calibrated_ParamName" CalResult) 

    or (as workaround)

    ocnxlUpdatePointVariable("ParamName" sprintf( nil "%L" CalResult)) 

    Like in the trimming flow example?

    No. These are for use in the per-test pre-run script. A run plan has (potentially) multiple tests, and even if these worked there (which they don't AFAIK) you would need to be able to specify which test the output gets added to.

    There would be no point anyway; as I mentioned earlier on, you can already add several outputs in an OCEAN script measurement. What you can't do is have a regular expression output which magically adds multiple outputs, which is what you were proposing earlier.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • StephanWeber
    StephanWeber 12 days ago in reply to Andrew Beckett

    I see axlAddOutputExpr could be a much better fit (it has all the parameters we need).

    Shouldn't this finally work?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 12 days ago in reply to StephanWeber

    No.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • StephanWeber
    StephanWeber 12 days ago in reply to Andrew Beckett

    OK, so it looks an export to CSV and make the automatic extensions for stat there, then reload is best. One advantage is that it would be permanently + manually editable in GUI. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 12 days ago in reply to StephanWeber

    Or use the OCEAN script measurement that I repeatedly have mentioned.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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.

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

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