• 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. RF Design
  3. Spectre netlist defining voltage gain and saving the results...

Stats

  • Replies 5
  • Subscribers 62
  • Views 2872
  • Members are here 0

Spectre netlist defining voltage gain and saving the results to view in the psf file

GM202510215619
GM202510215619 4 months ago

Hello, I have a simple circuit with Vout as the output node of the amplifier and Vin as the input node of the amplifier.

I want to save the dB voltage gain results and plot it in ViVA from the raw file.

Is there a way to do it through using a few lines of code in my spectre testbench netlist?

Any help would be appreciated. Thank you

-GGM

  • Cancel
  • Sign in to reply
  • Andrew Beckett
    Andrew Beckett 4 months ago

    If you want small-signal gain, you could use an xf analysis:

    xf (Vout 0) xf start=1 stop=1G

    Then in the xf results, you'll see listed all the voltage sources in the circuit. Assuming there's one which is connected to the Vin signal, you can set the results browser to plot in dB20 (it will show Default and Magnitude at the top of the results browser; change the Magnitude to dB20). Double click on the voltage source and you'll get the gain in dB.

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • GM202510215619
    GM202510215619 4 months ago in reply to Andrew Beckett

    Is this also the way to do it for differential nodes?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 4 months ago in reply to GM202510215619

    The output of an xf analysis can certainly be differential. If the input is a single voltage source (across a differential input, biased somehow) then you could use xf analysis. Or you could use ac analysis and have two input sources each with (say) mag=0.5 (phase set appropriate or one source inverted) and then plot the output voltage in the ac results between the two output nodes.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • GM202510215619
    GM202510215619 4 months ago in reply to Andrew Beckett

    Thanks so much for the quick answers. I was able to get the transfer gain using both methods. I was wondering if there's a way to save differential voltage without using calc in ViVA. The method I am using now is something like:

    VpOUT (OUT 0) bsource v=v(OUTP, OUTN)

    Then node OUT is saved as differential voltage.

    I might be missing a simple way to do the same.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 4 months ago in reply to GM202510215619

    Or simpler still:

    VpOUT (OUT 0 OUTP OUTN) vcvs gain=1

    Note that ViVA can also plot differential signals without needing to use the calculator.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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.

© 2026 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information