Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Cadence ADEXL Monte-Carlo Data Processing

Status
Not open for further replies.

ashrafsazid

Advanced Member level 4
Joined
Sep 17, 2016
Messages
104
Helped
1
Reputation
2
Reaction score
2
Trophy points
18
Location
Germany
Activity points
935
Hi,

I am seeking for tips or a way to process/collect data from adexl after monte-carlo mismatch simulation. Included is a picture where I have an expression for scalar quantity and for 10 iterations of monte-carlo simulation it has 10 values. Again you notice that there are temperature sweeps (different temperature corners) on each of which the monte-carlo simulation for 10 points is done.

mc.png

Now I would like to take average of the 10 points for each temp corner and plot them against the temp itself. e.g. "temp vs. mc_mean_val". :roll:

Is there any way to do so in adexl or just to export the "related" data from adexl?

Thanks
 


What average do you want to do ?

Measurement value x is dependent on two values, temp and mc_trial.
x(temp, mc_trial), total, temp*mc_trial

I would like to average them coloumn-wise. So it is like- "I do a monte-carlo for some points setting a fixed temperature and getting a mean value from summary table. I repeat this with many temperature points and plotting that mean value on y-axis and temperature on x-axis"
 

"I do a monte-carlo for some points setting a fixed temperature
and getting a mean value from summary table.
I repeat this with many temperature points
and plotting that mean value on y-axis and temperature on x-axis
"
Show me OCEAN-XL Script.

You set temperature as corner condition.
Sweep temperature as parameter instead.
 

You set temperature as corner condition.
Sweep temperature as parameter instead.

Probably I did the same way you suggest. Providing temperature on Corner and then sweeping them creating multiple corners. Heres the image:

mc_sweep_1.PNG
mc_sweep_2.PNG


This is the Ocean Script:

Code:
;====================== Set to XL mode =========================================
ocnSetXLMode()
ocnxlProjectDir( "--" )
ocnxlTargetCellView( "----" )
ocnxlResultsLocation( "" )
ocnxlSimResultsLocation( "" )

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

;---------- Test " " ------------- 
ocnxlBeginTest(" ")
simulator( 'spectre )
design( " ")
path( " " )
modelFile( 
    '("  "")
    '(" " "tt_lib")
    '("  "pre_simu")
)
definitionFile(
    " /model/models.scs"
)
analysis('xf ?start "1m"  ?stop "1G"  ?p "/bgBufP"  
		?n "/bgBufN"  )
analysis('tran ?stop "1m"  ?errpreset "conservative"  )
analysis('dc ?saveOppoint t  )
desVar(	  "chop" 1	)
desVar(	  "AZ" 0	)
desVar(	  "selbuff" 1	)
desVar(	  "selgain2" 1	)
desVar(	  "bgAdjsel" 4	)
desVar(	  "f_chop" "1M/512"	)
desVar(	  "c_load" 500f	)
desVar(	  "iref0" 10u	)
desVar(	  "iref1" 5u	)
desVar(	  "iref2" 5u	)
desVar(	  "iref3" 5u	)
desVar(	  "vd" 5	)
desVar(	  "vs" 0	)
desVar(	  "maxacfreq" 10.1M	)
envOption(
	'analysisOrder  list("dc" "xf" "noise" "pss" "pnoise" "psp" "pxf" "pstb" "pac" "tran" "pz" "dcmatch" "stb" "envlp" "ac" "lf" "sp" "qpss" "qpac" "qpnoise" "qpxf" "qpsp" "hb" "hbac" "hbnoise" "sens" "acmatch") 
)
option(	'temp  "" 
)
option( ?categ 'turboOpts
	'uniMode  "APS" 
)
temp( "" ) 
ocnxlOutputExpr( "(VDC("/vbgP") - VDC("/vbgN"))" ?name "vbg_dc" ?plot t ?save t)
ocnxlOutputExpr( "value(getData("/out" ?result "noise") 1)" ?name "noise_spot_@_1Hz ")
ocnxlOutputExpr( "(VDC("/bgBufP") - VDC("/bgBufN"))" ?name "buf_dc" ?plot t ?save t)
ocnxlOutputExpr( "(sqrt(integ((getData("out" ?result "pnoise")**2) 1 (0.9 * VAR("f_chop")))) / 1.4)" ?name "pnoise_integ_@_f_chop")
ocnxlOutputExpr( "value(getData("/out" ?result "pnoise") 1)" ?name "pnoise_spot_@_1Hz ")
ocnxlOutputExpr( "(-1 * db(getData("/V0" ?result "xf")))" ?name "psrr_curve")
ocnxlOutputExpr( "(sqrt(integ((getData("out" ?result "noise")**2) 1 (0.9 * VAR("f_chop")))) / 1.4)" ?name "noise_integ_@_f_chop")
ocnxlOutputExpr( "average((vtime('tran "/vbgP") - vtime('tran "/vbgN")))" ?name "vbg_tranAvg" ?plot t ?save t)
ocnxlOutputExpr( "value((-1 * db(getData("/V0" ?result "xf"))) 0.01)" ?name "psrr_dc" ?plot t ?save t)
ocnxlOutputExpr( "average((vtime('tran "/bgBufP") - vtime('tran "//bgBufN")))" ?name "buf_tranAvg" ?plot t ?save t)
ocnxlEndTest() ; "playground_tb:study_p2004_noise_tb:1"

;====================== Sweeps setup ===========================================
ocnxlSweepVar("AZ" "1")
ocnxlSweepVar("Chop" "1")
ocnxlSweepVar("selbuff" "1")
ocnxlSweepVar("selgain2" "1")
ocnxlSweepVar("bgAdjsel" "4")
ocnxlSweepVar("f_chop" "1M/512")
ocnxlSweepVar("c_load" "500f")
ocnxlSweepVar("iref0" "10u")
ocnxlSweepVar("iref1" "5u")
ocnxlSweepVar("iref2" "5u")
ocnxlSweepVar("iref3" "5u")
ocnxlSweepVar("vd" "5")
ocnxlSweepVar("vs" "0")
ocnxlSweepVar("maxacfreq" "11M")
ocnxlSweepVar("chop" "1")

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

;====================== Corners setup ==========================================
ocnxlCorner( "tt_pre"
   '(
      ("model" "/home/dagtech/tsmc/tsmc_0.18/BCD/spice_model/T-018-CV-SP-018/rev1.6/T-018-CV-SP-018/models/c018bcd_gen2_v1d6_usage.scs" ?section ""tt_lib"")
      ("model" "/home/dagtech/tsmc/tsmc_0.18/BCD/spice_model/T-018-CV-SP-018/rev1.6/T-018-CV-SP-018/models/c018bcd_gen2_v1d6_usage.scs" ?section ""pre_simu"")
      ("modelGroup" "")
   )
)
ocnxlCorner( "ss_pre"
   '(
      ("model" "/home/dagtech/tsmc/tsmc_0.18/BCD/spice_model/T-018-CV-SP-018/rev1.6/T-018-CV-SP-018/models/c018bcd_gen2_v1d6_usage.scs" ?section ""ss_lib"")
      ("model" "/home/dagtech/tsmc/tsmc_0.18/BCD/spice_model/T-018-CV-SP-018/rev1.6/T-018-CV-SP-018/models/c018bcd_gen2_v1d6_usage.scs" ?section ""pre_simu"")
      ("modelGroup" "")
   )
)
ocnxlCorner( "ff_pre"
   '(
      ("model" "/home/dagtech/tsmc/tsmc_0.18/BCD/spice_model/T-018-CV-SP-018/rev1.6/T-018-CV-SP-018/models/c018bcd_gen2_v1d6_usage.scs" ?section ""ff_lib"")
      ("model" "/home/dagtech/tsmc/tsmc_0.18/BCD/spice_model/T-018-CV-SP-018/rev1.6/T-018-CV-SP-018/models/c018bcd_gen2_v1d6_usage.scs" ?section ""pre_simu"")
      ("modelGroup" "")
   )
)
ocnxlCorner( "fs_pre"
   '(
      ("model" "/home/dagtech/tsmc/tsmc_0.18/BCD/spice_model/T-018-CV-SP-018/rev1.6/T-018-CV-SP-018/models/c018bcd_gen2_v1d6_usage.scs" ?section ""fs_lib"")
      ("model" "/home/dagtech/tsmc/tsmc_0.18/BCD/spice_model/T-018-CV-SP-018/rev1.6/T-018-CV-SP-018/models/c018bcd_gen2_v1d6_usage.scs" ?section ""pre_simu"")
      ("modelGroup" "")
   )
)
ocnxlCorner( "sf_pre"
   '(
      ("model" "/home/dagtech/tsmc/tsmc_0.18/BCD/spice_model/T-018-CV-SP-018/rev1.6/T-018-CV-SP-018/models/c018bcd_gen2_v1d6_usage.scs" ?section ""sf_lib"")
      ("model" "/home/dagtech/tsmc/tsmc_0.18/BCD/spice_model/T-018-CV-SP-018/rev1.6/T-018-CV-SP-018/models/c018bcd_gen2_v1d6_usage.scs" ?section ""pre_simu"")
      ("modelGroup" "")
   )
)
ocnxlCorner( "mc_pre"
   '(
      ("model" "/home/dagtech/tsmc/tsmc_0.18/BCD/spice_model/T-018-CV-SP-018/rev1.6/T-018-CV-SP-018/models/c018bcd_gen2_v1d6_usage.scs" ?section ""mc_lib"")
      ("model" "/home/dagtech/tsmc/tsmc_0.18/BCD/spice_model/T-018-CV-SP-018/rev1.6/T-018-CV-SP-018/models/c018bcd_gen2_v1d6_usage.scs" ?section ""pre_simu"")
      ("modelGroup" "")
   )
)
ocnxlCorner( "mismatch_pre"
   '(
      ("variable" "temperature" "-40:5:190")
      ("model" "/home/dagtech/tsmc/tsmc_0.18/BCD/spice_model/T-018-CV-SP-018/rev1.6/T-018-CV-SP-018/models/c018bcd_gen2_v1d6_usage.scs" ?section ""mismatch_lib"")
      ("model" "/home/dagtech/tsmc/tsmc_0.18/BCD/spice_model/T-018-CV-SP-018/rev1.6/T-018-CV-SP-018/models/c018bcd_gen2_v1d6_usage.scs" ?section ""pre_simu"")
      ("modelGroup" "")
   )
)

;====================== Test v/s corners setup =================================

;====================== Job setup ==============================================
ocnxlJobSetup( '(
	"blockemail" "1"
	"configuretimeout" "300"
	"distributionmethod" "Local"
	"lingertimeout" "300"
	"maxjobs" "1"
	"name" "ADE XL Default"
	"preemptivestart" "1"
	"reconfigureimmediately" "1"
	"runtimeout" "-1"
	"showerrorwhenretrying" "1"
	"showoutputlogerror" "0"
	"startmaxjobsimmed" "1"
	"starttimeout" "300"
	"usesameprocess" "1"
) )

;====================== Disabled items =========================================
ocnxlDisableCorner("tt_pre")
ocnxlDisableCorner("ss_pre")
ocnxlDisableCorner("ff_pre")
ocnxlDisableCorner("fs_pre")
ocnxlDisableCorner("sf_pre")
ocnxlDisableCorner("mc_pre")

;====================== Run Mode Options ======================================
ocnxlMonteCarloOptions( ?mcMethod "mismatch" ?mcNumPoints "10" ?mcNumBins "" ?mcStopEarly "0" ?mcStopMethod "Significance Test" ?samplingMode "random" ?saveProcess "1" ?saveMismatch "1" ?useReference "0" ?donominal "0" ?saveAllPlots "0" ?monteCarloSeed "" ?mcStartingRunNumber "" ?dumpParamMode "yes" )

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

;====================== Run command ============================================
ocnxlRun( ?mode 'monteCarlo ?nominalCornerEnabled nil ?allCornersEnabled t ?allSweepsEnabled t)
ocnxlOutputSummary(?yieldSummary t ?exprSummary nil ?specSummary nil ?detailed nil)
ocnxlOpenResults()

;====================== End XL Mode command ===================================
ocnxlEndXLMode()
 
Last edited:


Monte Carlo simulation does not support variable sweep. This what I get when I try it. I am not familiar or do not know so good about Ocean script writing.

mc_problem.PNG

Sweep temperature as global variable instead.

Does Monte-Carlo sampling support sweep variable?
 
Last edited:

Monte Carlo simulation does not support variable sweep.
No.
It is not a limitation of Monte Carlo simulation.
It is a limitation of ADE-XL.

If you can write OCEAN or OCEAN-XL, you can do anythig.

Or use ADE-Explorer(=Maestro).
 
Last edited:

No.
It is not a limitation of Monte Carlo simulation.
It is a limitation of ADE-XL.

If you can write OCEAN or OCEAN-XL, you can do anythig.

Thanks. I see the OCEAN-XL can be generated from ADE-XL itself, as I showed you here. Is there anyway to run that OCEAN script apart from ADE-XL? (e.g. from terminal or anywhere?)
 

Yes you can.
From CIW or Unix prompt.
I use Unix prompt.

Tried with CIW but not sure what is going on, I do not see any log file or any sign of running. What is the command to run it from Linux terminal?
BTW can you use ADE-Explorer(=Maestro) ?

I think it is not available on my package, I saw your post about ADE-Explorer. I have only ADE-L, ADE-XL, ADE-GXL.
 

mc_problem2.PNG

Even running Ocean-XL from CIW window has the same issue.
 

Even running Ocean-XL from CIW window has the same issue.
You can not understand anything at all.

You have to modify ocean script.

For example, use "for loop" or "foreach loop" to sweep temperature.
Here you have to use different name as result for each run.

Anyway you have to learn basic about skill language.
And you have to learn data structure in Cadence ADE.

OCEAN is no more than skill language.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top