Home > Community > Forums > Custom IC Design > spectre sweep statement in Ocean


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

 spectre sweep statement in Ocean 

Last post Wed, Dec 19 2012 1:05 PM by Andrew Beckett. 6 replies.
Started by Steve Mikes 19 Dec 2012 07:21 AM. Topic has 6 replies and 1202 views
Page 1 of 1 (7 items)
Sort Posts:
  • Wed, Dec 19 2012 7:21 AM

    spectre sweep statement in Ocean Reply

    Is there an analogue of the Spectre 'sweep' analysis in Ocean?

    example from a spectre netlist:

     sweepac sweep param=vbn start=400m stop=450m step=10m {

    ac ac  start=500M stop=3.3G step=5M annotate=status


     I know about for loops and the parametric analysis already, but those are both much slower than the sweep analysis.

    • Post Points: 20
  • Wed, Dec 19 2012 7:47 AM

    Re: spectre sweep statement in Ocean Reply

    No. You can't do it in OCEAN because you can't do it in ADE. There are some specific analyses that use sweep analyses (e.g. the swept PSS/QPSS/HB analyses), and also paramAnalysis does if you use a "paramset" type of sweep.

    It's a historical limitation - actually if you are using spectre in "interactive" mode, paramAnalysis (and even a foreach loop) should not be that dissimilar to the sweep analysis because spectre gets told to change a parameter in memory and does not restart. It's not quite as quick as a sweep analysis, but not that far off.

    You can of course include an include file (e.g. as a model file, or as a stimulus file) from OCEAN which contains the sweep analysis statements, and that will work.

    Please contact customer support and request this as an enhancement. The more that ask for it, the more likely it will be to be done!



    • Post Points: 20
  • Wed, Dec 19 2012 8:03 AM

    Re: spectre sweep statement in Ocean Reply

    Thanks for the answer Andrew. Would it be possible for you to show a really simple example of how to implement your suggestion of including the statement in a stimulus file? I'm not how the analysis would get run (would I need to use the run() command, or would the include statement just run the analysis immediately?) Thanks!

    • Post Points: 20
  • Wed, Dec 19 2012 8:24 AM

    Re: spectre sweep statement in Ocean Reply

    Create a file sweepAnalysis.scs containing this:

    sweepCAP sweep param=CAP start=0.8p stop=2p step=0.2p {
      ac ac start=100 stop=150M dec=20
    dcOp dc write="spectre.dc" maxiters=150 maxsteps=10000 annotate=status
    dcOp2 dc write="spectre2.dc" maxiters=500 maxsteps=10000 annotate=status

    (note I'm also answering your other post at the same time ;-> )

    Then in your OCEAN script:

     simulator( 'spectre )
    design("mylib" "ampTest" "schematic")
    resultsDir( "./simulation/ampTest/spectre/schematic" )
    path( "./Models" "." )  ; In my case I put sweepAnalysis.scs in the working dir, hence adding "." to the path
        '("myModels.scs" "")
        '("sweepAnalysis.scs" "")
    desVar(      "CAP" .8p    )
    temp( 27 )

    You could of course put a full path in the modelFile statement.

    Alternatively, rather than referencing sweepAnalysis from the modelFile function, you could use:

    stimulusFile("./sweepAnalysis.scs" ?xlate nil)

    You'll need the run() in both cases - all these are both doing are adding include statements into the input.scs.

    Note that I did two DC analyses in the file (as per your other example). You can access these results:

    results() =>  (subckts instance dcOp model variables
        output designParamVals "dcOp2-dc" ac primitives

    Notice that one of them has been "aliased". You can also get the unaliased names:

     results(?noAlias t)
    ("subckts-info.subckts" "element-info" "dcOp-dc" "modelParameter-info" "variables"
        "outputParameter-info" "designParamVals-info" "dcOp2-dc" "sweepCAP_ac-sweep" "primitives-info.primitives"

    So you can do: selectResult('dcOp) or selectResult("dcOp-dc") or selectResult("dcOp2-dc") to access the two DC analyses.

    Hope that helps!

    Kind Regards,




    • Post Points: 20
  • Wed, Dec 19 2012 8:40 AM

    Re: spectre sweep statement in Ocean Reply

     Thanks Andrew, this will provide the functionality I was looking for. It would of course be nice if it was more integrated so hacks like this were not necessary (actually, what would be even better is if spectreRF was integrated into MDL, which makes things like this easy). I believe I did put a request in for that awhile back already :)

    • Post Points: 5
  • Wed, Dec 19 2012 12:48 PM

    Re: spectre sweep statement in Ocean Reply

     By the way, how do know if I'm running Spectre in interactive mode or not? (from within Ocean, I found the Spectre command line flag)


    Also, when running a sim inside a for loop, is there a way to make Ocean not delete the PSF data directory on each iteration? (either append or just simply overwrite) This seems to add a few seconds to each iteration.

    • Post Points: 20
  • Wed, Dec 19 2012 1:05 PM

    Re: spectre sweep statement in Ocean Reply


    will tell you. Calling resultsDir() to change the results directory will prevent it deleting the results - not sure if that helps the speed (I've not done any benchmarking as a result of your question).


    • Post Points: 5
Page 1 of 1 (7 items)
Sort Posts:
Started by Steve Mikes at 19 Dec 2012 07:21 AM. Topic has 6 replies.