• 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. Mixed-Signal Design
  3. Combine design variables in ADE assembler

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 65
  • Views 10313
  • 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

Combine design variables in ADE assembler

NewScreenName
NewScreenName over 2 years ago

Hello all,

I am running a test in ADE assembler version ICADVM20.1, in which I have some variables to be swept, say A={From/To}Octave:2**(-14):1:1{From/To} and B=0 or 1.

The point is if I set it that way I will get 15x2=30 simulations. However variable B is meaningful to be B=1 only when associated to values A = 2**(-1) or A=1, otherwise has to be B=0. So the meaningful simulations are just 17.

Is there a way to do this and saving those 13 useless simulations? (I would prefer to avoid using corners to define such specific sets of simulations for B=1, as even though it is a workaround, conceptually does not make sense). I suppose there would be another way by setting properly the design variables?

Thank you

Best regards

  • Cancel
  • ShawnLogan
    ShawnLogan over 2 years ago

    Dear NewScreenName,

    NewScreenName said:

    However variable B is meaningful to be B=1 only when associated to values A = 2**(-1) or A=1, otherwise has to be B=0. So the meaningful simulations are just 17.

    Is there a way to do this and saving those 13 useless simulations? (I would prefer to avoid using corners to define such specific sets of simulations for B=1, as even though it is a workaround, conceptually does not make sense). I suppose there would be another way by setting properly the design variables?

    Perhaps I do not fully understand your question, but is there a reason using a conditional expression might not satisfy your need? In other words, make the design variable B a function of variable A. Then, in your corners setup, sweep variable A and the variable B will only be 1 when A assumes the two values 2**(-1) and 1.

    In the post at URL:

    community.cadence.com/.../1385792

    I show an example of how to setup up a conditional expression (in this case for a corner) and provide a reference to a Cadence article that provides some added information on creating conditional expressions. Let me know if you cannot access this Forum link New ScreenName!

    I hope I understood your need correctly,

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • NewScreenName
    NewScreenName over 2 years ago in reply to ShawnLogan

    Dear Shawn,

    Thank you for your reply. I have tried to do how you suggest. It works if I do similarly to how you suggest

    However when I try to set it as you see in picture, I get errors.

    The error is caused by having not a single value for each branch of the IF, but a set of values instead. What would be the correct syntax in this case?

    (I have tried the case syntax as well, but still it is not working)

    Thank you very much

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 2 years ago in reply to NewScreenName

    Dear NewScreenName,

    NewScreenName said:

    The error is caused by having not a single value for each branch of the IF, but a set of values instead. What would be the correct syntax in this case?

    (I have tried the case syntax as well, but still it is not working)

    There may be a more efficient way to code this, but I do not have access to the Cadence tools at this time to verify a more efficient method - sorry!

    Nevertheless, I think this might accomplish what you need. In essence, you will create three "temporary" design variables. Two determine if A has assumed either of the two A values for which B is set to 1. The third performs the logical OR operation using temporary variables 1 and 2 to see if A has assumed either of the two values for which B i set to 1. If the third temporary variable is TRUE, then B is set to 1 and if not TRUE, B is set to 0.

    (You may need to expand the arithmetic expression 2**(-1) to a value - I am unable to verify this presently)

    Variable Name: Expression

    B_temp_variable_1: if( (VAR("A") == 1) then 1 else 0)
    B_temp_variable_2: if( (VAR("A") == 2**(-1)) then 1 else 0)
    B_temp_variable_3: B_temp_variable_1 + B_temp_variable_2
    B: if((VAR("B_temp_variable_3") == 1) then 1 else 0)

    I hope this helps and works for your application NewScreenName!

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • NewScreenName
    NewScreenName over 2 years ago in reply to ShawnLogan

    Dear Shawn,

    I think this would not solve my issue, would it?

    The way you propose is going to run simulations with (A=1 or A=2**-1) AND B=1, plus simulations with (A=2**-9 up to 2**-2) AND B=0.

    But in addition to them, I also need to run simulations with (A=1 or A=2**-1) AND B=0.

    So all possible values of A must be associated to B=0, and the two biggest values of A to be associated with B=1.

    Also I guess the solution you propose is doable when there are few cases to be handled by hand, but if I had to break a set A of values which could be say 40 values, in two sets of 20 each associated with B? And B itself could assume more than 2 values. Therefore manually adjusting every combination might quickly become undoable.

    If there was a syntax similar to the IF that you showed, and which allowed to handle sets of values rather than just one value would be great, if so could you please redirect me to who could be aware if there is such option?

    Also, thank you very much for taking time to reply so far

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 2 years ago in reply to NewScreenName

    Dear NewScreenName,

    NewScreenName said:

    I think this would not solve my issue, would it?

    The way you propose is going to run simulations with (A=1 or A=2**-1) AND B=1, plus simulations with (A=2**-9 up to 2**-2) AND B=0.

    But in addition to them, I also need to run simulations with (A=1 or A=2**-1) AND B=0.

    So all possible values of A must be associated to B=0, and the two biggest values of A to be associated with B=1.

    In your Corners setup,select design variable A and sweep it to vary through ALL of its 15 values. The value of B will only take on the value of 1 when A assumes the values of 1 and 2**-1. Do not set the value of B in the corner tool in order that ts value take on the value in the conditional expression.  If you need to examine the two cases where A = 1 and 2*-1 with B set to 0, run tnose two added cases for an additional 2 simulations with B forced to 0. Hence, your corners setup will run 17 simulations total (not 30) - which is what I thought you wanted to do. Please pardon me if I am still not understanding, but this is what I thought you wanted.

    NewScreenName said:
    f there was a syntax similar to the IF that you showed, and which allowed to handle sets of values rather than just one value would be great,

    I am not familiar with one and can only suggest you contact Customer support if no one else responds on the Forum.

    Sorry fi my prior explanation was not clear - or if I still am not understanding properly!

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to ShawnLogan

    One way to do it would be to create sweep A as:

    {From/To}Octave:2**-14:1:1{From/To}{Inclusion List}2**-1 1{Inclusion List}

    and sweep B as:

    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1

    and then select both variables and right mouse->Group as Parametric Set. Then in the Run Preview you'll get:

    The orangey colour indicates that the sweeps are grouped. Unfortunately there's not a clean way of generating a repeated point (I may file an enhancement request for this) other than expanding out the values as shown.

    You can't have the sweep itself being conditional as you were trying to do.

    The other (manual) way would be to just sweep B between 0 and 1 and have the from/to for A as you did, and then on the run preview (Run->Run Preview) deselect the runs that you don't want to run - but that's a bit cumbersome to have to do each time.

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • NewScreenName
    NewScreenName over 2 years ago in reply to Andrew Beckett

    Andrew and Shawn,


    Thank you very much for your answers. Once I will be back from vacation I will try how you suggested and let you know in case something does not work on my side.

    Best regards

    • 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