• 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. Refer to another output equation in ADE

Stats

  • Locked Locked
  • Replies 13
  • Subscribers 126
  • Views 21543
  • 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

Refer to another output equation in ADE

Grover
Grover over 16 years ago

If I set up the output signals and expressions in Analog Design Environment, is it possible to refer to other expressions in an expression? For example, if I have the expressions

pin3 = (power from the 3.3 V supply)
pin12 = (power from the 12V supply)

can I then define

ptot = pin3 + pin12

in some way?

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 16 years ago

    You didn't say which version you're using - so I'm assuming this is ADE in IC5141 or ADE L in IC613.

    You can't just refer to an output by name (support for that is added in IC614). If you make the expressions:

    pin3:  pin3=(power from the 3.3V supply)
    pin12:  pin12=(power from the 12V supply)
    ptot:  pin3+pin12

    In other words, put a varName= before each expression - it will then evaluate the expression which will include an assignment to a SKILL global variable. The expressions are evaluated top to bottom, and so you need to ensure that you don't refer to a variable before defining it.

    In IC614 variables will automatically get created for each output (they won't be global though, but available within the scope of the expression evaluation).

    If you're using IC61X and ADE XL, then you can use the calcVal() function. This can easily be set up by dragging an output from the ADE XL outputs pane into the calculator buffer - and it will automatically set up the calcVal expression for you.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Grover
    Grover over 16 years ago

    I'm using ADE GXL 6.1.3.1, so this calcVal thing should work. If I drag an expression to the calculator, then it does make a calcVal function from it, but trying to evaluate it results in an error:

     *Error* ("eval" 0 t nil ("*Error* eval: not a function" calcVal("pin3" "myproj:my_amp_tb:1")))

    The same error occurs quite often by the way, also with other functions:

    *Error* ("eval" 0 t nil ("*Error* eval: not a function" (average(clip(IT("/V5/MINUS") 5e-05 0.0001)) * 12)))

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

    The "not a function" messages normally implies you have additional nested parentheses around an expression.

    For example, if you do ((2+2)) then you'll get a similar message. So check for unnecessary parentheses.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Grover
    Grover over 16 years ago

    It works, some of the time. I currently perform a sweep of vin (input voltage) over 40 points. I then calculate:

    vout_av: (vout_av = (some stuff to compute the average output voltage))
    delta: (delta = (vout_av / 12))
    iout: (iout = (vout_av / 48))

    Now this almost works. Vout_av gives the correct value, a scalar voltage. Same for delta, it is a scalar voltage equal to vout_av / 12. However, iout doesn't work. It should be equal to a scalar voltage equal to vout_av divided by 12, but instead it gives a vector containing these values as a function of vin. And it does this for every point of the sweep! Now how can delta and iout be of different types when they have been defined almost identically?

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

    Perhaps you can first try the latest hotfix of IC613 - it's possible this has been fixed since the IC613 "Update" release (which is what  you're using) from nearly a year ago?

    If that's not successful, I would suggest contacting Cadence customer support with an example that illustrates this. I've not seen similar issues, so it's probably data-specific.

    Best Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Grover
    Grover over 16 years ago

    OK, I'll go check whether there are any updates left to install. In the meantime, there's one small thing bothering me: on the "Results" tab, there's now a huge list of old variables that I've used while trying to work around this problem. Is there any way to remove old expression results from the Results tab? They are no longer on the "Outputs setup" tab, but I don't see a "delete" option anywhere on the Results tab.

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

    They won't appear next time you run the simulation - it's just because you're seeing your "work in progress"...

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Grover
    Grover over 15 years ago

    Actually, I've been wondering a bit about whether I'm doing it correctly at all. If it is so unobvious (and undocumented in the manual) how to make equations refer to one another, does this mean that there's a better way of constructing complex equations?

    I mean, if you use the calculator, you can perform lots of calculations on your simulation data, but it's a manual process. It makes more sense to set up an equation and let Virtuoso automatically evaluate it after every simulation. It seems intuitive to me (from experience with other simulation programs) to just make a list of equations in the Outputs Setup, but if it is so complicated to make equations refer to each other, does this mean that Virtuoso's designers are expecting you to do your data processing in some other way (such as writing a script)?

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

    This is very easy to do in ADE XL (in IC613). You can create an "OCEAN Script" measure in the ADE XL output, which will be an attached text file containing all your calculations, and then you can "output" one or more of the calculations to the outputs pane in ADE XL, keeping other variables interneal.

    You can also refer to other outputs very easily - you just need to click on an output in ADE XL and drag it into the calculator input buffer, and it will generate the right expression to refer to it (using the calcVal() function).

    In ADE L, in IC614 (due later this year) you will be able to simply refer to one of your other outputs by name in a calculation. ADE will take care of ordering your outputs so that it does things in the right order (and indeed you can manually reorder things by dragging the outputs up or down in the ADE L window).

    If using ADE L in IC613, you could always put all your calculations in a function definition (it's SKILL after all) and then call that function from the ADE L outputs pane - you can then make your calculations as complicated as you like.

    So there are lots of ways of doing this, dependending on your preferences - we try to cater for both people who like scripting, and those who just want a GUI.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Grover
    Grover over 15 years ago

    Thanks for the info. For not-too-complicated expressions, I prefer to just do everything in the Ouputs Setup tab. However, you said that it's necessary to define the expressions in the correct order. Is it then possible to change the order of the expressions after you've made them? Adding a new expression just adds it to the end of the list, I can't find a way to add one halfway.

    • 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