Home > Community > Forums > Custom IC SKILL > Saving all operating point data for swept simulations

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: *

 Saving all operating point data for swept simulations 

Last post Fri, Jun 13 2008 1:37 PM by archive. 3 replies.
Started by archive 13 Jun 2008 01:37 PM. Topic has 3 replies and 5710 views
Page 1 of 1 (4 items)
Sort Posts:
  • Fri, Jun 13 2008 1:37 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,950
    Saving all operating point data for swept simulations Reply

    I would like to make plots of gm over Id and I'd like to do that from a SKILL/OCEAN script. I am quite new to cadence and almost completely new to SKILL, so please forgive if some questions have obvious answers.

    My problem is that I can only have access to the gm value for the bsim model for the DC operating point, not for all the values.

    --------------------------------------------------------------------------------------
    ; Here's how I set up the analysis:
    ocnWaveformTool('wavescan)
    simulator('spectre)
    design(library cell "schematic")
    createNetlist(?recreateAll t ?display nil)
    resultsDir(strcat("/local0/scratch/ballinim/xh035/" cell "/spectre/schematic" ))
    modelFile(
        '("/usr/local/vlsi/cds/Design_Kits/XFAB_XH035_v3_1/spectre/xh035/mos/param.scs" "3s")
        '("/usr/local/vlsi/cds/Design_Kits/XFAB_XH035_v3_1/spectre/xh035/mos/bip.scs" "tm")
        '("/usr/local/vlsi/cds/Design_Kits/XFAB_XH035_v3_1/spectre/xh035/mos/bsim3v3.scs" "tm")
        '("/usr/local/vlsi/cds/Design_Kits/XFAB_XH035_v3_1/spectre/xh035/mos/cap.scs" "tm")
        '("/usr/local/vlsi/cds/Design_Kits/XFAB_XH035_v3_1/spectre/xh035/mos/dio.scs" "tm")
        '("/usr/local/vlsi/cds/Design_Kits/XFAB_XH035_v3_1/spectre/xh035/mos/ind.scs" "tm")
        '("/usr/local/vlsi/cds/Design_Kits/XFAB_XH035_v3_1/spectre/xh035/mos/res.scs" "tm")
    )
    saveOption( 'currents "all" )
    save('i "/Mn/S" "/Mn/D" "/Mp/S" "/Mp/D")
    analysis('dc ?saveOppoint t  ?param "vg"  ?start "0" ?stop "3.3" ?values 0.5
             ?write "spectre.dc"  ?oppoint "rawfile"  ?maxiters "150" ?maxsteps "10000" 
             ?annotate "status"  ?threshold "0.0"  ?detail "node" ?sort "name"  )
    temp( 27 )
    run()

    ; Here's how I get a single value for gm
    gmoverid = pv("Mn.m1" "gmoverid" ?result "dcOpInfo-info")
    printf("gmoverid = %g\n" gmoverid)

    ; For currents and voltages I get the values for the whole sweep range
    id = i("Mn:1" ?result "dc-dc")
    vg = v("/vgn" ?result "dc-dc")
    ---------------------------------------------------------------------------------------------

    How can I get the value of gmoverid for the whole swept range?

    I thought about these possibilities:

    1) gmoverid = deriv(id)/id
     but I'm not even sure this is correct because I do not know the bsim model so well.

    2) I read somewhere I can specify to spectre to save those things by adding a file with the following text to the model libraries: "save Mn:oppoint". Is there a way to invoke that spectre command directly from the script without writing a file?

    3) Iterating the DC analysis with loop. How can I construct a loop for, say, linearly spaced values? In C I would use the for(vg=0;vg < 3.3; vg+=0.1){} construct, but I don't know how to do that in SKILL. I think I could use foreach, but I don't know how to (easily and compactly) creating the list of values. I also think this approach would be slower.

    Can please give suggestion?

    Thanks.
    Marco Ballini


    Originally posted in cdnusers.org by mballini
    • Post Points: 0
  • Mon, Jun 16 2008 10:53 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,950
    RE: Saving all operating point data for swept simulations Reply

    If using a recent MMSIM version (e.g. MMSIM70, or MMSIM62 - I think you may need MMSIM62 Update 1), you can use wildcards in save statements.

    So you can create an include file, and put:

    save *:oppoint

    or

    save *:gmoverid

    This eans it's the same include file for all circuits - no need to change it for different transistors.


    Originally posted in cdnusers.org by adbeckett
    • Post Points: 0
  • Mon, Jun 16 2008 11:00 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,950
    RE: Saving all operating point data for swept simulations Reply

    Thank you for your answer.
    I actually don't know what MMSIM is.
    However I need to do that from inside an OCEAN script.
    How can I do it?
    What is an include file and what is the syntax to include?
    sorry but I am bit lost...
    thanks again
    mb


    Originally posted in cdnusers.org by mballini
    • Post Points: 0
  • Mon, Jun 16 2008 1:17 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,950
    RE: Saving all operating point data for swept simulations Reply

    Apologies - I had a problem with my computer earlier, and so didn't quite complete my post before sending.

    Anyway, let's answer some questions:

    1. MMSIM. Originally spectre was released as part of the "IC" release stream (e.g. IC5141). Some time ago, we (Cadence) made the decision to separate it from the IC stream, and release it in its own stream alongside Ultrasim. Simulators tend to advance more rapidly than the environment does (new models, analyses, etc), and so releasing it separately made sense. So whilst spectre is still in IC5141 (we couldn't take it away having released it in IC5141), it is not part of any later IC releases (ICOA5251, IC61), but instead you need to install an "MMSIM" release (e.g. MMSIM60, MMSIM61, MMSIM62 or MMSIM70). The last two of this list are the current releases.
    2. Wildcards. Support for wildcards was added in MMSIM62 and MMSIM70. See "spectre -h save" for details on the syntax
    3. Include files. Create a text file (give it a ".scs" suffix so spectre knows it is in spectre rather than SPICE syntax), containing one of the statements I mention in my previous post, save it, and then in ADE you can reference it as a file in the model libraries form.
    4. For OCEAN, you could save the OCEAN script from ADE to see what that looks like, or just add another line in your modelFile() call:
    "/path/to/your/saveFile.scs"
    (don't give a section name, because it's just a straight file include).

    I suggest you have a good look at the documentation - in IC5141 this is started with "cdsdoc"; in IC61 and MMSIM62/70 it's started with "cdnshelp".

    Regards,

    Andrew.


    Originally posted in cdnusers.org by adbeckett
    • Post Points: 0
Page 1 of 1 (4 items)
Sort Posts:
Started by archive at 13 Jun 2008 01:37 PM. Topic has 3 replies.