• 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. How to use spectre calculator to return x value of a given...

Stats

  • Locked Locked
  • Replies 19
  • Subscribers 131
  • Views 52286
  • 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

How to use spectre calculator to return x value of a given y? Thanks.

supermos
supermos over 14 years ago
Hello, I have a question about how to get x value for a given point of y in a waveform. I think the calculator should have this function, but I checked xval function, it doesn't work for me... Let me make my question more specific: for instance, if I sweep variable vinn, the circuit output is called vout, how we can find the vinn for vout = 2V? Thanks and best regards, ej
  • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    Given that crossMethod is the internal function called within the cross function, and it is passed the same arguments as cross, it appears that the first argument to cross has been given as a scalar value rather than a waveform, so it's not surprising that it doesn't work. 

    Regards,

    Andrew 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • fvillota
    fvillota over 11 years ago

    Hi,

     

    This is my calculator expresion:

    cross(IDC("/I0/icv0") 24e-6 1 "either" nil nil  )

     

    Regards, 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 11 years ago

    Hi,

    Isn't IDC() going to return a single scalar value rather than a waveform (as Andrew pointed out being the source of the problem for the cross function) ?  In other words, wouldn't the DC current be static, and therefore not cross any thresholds?

    Hope this helps,

    Lawrence.

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

    The IDC function returns a current from the dc operating point. So it is a single value - there's no variation and hence it makes no sense to use cross on it. Put another way, it will resolve to a number - there's no x axis, and only a single y value. 

    Andrew 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 11 years ago

     Hi Francisco,

     

    I think Andrew's comment may be correct. Will not the function "IDC("/I0/icv0") return a scalar value? If you are trying to find a value from a DC analysis, perhaps you can use the value() function to interpolate between two values.

     

    Shawn

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

    If it's a dc sweep, then you should use IS() rather than IDC(), and you can find the x value for a given y with cross, or the y value for a given x using value().

    Andrew 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • fvillota
    fvillota over 11 years ago

    Thanks to all of you, the right function for my mesaurement is IS rather than IDC.

     Best regards 

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

    Hi  I want the x-axis value of a waveform for a given y value.

    My measurement statement throws error saying "Expression evaluates to nil". Need your expert help in understanding where am going wrong.

    Measurement statement is : 

    cross(clip(dB20(VF("/vout")) 10 1G ) ymax(clip(dB20(VF("/vout")) 10 1G )) 1 "rising" nil nil )

    Basically I am trying to get the X-axis(frequency value) of the clipped output waveform where the wave has the maximum value. The "ymax" expression gives me a correct number.

    My virtuoso version is IC6.1.6.500.7

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

    There's a CCR to fix this in an IC617 ISR (it may have been fixed now) which is to allow cross to return a value that it doesn't actually cross but exactly reaches. However, as I pointed out in that CCR, there's a much cleaner solution that already works (forever) and is simpler. Use xmax instead of ymax. That already gives you the x-value where the maximum occurs:

    xmax(clip(dB20(VF("/vout")) 10 1G ))

    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