• 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. How to sweep multiple params and save the specific param...

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 125
  • Views 14824
  • 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

How to sweep multiple params and save the specific param selected from the circuit?

diffsland
diffsland over 5 years ago

first of all,  i am fresh here. and i am happy to be here.

recently, i am learning how to use ocn. and i met a question troubled me a lot.

simulator('spectre)  //  design(".../netlist")  //  resultDir(".../schematic")  //  modelfile('(".../saveop.scs" "") '(".../toplevel.scs" "top_tt"))

analysis('dc ?saveOppoint t ?dev "/V2" ?param "dc" ?start "0.3" ?stop "1.1" ?lin "200")

envOption('analysisOrder list("dc") )

temp(27)

run()

selectResult('dc)

ocnPrint(?output ".../xx.dat" ?numberNotation 'scientific getData("M0:gm"),....)

this is the code i am use to get param from circuit.

however, i have to sweep multiple params in circuit, and save the params from circuit as mentioned above.

i've tried "foreach, while" synax, and  failed. and i also read the ocnref together with ocn sample script in dfii. 

unfortunately, i could not figure out how~~~

the param sweeping code i attached below:

simulator('spectre)  //  design(".../netlist")  //  resultDir(".../schematic")  //  modelfile('(".../saveop.scs" "") '(".../toplevel.scs" "top_tt"))

analysis('dc ?saveOppoint t )

desVar ("a" 650m)

desVar("b" 300m)

envOption('analysisOrder list("dc") )

temp(27)

paramAnalysis("a" ?values '(0.6 0.62 0.64)

paramAnalysis("b" ?values '(0.3 0.35)))

paramRun()

hope someone could help me~~thanks a lot!!!

  • Cancel
Parents
  • ShawnLogan
    ShawnLogan over 5 years ago

    Dear diffsland ,

    diffsland said:

    this is the code i am use to get param from circuit.

    however, i have to sweep multiple params in circuit, and save the params from circuit as mentioned above.

    i've tried "foreach, while" synax, and  failed. and i also read the ocnref together with ocn sample script in dfii. 

    unfortunately, i could not figure out how~~~

    the param sweeping code i attached below:

    I am sure others will warn you, so I will at least mention it, but the param() functionality is rarely used today in lieu of Assembler or Explorer. Nevertheless, I do occasionally use it and used it quite often in the past. I will also add that it is far less efficient than the job submittal processes in Assembler or Explorer.

    I have attached some sample ocean code that will retrieve data from a parametric analysis. In this case, it is computing the real and imaginary parts of an impedance. The param function sweeps a DC voltage over  a particular range and the code computes the real and imaginary impedances for each value of the voltage over that range. The sweep over the range is accomplished using a while() loop. A foreach() loop surrounds the code to run the data retrieval on three separate param() analyses in three different simulations. The results are written to a comma-separated variable file for each simulation directory. The function calls two procedures that I also attached - getWave() and find_netlist_param(). The former replaces the ocean getData() command and adds some error checking to make a failure to access a waveform more visible. The latter finds the process case that is used in the simulation. I hope the code is commented well enough for you to understand how to access results from a param() analysis. The three files are in the attached zip file.

    Shawn

    param_ocean_files.zip

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • diffsland
    diffsland over 5 years ago in reply to ShawnLogan

    thanks very much

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 5 years ago in reply to diffsland

    Dear diffsland,

    I just hope the code makes sense to you..good luck!

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • ShawnLogan
    ShawnLogan over 5 years ago in reply to diffsland

    Dear diffsland,

    I just hope the code makes sense to you..good luck!

    Shawn

    • 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