• 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. Using "cross" function (or an equivalent) in AC sim

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 64
  • Views 8967
  • 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

Using "cross" function (or an equivalent) in AC sim

rushil
rushil over 4 years ago

I have an AC sim, with a Design Variable Sweep at a chosen frequency.
As the Variable is swept, I get a change in the AC waveform that I'm monitoring (which is as expected).
If I plot the waveform, it shows the ac voltage in y-axis, and the Swept Design Variable in the x-axis.

To this waveform, I want to apply the cross() to extract the x-axis point at which the function crosses a value.
So: cross(VF("/LPFOUT") 750m 1 "either" nil nil nil )
... to find the value of the Design Variable for which VF("/LPFOUT") crosses 750mV.

However, when I do this, I get "expression evaluation failed" as message.
I have successfully used this method for a DC Analysis sweep, so I know it works for VS signals.

Therefore:
1) Does the cross function work for AC (VF) signals?
2) If not, is there another way I can achieve what I need - which is to extract the value of my variable at which the ac signal crosses a threshold?

Looking forward to a response!

PS: Using Virtuoso 6.1.8.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago

    Use: cross(mag(VF("/LPFOUT") 750m 1 "either" nil nil nil ))

    The VF function returns a complex waveform (real/imaginary versus frequency) which is masked by the fact that when you plot it, it automatically converts it to the magnitude. However, you can do real(VF(...)), phase(VF(...)), db20(VF(...)), so it's actually complex.

    That should fix it.

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • rushil
    rushil over 4 years ago in reply to Andrew Beckett

    Thank you very much Andrew, for the quick solution!

    • 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