• 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. expression to get a scalar after a sweep

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 126
  • Views 19583
  • 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

expression to get a scalar after a sweep

davidzti
davidzti over 9 years ago

Hello,

I found some info on this subject posted a few years ago, but wasn't able to find a definitive solution.  I've been trying to get a scalar output from a sweep and use it in other tests via calcVal function, similar in spirit to these couple posts:

https://community.cadence.com/cadence_technology_forums/f/38/t/30795

https://community.cadence.com/cadence_technology_forums/f/38/t/17712

However, I can't figure out how to do it!  I wanted to ask if this functionality is available (to evaluate expression on a data set, vs on a per-point basis)?  If so, would someone kindly advise on how I can accomplish this?  (I'm on 6.1.6).

Many thanks in advance,

David

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Hi David,

    If you just use calcVal() to reference another scalar value (from another test), then it should work. If it was a waveform, maybe you need to use the value() function to extract the value you want?

    Without more specifics on what you're trying to do (what are the expressions, for example?) it's going to be very hard to give advice - your question is rather open ended, and anyone answering this would have to guess what the problem you're having is.

    Regards,

    Andrew.

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

    Hi Andrew,

    Thank you for the reply.   I'll happily provide some context.

    I have a block the output of which is the signal of interest (e.g., bandgap voltage, Vbg).  The block has 5 trim bits, and for each trim code, I want to sweep the temperature (say -40 to 125), and determine which trim code produces lowest Vbg spread over temp.

    I'm running DC sweep setup in ADEXL (test1), with temperature selected as the sweep variable.  I have setup a "corner" in ADEXL where I increment the trim codes, and for each code I calculate an expression spread, which is defined as (ymax(VS("/Vbg")) - ymin(VS("/Vbg"))).  What I would like to do next is calculate min_spread_code=xmin(spread), and assign calcVal("min_spread_code" "test1") to a variable in another test that's to follow.

    Here's where I run into a problem.  I can place the expression xmin(spread) in the calculator after test1 concludes, and get exactly what I want (the minimum of the array), however, when I include that expression in the test setup and hit "run", it attempts (and fails) to calculate it per point, not on the complete distribution.

    David

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

    Hi David,

    In that case, it sounds as if you need to use the "measurement over corners" capability in ADE XL. For your output min_spread_code, go to the column labelled "EvalType" (which shows "point" - it's probably next to the expression) and click on it until it shows a cyclic field - you can then set it to "corners". For some of the calculator functions, e.g. ymin, ymax, average, stddev and so on, this causes an additional ?overall t argument to be added to the function in the expression. That doesn't happen for xmin or xmax for some reason. 

    In this case it may not be necessary though because xmin would actually be just looking across a simple sweep - so it probably just works. I have some custom code that I wrote when investigating a customer case for a colleague a while back when I realised that xmin didn't support ?overall, but having written it and tested it I decided that in the case I was looking at it wasn't strictly needed. Let's see if this works first, and if not we can try my custom code. 

    Having evaltype of corners causes the expression to be evaluated once at the end of all the corners, rather than per-point. In IC617 in Assembler you have further choices for this field to allow measurements across parameters or measurements across everything, but don't think you need that here.

    Anyway, see if this works to produce a single output from the corners, and then see if that can be passed across as a calcVal to the next test. I'm afraid I didn't have time to try this out this morning, but hopefully it should all just work (fingers crossed).

    Regards,

    Andrew.

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

    Hi Andrew,

    I gave your suggestion a try, and sure enough, it worked!  Thank you for that pointer.  Changing the EvalType to "corners" produced a scalar min_spread_code, and placed its value in the "Nominal" column in the Results tab.  So far so good  I then assigned calcVal("min_spread_code" "test1") to a variable trim_code in a downstream test (let's say test2), and attempted to re-run the sweep using min_spread_code as the optimal trim code.  But sims always error out complaining that I'm passing "nil" to variable trim_code.  I'm hoping it's just a matter of syntax.  I also tried using calcVal("min_spread_code" "test1" ?cornerName "Nominal"), but to no avail.

    The only other thing I can think of is that both test1 and test2 rely on the variable trim_code, and somehow this creates a problem.  In test1, I use it in the corner setup as means to increment trim codes while sweeping temperature.  In test2 I want to assign the best trim code to it, and re-run the sweeps.  Perhaps I'm using the calcVal feature incorrectly?

    David

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

    Hi David,

    I reproduced the same problem. It seems that the measurement across corners results cannot be passed by calcVal to another test variable. I found a CCR 1587028 requesting that this is fixed.

    You might want to contact customer support to request that a duplicate CCR is filed so that you can register your interest and increase the likelihood of this being fixed sooner rather than later.

    Kind Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • davidzti
    davidzti over 9 years ago
    Hi Andrew,

    Thanks for confirming the problem. I submitted a case to the support team, hopefully that increased the likelihood of the fix becoming available in the near future.

    David
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Frank Wiedmann
    Frank Wiedmann over 9 years ago
    CCR 1587028 is now in "Planned" state.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • davidzti
    davidzti over 9 years ago

    Thanks for the update, Frank.

    • 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