• 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. spectre sweep statement in Ocean

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 125
  • Views 17191
  • 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

spectre sweep statement in Ocean

Steve Mikes
Steve Mikes over 12 years ago

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.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    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!

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Steve Mikes
    Steve Mikes over 12 years ago

    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!

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    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
    modelFile(
        '("myModels.scs" "")
        '("sweepAnalysis.scs" "")
    )
    desVar(      "CAP" .8p    )
    temp( 27 )
    run()
    selectResult('ac)
    plot(v("/out"))

    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,

    Andrew.

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Steve Mikes
    Steve Mikes over 12 years ago

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

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Steve Mikes
    Steve Mikes over 12 years ago

     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.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

     envOption('controlMode)

    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).

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • 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