• 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 17192
  • 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
Parents
  • 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
Reply
  • 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
Children
No Data

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