• 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 SKILL
  3. Save data for each iteration Monte Carlo using OCEAN

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 143
  • Views 8462
  • 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

Save data for each iteration Monte Carlo using OCEAN

Yasso
Yasso over 3 years ago

Hello,

I'm doing serveral simulations regarding a circuit that has a large number of instances. Using ocean I create a script that runs a Monte Carlo simulation. My problem is that it only stores the data from the first iteration (?mcNumPoints). I wanna save each iteration data in a different file, for example "MCit1" for the first, "MCit2" for the second and so on, so later I can use these values separately in Matlab.

I have been saving my data in ".txt" files, I will share mi script right here. My version of cadence is 6.1.8-64b (2018).

;====================Set to Maestro mode explorer =============================
ocnSetXLMode("explorer")
...

;====================== Tests setup ============================================

....
simulator( 'spectre )
design( "...")
modelFile(
'("...")
)
analysis('tran ?stop "31m" ?errpreset "conservative" )

desVar(...)

envOption(
...)
option( ...
)
option( ...
)
temp( 27 )

MC1it = outfile("Iteration_1.txt" "w")
MC2it = outfile("Iteration_2.txt" "w")
ocnxlEndTest() ;

;====================== Sweeps setup ===========================================

;====================== Model Group setup ==========================================

;====================== Corners setup ==========================================

;====================== Checks and Asserts setup ============================================
ocnxlPutChecksAsserts(?netlist nil)

;====================== Job setup ==============================================
ocnxlJobSetup( '(
"blockemail" "1"
"configuretimeout" "300"
"defaultcpuvalue" "1"
"defaultmemoryvalue" "1000"
"distributionmethod" "Local"
"jobruntype" "ICRP"
"estimatememoryvalue" ""
"estimationsimulationmode" "0"
"lingertimeout" "300"
"maxjobs" "1"
"name" "Maestro Default"
"preemptivestart" "1"
"providecpuandmemorydata" "1"
"reconfigureimmediately" "1"
"runpointsvalue" "5"
"runtimeout" "-1"
"scaleestimatedbycpu" "100"
"scaleestimatedbymemory" "100"
"showerrorwhenretrying" "1"
"showoutputlogerror" "0"
"startmaxjobsimmed" "1"
"starttimeout" "300"
"usesameprocess" "1"
"warndisklow" "0"
"warnthresholdvalue" "100"
) )

;====================== Disabled items =========================================
ocnxlSetAllParametersDisabled(t)

;====================== Run Mode Options ======================================
ocnxlMonteCarloOptions( ?mcNumPoints "2" ?mcYieldTarget "99.865" ?mcNumBins "" ?samplingMode "random" ?wcdMinYieldSigma "3.0" ?dumpParamMode "yes" ?mcYieldAlphaLimit "0.05" ?mcStartingRunNumber "1" ?mcSigmaTarget "3" ?monteCarloSeed "12345" ?sssNumPoints "7000" ?highYieldExpectedYieldSigma "3" ?mcMethod "all" ?wcdInitialPoints "200" ?wcdMaxIterations "10" ?saveAllPlots "1" ?highYieldUseHistoryMC "0" ?saveProcess "1" ?wcdAutoNumPoints "1" ?mcStopEarly "0" ?highYieldCreateCorners "0" ?saveMismatch "1" ?wcdSkipLowYieldSpecs "1" ?wcdEnableVarReduction "1" )

;====================== Starting Point Info ======================================

;====================== Run command ============================================
ocnxlRun( ?mode 'monteCarlo ?nominalCornerEnabled t ?allCornersEnabled nil ?allSweepsEnabled t)

sum = 0
for(i 1 16384
sum = sum + 1
sprintf(g "/I%d/Vp" sum)
ocnPrint(?output MC1it value(VT(g) 30m 'iteration 1))
)

sum = 0
for(i 1 16384
sum = sum + 1
sprintf(g "/I%d/Vp" sum)
ocnPrint(?output MC2it value(VT(g) 30m 'iteration 2))
)

ocnxlOutputSummary(?yieldSummary t ?exprSummary nil ?specSummary nil ?detailed nil)
ocnxlOpenResults()

;====================== End XL Mode command ===================================
ocnxlEndXLMode("explorer")
close(MC1it)
close(MC2it)

The highlighted part is what I want to solve, this command doesnt work for me and I dont really know if it is because the line itself "ocnPrint(?output MC1it value(VT(g) 30m 'iteration 1))" is wrong and should be written differently, or if it isnt possible to achieve this way and I have to use different commands. I have ommited small parts in the beginning for cofidential reasons. Thanks,

Yassin

  • Cancel
Parents
  • Yasso
    Yasso over 3 years ago

    I have been looking for a solution for oceanXL and couldnt find any, is it not implemented on xl?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Yasso
    Yasso over 3 years ago

    I have been looking for a solution for oceanXL and couldnt find any, is it not implemented on xl?

    • 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