• 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. ymax on a waveform family

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 125
  • Views 17046
  • 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

ymax on a waveform family

ZoltanT
ZoltanT over 6 years ago

Hi Everyone,

I've had some nested sweeps in spectre, which resulted in waveforms families in OCEAN. ymax() does not work on some of my waveform families, but works on other ones. What could cause it? Where lays the difference? A waveform, actually any number series has to have a maximum value. I see no ambiguity here. 

What I expect: ymax takes the maximum Y value of each waveforms in the family, and it returns another waveform family which has one variable less than the original because the X-axis variable has been eliminated.

Is there any way to debug it, or even better to avoid this issue?

Thanks,

Zoltan

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 6 years ago

    Hi Zoltan,

    That's how I'd expect it to behave. When you say it "does not work", how does it not work? What goes wrong? What version are you using? Some details of the problem might help to narrow it down...

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ZoltanT
    ZoltanT over 6 years ago in reply to Andrew Beckett

    Hi Andrew,

    Sorry, for being unspecific. Sometimes I do not notice that I missed something out. ymax() returns nil in my case for some waveforms, but not for others. Below it gives nil.

    ocean> Vgain
    srrWave:0x294ee440
    ocean> ymax(Vgain)
    nil
    ocean> type(Vgain)
    other
    ocean> famIsFamily(Vgain)
    t

    But here it works as I expect him to work:

    ocean> Id0
    srrWave:0x294ed350
    ocean> ymax(Id0)
    srrWave:0x294efbc0
    ocean> famIsFamily(ymax(Id0))
    t

    The definitions:

    Vgain = v("d" ?result "sw_b_ac_gain-sweep")
    Id0 = -i("VD_DC:p" ?result "dc")

    I haven't seen any strong pattern, except that if one signal does not work for an analysis, than others might also not, but it is not analysis type dependent, i.e. one ac analysis is good, but the next one isn't.

    Is there any way I can debug this?

    Thanks,

    Zoltan

    Ps: I use ICADV 12.2-64b.500.7

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to ZoltanT

    Hi Zoltan,

    In this case it's because the results from an ac analysis are complex values - you get a complex number (representing the real and imaginary part) versus frequency, with a surrounding sweep around that in your case. You can't take the ymax of a complex-numbered waveform - you have to transform it to a simple value versus frequency instead. So you should be able to do:

    ymax(mag(Vgain))

    or

    ymax(db20(Vgain))

    Those should work fine. Not sure if there are other situations, but this will certainly be the reason in this case.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to ZoltanT

    Hi Zoltan,

    In this case it's because the results from an ac analysis are complex values - you get a complex number (representing the real and imaginary part) versus frequency, with a surrounding sweep around that in your case. You can't take the ymax of a complex-numbered waveform - you have to transform it to a simple value versus frequency instead. So you should be able to do:

    ymax(mag(Vgain))

    or

    ymax(db20(Vgain))

    Those should work fine. Not sure if there are other situations, but this will certainly be the reason in this case.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • ZoltanT
    ZoltanT over 6 years ago in reply to Andrew Beckett

    Thanks, Andrew! This was the problem. I am always  forgetting that, because the magnitude is plotted if nothing else is specified. It is not a bug, but a feature Slight smile

    • 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