• 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. Calculator does not show updated value for a design var...

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 124
  • Views 9106
  • 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

Calculator does not show updated value for a design variable

MohNaj
MohNaj over 3 years ago

Hi all

I have a PLL for simulation and I set the stop time to 7us. However, I usually stop the simulation once the PLL locks (e.g. at 6us).

I started the simulation with some design variables (in meastro). The value of variable t1 was initially equal to 5u. However, I need to change it to 4.1u after I stopped the simulation and evaluate the output expressions.

I know that we can display the value of a design variable with the command VAR("x") in the calculator. We can also use this command in the output expressions. After updating the variable, the calculator still shows the initial value (i.e. 5u). How can I use the updated value of a variable in the calculator and output expressions?

Please see the attached image. 

Any help would be appreciated.

Mohammad

  • Cancel
Parents
  • FormerMember
    FormerMember over 3 years ago

    dear

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

    Dear Mohammad,

    MohNaj said:
    After updating the variable, the calculator still shows the initial value (i.e. 5u). How can I use the updated value of a variable in the calculator and output expressions?

    If I understand your question and example, you assign the variable t1 to 5u prior to starting the simulation. You then run the simulation and stopped it prematurely. After stopping the simulation, you decide to change the variable t1 from 5u to 4.1u. You then evaluate the variable t1 using the Calculator, and you find it is evaluated as 5u and not the new value you set it to after you stopped the simulation, 4.1u.

    If I understand your question correctly, this behavior is as designed and expected. The fact that you change a design variable's value after the simulation is complete will not immediately change its value in a simulation you started previously. The Calculator and Results Browser both refer to the simulation database you select when attempting to evaluate the value of a variable. The values of a variable chosen for a simulation are written to its database and are not changed. 

    If I assume you are interested in re-evaluating the results of a simulation with a new and different value of variable t1 than you used in the simulation from your question, let me provide a possible suggestion if you have an output, for example output_t1, that is a function of the value of variable t1.

    1. Copy the output "output_t1" to a new output by right clicking output "output_t1" and selecting "Copy to Test" (see Figure 1)

    2. Copy the output to the test you desire and rename the new output if you want. Cadence will automatically rename the new output to a unique name if you do not.

    3, Open the expression builder for the new output by clicking on the Expression builder icon as shown in Figure 2.

    4. Edit the expression of the new output and replace VAR("t1") in the expression with the new value you want to use. In your case, replace VAR("t1") with "4.1u". Make sure the new output is selected for plotting.

    5. View the results tab for this test and re-evaluate the results (see Figure 3).

    6. Your new test output will now appear in the Results tab evaluated with the new value you desired for variable t1.

    If you have a lot of expressions in your output that are dependent on VAR("t1"), you might consider exporting the Assembler outputs to a comma-separated variable file and use a test editor or UNIX sed command to copy those outputs dependent on VAR("t1") to new outputs and replace VAR("t1") in each of your new outputs with "4.1u".

    I hope this helps Mohammad,

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • MohNaj
    MohNaj over 3 years ago in reply to ShawnLogan

    Hi ShawnLogan

    Thanks for the reply. Yes, you understood my question correctly. I wonder if this is also the case for global variables. We cannot change them after the simulation? What if I delete t1, start the simulation, stop it, and then define t1 with the correct value? Does it suppose to work?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • MohNaj
    MohNaj over 3 years ago in reply to ShawnLogan

    Hi ShawnLogan

    Thanks for the reply. Yes, you understood my question correctly. I wonder if this is also the case for global variables. We cannot change them after the simulation? What if I delete t1, start the simulation, stop it, and then define t1 with the correct value? Does it suppose to work?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to MohNaj

    It would be rather odd for the output expressions to use the value of a variable (be it global or local (design variable)) in the active setup rather than what was actually simulated. That would be a recipe for getting the wrong answer much of the time. So this is not supported.

    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