• 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. Programmatically set y-axis in VIVA in Log Scale

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 125
  • Views 18732
  • 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

Programmatically set y-axis in VIVA in Log Scale

Paolo Minotti
Paolo Minotti over 8 years ago

Hi there,

I want to plot the input referred noise of an instance.


I enter in the Calculator / ADE Outputs

getData("in" ?result "noise")


By default, y-axis, that is expressed in V/rt(Hz), is in linear scale. It would be much more interesting and intuitive to have it visualized in log scale.

Of course, one can right-click on the y-axis label, and select "Log Scale".

Is there a way to to this programmatically?

In particular, I would like not to use any SKILL function, I would like to just change the expression in the Calculator / ADE Outputs.

Thank you!

Paolo

--

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    Paolo,

    If  you did a log sweep in the noise analysis, it should get plotted with a log x-axis automatically, and so what I'm suggesting below wouldn't be necessary (it gets the xScale hint on the waveform from how it was swept in the simulator - with spectre, anyway).

    Otherwise you can override the hint that's stored on the waveform object by using an expression like this:

    let(((in getData("in" ?result "noise"))) in~>xScale='log in)

    Yes, it's a piece of SKILL code, but you can put this in your output expressions or use it as part of another expression. What it's doing is getting the original result and storing it in a temporary variable, setting the xScale attribute on the waveform object, and then returning the waveform object.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Paolo Minotti
    Paolo Minotti over 8 years ago
    Dear Andrew,
    thank you for your reply.

    Actually, the axis I want to be displayed in log scale is y-axis (not x).
    I tried to adapt your solution, using
    let(((in getData("in" ?result "noise"))) in~>yScale='log in)
    but it does not work, i still have input-referred noise PSD plotted in linear scale.

    Paolo
    --
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    Hi Paolo,

    My apologies - I misread your question. Also, the way I suggested is not the best anyway - better to use the underlying vector objects (as this method works for both X and Y axes; there is limited support for the hint on the waveform object itself):

    let(((in getData("in" ?result "noise"))) drGetWaveformYVec(in)~>scale="log" in)

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Paolo Minotti
    Paolo Minotti over 8 years ago
    Dear Andrew,
    this solution works perfectly.
    I really appreciate your help.

    Best regards,
    Paolo
    --
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • danco
    danco over 5 years ago in reply to Andrew Beckett

    Hi Andrew,

    Is there a way to send the output to a secondary Y axis in a similar manner?

    Regards,

    Dan

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

    Dan,

    If the y-axes have different units then they will automatically plot on different axes (so if ~>units on the y vector is different).

    Or if plotting from SKILL/OCEAN functions, you could use the ?yNumber argument. For example:

    plot(VT("/OUTP") VT("/OUTM") ?yNumber list(1 2))

    Regards,

    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