• 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. ymin() returns unexpected error for a waveform family

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 125
  • Views 13607
  • 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

ymin() returns unexpected error for a waveform family

ZoltanT
ZoltanT over 5 years ago

Hi Everyone,

I can not get the minimum value of a waveform family. I would expect that ymin returns a waveform where the Y values are minimum y values of the waveforms in the waveform family and the X values are the leaf values of the family. ymin returns with the error below for a family. I am able to plot the waveform family. ymin() work well for a different waveform family created by IS() function from a parametric DC sweep.

expression evaluation failed: Expression evaluates to nil
expression evaluation failed: ymin(-IF("/VD/PLUS"))

I created a simple procedure to check whether something is wrong with processing the family with a function, and it worked well. See code below. I am clueless how to debug the issue and generate the waveform, what I wanted to see, and which would help me make better decisions in the circuit design.

procedure( example(x)
   x+1
)
example(-ID("/VD/PLUS"))

Clearly there is something I do not notice or do not understand about using the function. Could you tell me how to debug it further and help me understand what's going on? Why is one waveform family accepted, but the other not.

Regards,
Zoltan

Edit: I use icadv 12.2-64b.500.7

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

    Hi Zoltan,

    The issue is probably because IF returns the results from an AC analysis, which means that the results are a complex current (from this you can find the magnitude and phase, or real and imaginary parts). The ymin function cannot find the minimum complex value (what would that mean, for a start?).

    So I suspect you just need to do:

    ymin(-mag(IF("/VD/PLUS")))

    Regards,

    Andrew.

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

    I would have bet, that I have checked it.. This was the problem. Thanks.

    To answer your rhetorical question I do not find it illogical to assume that the magnitude is used in every calculations just as the magnitude is plotted for a complex waveform. It seems to me rather intuitive to return the smallest Y-axis value of a plot for the ymax() function. Anyway, I see the logic behind it. I just wish that the error message would have given a more useful message.

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

    I completely agree with you. There's an enhancement CCR asking for mag to be applied when using these functions with complex data - CCR 1636329.

    This has come up so many times that I ended up writing an article a while back about why it returns nil: ymin and ymax sometimes return nil. Why?

    Andrew.

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

    I completely agree with you. There's an enhancement CCR asking for mag to be applied when using these functions with complex data - CCR 1636329.

    This has come up so many times that I ended up writing an article a while back about why it returns nil: ymin and ymax sometimes return nil. Why?

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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