• 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. How to evaluate expressions in ADE Assembler during a Monte...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 125
  • Views 4414
  • 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

How to evaluate expressions in ADE Assembler during a Monte Carlo simulation that require results from a single run at nominal conditions?

FormerMember
FormerMember over 3 years ago

Dear Community

I want to calculate the relative output current error of a circuit due to mismatch using a Monte Carlo simulation. The value of the output current depends on a parameter Vref. Therefore, I want to use the simulated output current at nominal conditions (for each Vref value) to evaluate the error. So I want the tool to:

for each Vref value:

  1. Make a single run at nominal conditions and store the simulated value of the output current.
  2. Perform a Monte Carlo sampling and compute the relative current error using the reference value from (1) and the simulated value of the current sample.

In a Corner analysis, I can achieve the above by using the calcVal function from the calculator, i.e. I use something like

calcVal("nameOfMyOutput" "nameOfTest" ?cornerName "Nominal")

where "Nominal" is the name of my corner at nominal conditions. Then I simply define Vref as Global Variable and run the simulation. This approach works fine in Corner analyses but fails for Monte Carlo simulations. The problem is that the "Nominal" corner fails when I select Monte Carlo Sampling in ADE Assembler (because it has no MC parameters), thereby failing to provide the reference value. How can I achieve that the tool performs a single run at nominal condition first before doing a MC analysis, automatically for each Vref value?

Thank you for your response.

  • Cancel
  • FormerMember
    FormerMember over 3 years ago

    I would like to provide some further information.

    In an older post, which is almost the same question, is was suggested that

    "There is some work to extend the calcVal function to access a named history [...]"

    The calcVal function does indeed support named histories, meaning that one could do something like this:

        1. Make a single run at nominal conditions.

        2. Lock the corresponding history and give it a name

        3. Run a Monte Carlo Simulation and fetch nominal results by referring to the name from (2)

    Problem: This does not work when sweep variables are involved. The calcVal function then simply returns 0 except for the first run.

    There is a workaround where one history for each value is created, i.e. in my case something like:

    for each Vref value

        1. Make a single run at nominal conditions.

        2. Lock the corresponding history and give it a proper name.

    Then again for each Vref value

        1. Manually change the expressions of the evaluated outputs to fetch the correct result from the nominal run with the right Vref value.

        2. Run the Monte Carlo simulation.

    This approach works but is a bit laborious since the evaluated outputs have to be adjusted by hand.

    Another approach, also taken from this post, suggest using "Run Plans".

    The ADE Assembler user manual states that calcVal can also be used to access result from named runs inside that run plan. Let us assume for simplicity that Vref can only take 3 values; namely Vref=0.2V, Vref=0.7V, Vref=1.2V. The run plan would then look something like this:

        Run1: Single run at nominal conditions with Vref=0.2V
        Run2: Monte Carlo Sampling at Vref=0.2V
        Run3: Single run at nominal conditions with Vref=0.7V
        Run4: Monte Carlo Sampling at Vref=0.7V
        Run5: Single run at nominal conditions with Vref=1.2V
        Run6: Monte Carlo Sampling at Vref=1.2V

    The manual suggests that values from another run can be accessed by using calcVal inside the expression for a global variable, for example something like

    calcVal("nameOfOutput" "nameOfTest" ?run "Run1")

    to access the nominal result inside Run2 from Run1.

    Problem: This works fine for variables but not for outputs. If I want to access data from other runs (either by using the VAR("variableName") function or directly via calcVal), then I get an "Cannot simulate run 'Run1' because it depends on the same run." error. If a have more than run in my outputs then I get an "cyclic dependency" error. How can I access data from other runs in my outputs?

    Is there really no simple solution for such a trivial problem?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • delgsy
    delgsy over 3 years ago in reply to FormerMember

    Hi,
    disclaimer, I am not from Cadence.
    So, please simply ignore it if you have tried and it does not work.

    I think the solution using Run Plan would work.
    You can use calcVal from the output of Run1 and put it in a global variable.
    Then you run Run2, write the output expression by including the global variable from Run1 using Var("variableName").

    What I had in the past was Run1 was Monte Carlo and Run2 was Single nominal run.
    It worked just fine.

    • 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