Home > Community > Forums > Custom IC Design > How to output/save gain, bandwidth, phase margin, gain margin using Spectre Language?

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

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

Last post Wed, Feb 26 2014 8:12 AM by Alex Liao. 0 replies.
Started by Alex Liao 26 Feb 2014 08:12 AM. Topic has 0 replies and 1211 views
Page 1 of 1 (1 items)
Sort Posts:
  • Wed, Feb 26 2014 8:12 AM

    • Alex Liao
    • Top 150 Contributor
    • Joined on Wed, May 22 2013
    • Posts 47
    • Points 775
    How to output/save gain, bandwidth, phase margin, gain margin using Spectre Language? Reply

    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:

     

    .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

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

     

    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"

     

    The gain from calculator is like this:

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

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

     

    Thanks, 

     

    • Post Points: 5
Page 1 of 1 (1 items)
Sort Posts:
Started by Alex Liao at 26 Feb 2014 08:12 AM. Topic has 0 replies.