• 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. Setting Design Variables from one string

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 126
  • Views 20580
  • 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

Setting Design Variables from one string

Ray1987
Ray1987 over 9 years ago

Hello Team,

I would like to set multiple (but common) design variables through one string easily.

For example,

I have plurality of binary Des.Vars TRIM10, TRIM9, TRIM8 ... TRIM0. I wanna  set them by expression like this: 

nth(10 reverse(parseString( desVar("TRIM_10_0") ""))) 

For altering them altogether by modification just one variable - TRIM_10_0 (e.g. b0001010000).

But unfortunately I cannot do this trough ADE GUI due to this expression is passed to simulator "as is", but is not evaluated.

Another solution is

1. to "Save Ocean Script"

2. delete extra quotas in desVar section 

from desVar(  "TRIM4" "nth(4 reverse(parseString( desVar(\"TRIM_4_0\") \"\")))" )

to desVar(  "TRIM4" nth(4 reverse(parseString( desVar(\"TRIM_4_0\") \"\"))) )

etc...

3. load script manually.

But I don't like this solution. Too many manual action is required.

Is there any possibility to pass evaluated design variables to simulator by using ADE GUI.

Thank you in advance.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    You should be able to use something similar to the original expression in ADE XL (only as a Global variable though; global variables are interpreted as SKILL expressions, whereas local variables are assumed to be in AEL or in other words passed directly to the simulator).

    However, you should use VAR() rather than the OCEAN function desVar().

    I've not tried your example, but I think in principle it should work.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Ray1987
    Ray1987 over 9 years ago

    Hello,

    Andrew.

    It doesn't work - see below.

    <ADE GUI>

    <Output log error>

    <input.scs file>

    Though, I didn't catch your proposal for global variable using. Could you explain please.

    Thank you in advance,

    Eugeny.

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

    Eugeny,

    Your original post was talking about ADE - you didn't say ADE L or XL.

    The answer I gave was for ADE XL. ADE XL has  a collection of "tests" where each test is similar to an ADE L setup. Design Variables in each test (sometimes called local variables) are then propagated up to Global Variables in ADE XL - the idea is that you can then sweep these global variables in ADE XL and have it affect all the separate tests.

    Global Variables in ADE XL can be SKILL expressions. Local (or Design) variables in the tests themselves cannot be SKILL expressions as they are passed to the simulator directly. Similarly Design Variables in ADE L cannot be SKILL expressions.

    So your only option is to use ADE XL (if you don't want to use OCEAN). Then it should be fairly straightforward. Since ADE XL is built on top of ADE L, you can utilise your existing ADE L setup (or just use Launch->ADE XL from the ADE L window to get there).

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Ray1987
    Ray1987 over 9 years ago

    Andrew,

    Thanks for hint. But I faced the same issue in ADE XL. 

     

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

    The trick is to put quotation marks around your bus value - this is needed so that ADE XL sees the value as a string rather than a numerical value (referencing another variable). As you can see from the above, this worked fine for me - I put together a simple example using voltage sources set by D0, D1, D2 etc and then measured the voltage on the output of the source for my measured outputs.

    I thought I might have to use atoi() on the result of the nth() but it wasn't needed.

    Regards,

    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