• 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. Setting the X/Y Variable When Creating a Waveform

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 126
  • Views 2165
  • 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

Setting the X/Y Variable When Creating a Waveform

BrJWr
BrJWr over 9 years ago

I'm trying to create a data mask to add to a return loss plot.  The return loss plot shows up in db20 vs frequency. When I create a waveform I do something like

Xv = drCreateVec('double nil)
Yv = drCreateVec('double nil)
drAddElem( Xv 0.05e9)
drAddElem( Yv -10)
drAddElem( Xv 1.2499e9)
drAddElem( Yv -10)

Wv = drCreateEmptyWaveform()

drPutWaveformXVec(Wv Xv)
drPutWaveformYVec(Wv Yv)

I then try and the plot(Wv). The new waveform will not plot in the same window as my original data (nor can I cut-n-paste it into the window).  It seems like I need a method to tell the tool that my new waveform is in db for the Yvec and freq for the Xvec.

How can I get Viva to plot this in the current window that was created by plotting db20 vs freq ?

Thanks

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

    There are a couple of ways. If you're using IC616 ISR3 or later, you can go over the axis in ViVA and use Right Mouse->Allow Any Units. You can do this on both the x and y axes. If you do that, you can then plot unitless data (like your waveforms) on the same axes as something with units (like the results from your simulation). Or you can plot data with mismatched units on the same axes.

    Alternatively, set matching units in your code. This post shows code which does this: 

    Andrew Beckett
    Replied to: Ocean/Calculator expressions and their units
    Hi Michele, The units are maintained by each calculator expression working on a waveform - but it doesn't really do a reduction - it's not that smart. You can change the units using these functions: /…
    By Andrew Beckett over 13 years ago in Cadence Technology Forums > Custom IC Design

    However, you could just set Xv->units="freq" in your code, and similarly for Yv. You might want want to find your existing signal which you've plotted, and look at:

    drGetWaveformXVec(sig)->units and drGetWaveformYVec(sig)->units

    to see what the existing units are and match those.

    The idea of units mattering is to try to prevent disparate signals being plotted on the same graph (you don't really want it trying to plot a time-domain current waveform on the same graph as a frequency domain voltage waveform by default).

    Kind Regards,

    Andrew.

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

    There are a couple of ways. If you're using IC616 ISR3 or later, you can go over the axis in ViVA and use Right Mouse->Allow Any Units. You can do this on both the x and y axes. If you do that, you can then plot unitless data (like your waveforms) on the same axes as something with units (like the results from your simulation). Or you can plot data with mismatched units on the same axes.

    Alternatively, set matching units in your code. This post shows code which does this: 

    Andrew Beckett
    Replied to: Ocean/Calculator expressions and their units
    Hi Michele, The units are maintained by each calculator expression working on a waveform - but it doesn't really do a reduction - it's not that smart. You can change the units using these functions: /…
    By Andrew Beckett over 13 years ago in Cadence Technology Forums > Custom IC Design

    However, you could just set Xv->units="freq" in your code, and similarly for Yv. You might want want to find your existing signal which you've plotted, and look at:

    drGetWaveformXVec(sig)->units and drGetWaveformYVec(sig)->units

    to see what the existing units are and match those.

    The idea of units mattering is to try to prevent disparate signals being plotted on the same graph (you don't really want it trying to plot a time-domain current waveform on the same graph as a frequency domain voltage waveform by default).

    Kind Regards,

    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