• 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. Changing the value of a Variable in Maestro every time a...

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 125
  • Views 16111
  • 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

Changing the value of a Variable in Maestro every time a simulation is run

netbug
netbug over 5 years ago

Hi,

I would like to change the value variable (global or local to a test) every time a given test runs.

I have created a local variable (numOfRuns), which is initialised to zero. Every time the test is run, the variable should be incremented by 1.

Later, I will the use this value to be included into the expressions I have created in the "outputs setup" tab.

Any ideas?

Thanks in advance.

Best regards,

Pedro

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 5 years ago

    Pedro,

    Not sure off the top of my head how easy this is to do (or even if it's possible - although that may dependent upon your precise requirements). My first question would be why you would want this? It seems a bit unusual...

    The second question would be whether you want it to increment each time you hit the run button, or per actual simulation point (so if you do sweeps and/or corners, should it increment then too)?

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 5 years ago

    Pedro,

    Not sure off the top of my head how easy this is to do (or even if it's possible - although that may dependent upon your precise requirements). My first question would be why you would want this? It seems a bit unusual...

    The second question would be whether you want it to increment each time you hit the run button, or per actual simulation point (so if you do sweeps and/or corners, should it increment then too)?

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • netbug
    netbug over 5 years ago in reply to Andrew Beckett

    Hi Andrew,

    Thanks for your reply.

    I agree, that what I am trying to do is bit weird.

    So, please, let me explain it better.

    I have a test that I want to run in a loop until a condition is met. I really don't know how to do this, apart from using  the "Run Plan", place there many instances of the same test and set a stop condition. Please notice, that no simulation must not be run, after the condition is valid.

    Please, imagine that I am trimming a circuit and the initial value should be hard-coded by the user. Let's say that I have a variable that is called preTrimValue and another one called trimmedValue.

    The first one should be hard-coded by the user, in the global variables or in the local variables for the test and the second is obtained as a result from running the test.

    For example, for "preTrimValue" the user enters the number 7. The simulation will grab that value and do all the calculations and obtain, let's say, a code of 10. As I want a variation of +- 0/5LSB, the circuit must be trimmed again, BUT now the preTimValue variable should get its value from "trimmedValue".

    So difficult part for me, is that I want to run the test in a loop and, the first time it runs, it must get the values from the global variables but on the next iterations should get the values from the trimmedValue.

    So, I came up with this:

    1 - I created a global variable called "run" which starts with number 0.

    2 - An expression checks if the number is zero and, if it is, it will grab the hard-coded values by the user, otherwise will use a calcVal command to get the codes from trimmedValue.

    3 - Every time a simulation is run, the "run" variable is incremented by 1 using maeSetVar.

    This will be done across corners, but the variable will be incremented only, when the test runs again.

    Maybe I came with a solution which is a bit cumbersome, but it made sense to me by then.

    Best regards,

    Pedro

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to netbug

    Hi Pedro,

    OK, it sounds as if you should be using a "pre-run script" that is available in ADE Assembler (or ADE XL). You can enable this for a test by using the Right Mouse menu over the test name, and even create the sample script.

    It's covered in more details in this Rapid Adoption Kit: Techniques for Simulating Calibrated Circuits with Virtuoso ADE Assembler

    With pre-run scripts you can (for example) do a successive approximation approach or binary chop to find your best trimming code - more details in the RAK.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • netbug
    netbug over 5 years ago in reply to Andrew Beckett

    Thanks Andrew, I will run that RAK.

    Best regards,

    Pedro

    • 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