+ Post New Thread
Results 1 to 14 of 14
  1. #1
    Full Member level 1
    Points: 1,096, Level: 7
    ashrafsazid's Avatar
    Join Date
    Sep 2016
    Location
    Germany
    Posts
    104
    Helped
    1 / 1
    Points
    1,096
    Level
    7

    Cadence ADEXL Monte-Carlo Data Processing

    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.

    Click image for larger version. 

Name:	mc.png 
Views:	11 
Size:	57.7 KB 
ID:	148170

    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".

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

    Thanks

  2. #2
    Advanced Member level 5
    Points: 17,409, Level: 31
    pancho_hideboo's Avatar
    Join Date
    Oct 2006
    Location
    Real Homeless
    Posts
    2,681
    Helped
    724 / 724
    Points
    17,409
    Level
    31

    Re: Cadence ADEXL Monte-Carlo Data Processing

    Quote Originally Posted by ashrafsazid View Post
    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".
    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

    BTW, answer your previous thread https://www.edaboard.com/showthread.php?378885#2



    •   AltAdvertisement

        
       

  3. #3
    Full Member level 1
    Points: 1,096, Level: 7
    ashrafsazid's Avatar
    Join Date
    Sep 2016
    Location
    Germany
    Posts
    104
    Helped
    1 / 1
    Points
    1,096
    Level
    7

    Re: Cadence ADEXL Monte-Carlo Data Processing

    Quote Originally Posted by pancho_hideboo View Post
    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"



  4. #4
    Advanced Member level 5
    Points: 17,409, Level: 31
    pancho_hideboo's Avatar
    Join Date
    Oct 2006
    Location
    Real Homeless
    Posts
    2,681
    Helped
    724 / 724
    Points
    17,409
    Level
    31

    Re: Cadence ADEXL Monte-Carlo Data Processing

    Quote Originally Posted by ashrafsazid View Post
    "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.



  5. #5
    Full Member level 1
    Points: 1,096, Level: 7
    ashrafsazid's Avatar
    Join Date
    Sep 2016
    Location
    Germany
    Posts
    104
    Helped
    1 / 1
    Points
    1,096
    Level
    7

    Re: Cadence ADEXL Monte-Carlo Data Processing

    Quote Originally Posted by pancho_hideboo View Post
    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:

    Click image for larger version. 

Name:	mc_sweep_1.PNG 
Views:	6 
Size:	9.1 KB 
ID:	148172
    Click image for larger version. 

Name:	mc_sweep_2.PNG 
Views:	4 
Size:	40.0 KB 
ID:	148173


    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 by ashrafsazid; 27th July 2018 at 12:30.



  6. #6
    Advanced Member level 5
    Points: 17,409, Level: 31
    pancho_hideboo's Avatar
    Join Date
    Oct 2006
    Location
    Real Homeless
    Posts
    2,681
    Helped
    724 / 724
    Points
    17,409
    Level
    31

    Re: Cadence ADEXL Monte-Carlo Data Processing

    Quote Originally Posted by ashrafsazid View Post
    Probably I did the same way you suggest.
    No.
    You can not understand at all.

    Quote Originally Posted by ashrafsazid View Post
    Providing temperature on Corner and then sweeping them creating multiple corners.
    Don't do.
    Sweep temperature as global variable instead.

    Treat temperature by "ocnxlSweepVar()".



    •   AltAdvertisement

        
       

  7. #7
    Full Member level 1
    Points: 1,096, Level: 7
    ashrafsazid's Avatar
    Join Date
    Sep 2016
    Location
    Germany
    Posts
    104
    Helped
    1 / 1
    Points
    1,096
    Level
    7

    Re: Cadence ADEXL Monte-Carlo Data Processing

    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.

    Click image for larger version. 

Name:	mc_problem.PNG 
Views:	3 
Size:	91.0 KB 
ID:	148177

    Sweep temperature as global variable instead.
    Does Monte-Carlo sampling support sweep variable?
    Last edited by ashrafsazid; 27th July 2018 at 13:11.



  8. #8
    Advanced Member level 5
    Points: 17,409, Level: 31
    pancho_hideboo's Avatar
    Join Date
    Oct 2006
    Location
    Real Homeless
    Posts
    2,681
    Helped
    724 / 724
    Points
    17,409
    Level
    31

    Re: Cadence ADEXL Monte-Carlo Data Processing

    Quote Originally Posted by ashrafsazid View Post
    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 by pancho_hideboo; 27th July 2018 at 13:20.



  9. #9
    Full Member level 1
    Points: 1,096, Level: 7
    ashrafsazid's Avatar
    Join Date
    Sep 2016
    Location
    Germany
    Posts
    104
    Helped
    1 / 1
    Points
    1,096
    Level
    7

    Re: Cadence ADEXL Monte-Carlo Data Processing

    Quote Originally Posted by pancho_hideboo View Post
    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?)



  10. #10
    Advanced Member level 5
    Points: 17,409, Level: 31
    pancho_hideboo's Avatar
    Join Date
    Oct 2006
    Location
    Real Homeless
    Posts
    2,681
    Helped
    724 / 724
    Points
    17,409
    Level
    31

    Re: Cadence ADEXL Monte-Carlo Data Processing

    Quote Originally Posted by ashrafsazid View Post
    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.

    BTW can you use ADE-Explorer(=Maestro) ?



  11. #11
    Full Member level 1
    Points: 1,096, Level: 7
    ashrafsazid's Avatar
    Join Date
    Sep 2016
    Location
    Germany
    Posts
    104
    Helped
    1 / 1
    Points
    1,096
    Level
    7

    Re: Cadence ADEXL Monte-Carlo Data Processing

    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.



    •   AltAdvertisement

        
       

  12. #12
    Advanced Member level 5
    Points: 17,409, Level: 31
    pancho_hideboo's Avatar
    Join Date
    Oct 2006
    Location
    Real Homeless
    Posts
    2,681
    Helped
    724 / 724
    Points
    17,409
    Level
    31

    Re: Cadence ADEXL Monte-Carlo Data Processing

    Quote Originally Posted by ashrafsazid View Post
    What is the command to run it from Linux terminal?
    ocean.
    See ocean documents.



  13. #13
    Full Member level 1
    Points: 1,096, Level: 7
    ashrafsazid's Avatar
    Join Date
    Sep 2016
    Location
    Germany
    Posts
    104
    Helped
    1 / 1
    Points
    1,096
    Level
    7

    Re: Cadence ADEXL Monte-Carlo Data Processing

    Click image for larger version. 

Name:	mc_problem2.PNG 
Views:	4 
Size:	20.2 KB 
ID:	148179

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



  14. #14
    Advanced Member level 5
    Points: 17,409, Level: 31
    pancho_hideboo's Avatar
    Join Date
    Oct 2006
    Location
    Real Homeless
    Posts
    2,681
    Helped
    724 / 724
    Points
    17,409
    Level
    31

    Re: Cadence ADEXL Monte-Carlo Data Processing

    Quote Originally Posted by ashrafsazid View Post
    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.



--[[ ]]--