• 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. How to output/save gain, bandwidth, phase margin, gain margin...

Stats

  • Locked Locked
  • Replies 0
  • Subscribers 125
  • Views 6466
  • 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

How to output/save gain, bandwidth, phase margin, gain margin using Spectre Language?

Alex Liao
Alex Liao over 11 years ago

As the title implied, using Graphic-based ADE tool as well as ocean script, result can be easily found. But what if I want to use Spectre language, how to achieve this(Screen display or save into a file an simulation result (gain,bandwidth).).  I already have the formula copied from calculator in ADE. I tried to write the result in SpectreFinal which is the stimuli file used as the input of a simulation.

I only know the way of doing it using Hspice like this:

 [CODE].op

.options ingold=2 list node post

.print ac vdb(6) vp(6)

.ac dec 100 0.001 10g

 

* net 6 = /out

.MEAS AC gain MAX vdb(6)                     *gain

.MEAS AC bandwidth WHEN vdb(6)=0                    *Unity Gain Frequency (Bandwidth)

.MEAS AC PM FIND PAR('180+vp(6)') WHEN vdb(6)=0     *Phase Margin 180+phase

.MEAS AC GM FIND PAR('0-vdb(6)') WHEN vp(6)=0   *Gain Margin

.end[/CODE]

 My current Spectre based file (spectreFinal) with partial section displayed here:

 [CODE]opBegin  dc  oppoint=rawfile  save=allpub  maxiters=150

+          maxsteps=10K  annotate=status  write="spectre.dc"

acSweep    ac  start=1.0  stop=1e9  annotate=status save=selected

                     

modelParameter info what=model where=file file = "./info.what0"

element info what=models where=file file = "./info.what1"

outputParameter info what=output where=file file = "./info.what2"[/CODE]

 

The gain from calculator is like this:

[CODE]*Gain = value(dB20((VF("/vout") / (VF("/1") - VF("/2")))) 2)[/CODE]

 How to edit the attached spectreFinal such that I could output the gain into a file using Spectre language?

 

Thanks, 

 

  • 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