• 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 value() returns multiple values for given set...

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 129
  • Views 22556
  • 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 value() returns multiple values for given set of multiple x values as returned by cross()

FAwqati
FAwqati over 7 years ago

Reference Thread = https://community.cadence.com/cadence_technology_forums/f/custom-ic-skill/23397/calculator-skill-function-for-sampling-signal-on-varying-pulse-edge

Is there a way for the value() or alternative function to accept an array of times that is returned by the cross() function similar to the one below, and return the values corresponding to those times ?

eg.

cross( VT("/vtest")) VAR("vdd33")/2 1 "rising"  t "time"  nil )

and then :

value( VT("/vout") cross( VT("/vtest")) VAR("vdd33")/2 1 "rising"  t "time"  nil ))

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 7 years ago

    Not really. However, one thing you could do is to use the cross function with 0 as the crossing number - in this case it returns a SKILL list of the crossing points. You could then use foreach on the resulting list and then call value() for each crossing point.

    It wouldn't be too hard to write such a function - that said, I think it would be a generally useful function to be able to sample a signal at the crossing point of some triggering signal. Probably worth contacting customer support to suggest this as an enhancement. If I have a moment, I'll see if I have time to write a function to do this.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • FAwqati
    FAwqati over 7 years ago in reply to Andrew Beckett

    Thank you for your reply Andrew. I will file the enhancement request with customer support as suggested.

    Also,  what do you mean by "crossing number" ? Do you mean "edge number" in the cross function ? If yes, then i believe it returns an array of x-axis times irrespective of the edge number value, as long as the number of occurrences = multiple. Or am i missing something ?

    Finally, Is there a difference between a SKILL list and these array of values i see coming back in the calculator ? 

    Thanks & BR,

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 7 years ago in reply to FAwqati

    I was replying from memory - what I called "crossing number" is referred to on the cross form as "Edge number". If the edge number is 0 (forget about the fifth argument onwards which allow you to return single or multiple values), then it returns a SKILL list (not a waveform) with all the crossing points. If you pass t as the fifth argument, it returns a waveform where all the points correspond to the crossing points, where the x values can either be the time of the crossing or the number ("cycle") of the crossing. A waveform object is a distinct object that can be plotted directly, whereas a list is a simple list of values that can easily be processed in SKILL. Bit complicated to describe in a few words - sorry...

    A list would just be something like (0.1e-9 2.3e-9 5.7e-9) for example.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • FAwqati
    FAwqati over 7 years ago in reply to Andrew Beckett

    Good morning Andrew. 

    FYI, I submitted the enhancement request as you recommended.

    I tried your suggestion of setting 0 on the Edge number, but if i do that, the expression fails in the calculator. Im guessing both the calculator / test editor outputs can't handle the skill list object that is returned.

    So can you walk me through how to generally implement your suggestion of using "a foreach loop on the resulting list and then call value() for each crossing point" please.

    Note i have never used ocean before, and have tried since yesterday to read through the reference documentation and watch youtube videos to get started.

    Finally,  in the ADE L test editor and the Setting Outputs window, there is an option to use ocean as the "Measurement Type". I cant find any information on this. Any ideas ?

    Thanks

    Faisal

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 7 years ago in reply to FAwqati

    For completeness (I'm working on Faisal's request via customer support too), I realised that I'd written a bit of code for a colleague that does exactly what is needed here a while back, and that he'd written it up as an article on Cadence Online Support. Here's a link to that article (I just updated it to add the function UI builder capability that's there in IC617 and beyond).

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mudit100
    mudit100 over 5 years ago in reply to Andrew Beckett

    Hi Andrew,

    I am doing a slow ramp up/down around a reference voltage for a comparator and measuring the trip points. After that, I change to another reference voltage and repeat the process.

    I used abCrossTwoWaves.il to get voltage points on rising and falling edges of the comparator output crossing a threshold. But, I would like to average the rising and falling edge voltage values. because the vector created for rising/falling is at different time instants, I am not able to add them. i.e let's say rising edge is 53m and falling edge is at 200ms so, voltage points will be at those time instants using the above SKILL function. how can I convert this to just two arrays with voltage points which can be added? or if there is another way...

    • 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