• 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 SKILL
  3. Plotting a straight line (the hard way)

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 15062
  • 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

Plotting a straight line (the hard way)

CADcasualty
CADcasualty over 6 years ago

I ran an AC analysis from 10Hz to 100MHz and stored the gain in dB waveform into a variable called Av_dB and the phase waveform into a variable called Phase. I'm writing a script as part of a bigger scenario so I plotted the result using the following command (I had already defined the window_id variable):

awvPlotWaveform( window_id \
list( Av_dB Phase ) \
?expr list("mag" "phase") \
?stripNumber list( 1 2 ) \
)

I thought it would also be instructive to highlight 0dB on the plot so I blindly tried:

awvPlotWaveform( window_id \
list( Av_dB 0 Phase ) \
?expr list("mag" "0" "phase") \
?stripNumber list( 1 1 2 ) \
)

but quickly found out that 0 isn't a waveform so it didn't work. Referencing a 10 year old thread:
community.cadence.com/.../21756
I eventually came up with something that worked:

Zero_dB = artListToWaveform( '((10 0) (100M 0)) )
abSetUnits(Zero_dB "dB")
abSetXUnits(Zero_dB "freq")
awvPlotWaveform( window_id \
list( Av_dB Zero_dB Phase ) \
?expr list("mag" "0" "phase") \
?stripNumber list( 1 1 2 ) \
)

I'm the first to admit that the the above is pretty awkward, but I couldn't figure out how to do this obvious thing. Is there a better way?

P.S. I know about awvPlaceYMarker() but that doesn't work for plot strips, only subwindows.

Bonus points: Is there a way to plot a vertical line (i.e. at a given frequency) on just one of the above plot strips?

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

    There isn't really a pretty way of adding curve that isn't just a variant on what you've done already. There's an enhancement CCR (1310040) asking for strip support on awvPlaceYMarker, but it's not been implemented yet (so you might want to contact customer support and ask for a duplicate). I can see how it could be done using the underlying (very private - too low level to reveal) API, so it's feasible in principle.

    The vertical markers for your bonus point question don't cut it because they are across all strips. The only way you could do it is (I assume) add a two point vertical line between the ymin and ymax of the waveform on that strip. Another alternative might be to place a bookmark with awvPlaceBookmark() in the region you want to indicate something - that might be simpler?

    Andrew.

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

    Thanks Andrew. I did go looking for ways to access the ymin and ymax I got after plotting (i.e. the auto-scaled values) on a given strip but drew a blank. Do you know how to get that information?

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

    Thanks Andrew. I did go looking for ways to access the ymin and ymax I got after plotting (i.e. the auto-scaled values) on a given strip but drew a blank. Do you know how to get that information?

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

    No, I don't think there's a function for that. What I was talking about was using the ymin and ymax functions on whatever curve you've plotted in a particular strip rather than the axis limits.

    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