• 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 vs. Ocean parametric analysis

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 125
  • Views 14700
  • 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 vs. Ocean parametric analysis

T Opperman
T Opperman over 12 years ago

This post refers to discussions in previous posts:

www.cadence.com/.../1321125.aspx

www.cadence.com/.../24495.aspx

While writing a script that runs a massive amount of parametric sweeps, where each sweep run for less than 1 second, I found that the entire script runs a lot faster if I execute the netlist from the shell and run the sweep directly in spectre,

sh(sprintf(nil "spectre %s -format sst2 -raw %s > %s/spectre.out" Netlist PsfResultsDir PsfResultsDir))

The sweep is declared in a seperate netlist file, and appended to the original netlist as a stimulus,

stimulusFile(SweepNetlist ?xlate nil)

I invoke the entire parametric sweep using the following commands:

                ocnResetResults()
                ;Create a stimulus file.
                SweepNetlist=strcat(makeTempFileName("/tmp/") ".scs")
                FH=outfile(SweepNetlist)
                fprintf(FH "%s" SpectreAnalysis)
                close(FH)
                stimulusFile(SweepNetlist ?xlate nil)
                ;Create the main netlist;
                Netlist=createNetlist(?display nil)
                NetlistDir=strcat(
                            "/"
                            buildString(
                                ;parse the path, remove the filename;
                                reverse(cdr(reverse(parseString(Netlist "/"))))
                                "/")
                            "/")
                PsfResultsDir = sprintf(nil "%s/../psf/" NetlistDir)
                ;Wipe the psf results.
                if(isDir(PsfResultsDir) sh(sprintf(nil "rm %s/*" PsfResultsDir)))
                ;Run the simulation in shell.
                sh(sprintf(nil "spectre %s -format sst2 -raw %s > %s/spectre.out"
                        Netlist PsfResultsDir PsfResultsDir))
                ;Read the results.
                openResults(sprintf(nil "%s" PsfResultsDir))

and I declare the spectre sweep in a string variable:

     SpectreAnalysis = "sweep sweep param=Vi_cm start=0 stop=1.9 step=0.1 {\n\
                    dc dc oppoint=rawfile \n\
                    stb stb prevoppoint=yes start=1 stop=1G probe=V5 \n\
                    }"

Any comments?

Regards,

Tjaart

 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    I agree, it does. The difference between ADE's parametric analysis and the internal sweep is not quite so significant in most cases, but it will be quicker to use the built-in sweep. In fact if you use the "paramset" capability in ADE's parametric analysis, it already uses the built-in sweep. Also the sweeps on the RF analyses also use this.

    The parametric analysis approach does however have the ability to allow simulations to be run in parallel when using distributed processing - so for longer simulations, that can win over running sequentially.

    There's a place for both approaches.

    Ideally I'd love to have the choice of using spectre's native sweep - and also for OCEAN to be less verbose to speed up performance.

    BTW, rather than using > %s/spectre.out in your command, use =log %s/spectre.out (the =log will suppress any output to the "screen", but still write the log file.

    If using IC615 onwards, I'd also suggest using -format psfxl instead of sst2 (but also ensure you've done:

    envSetVal("spectre.outputs" "simOutputFormat" 'string "psfxl")

    at the beginning of your OCEAN script (this can affect the format used for any save statements in your input.scs produced during netlisting, plus some of the mapping info, particularly related to currents because sst2 uses a different delimiter to other formats).

    Regards,

    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