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