• 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. Processing raw Spectre Monte Carlo data ?

Stats

  • Locked Locked
  • Replies 23
  • Subscribers 127
  • Views 29242
  • 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

Processing raw Spectre Monte Carlo data ?

MarkGr15
MarkGr15 over 10 years ago

I am using OceanXL (within ADEXL created scripts) to kick off Monte Carlo simulations. I would like to be able to post process the data myself, to be able to calculate the mean, sigmas etc... 

Is the raw data available for this, and how is it organized? I am having a hard time deciphering the file structure etc....

I do see the results listed in an output log, when I add " -log ocean_montecarlo_output.log" as a an option to the command line that I use to kick off my scripts.

The upshot is I want to be able to find the raw data in the output directory, and post process the measured data.

I am using IC6.1.6-64b.500.9.  

spectre -W  => sub-version  13.1.1.049

thanks

Mark

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    Martin,

     I couldn't find it, but it looks as if it was probably the ADE XL Rapid Adoption Kit that's on Cadence Online Support. So I created the example again from scratch (just making sure the tests were called AC and TRAN, which I think the RAK suggests you do), dumping the OCEAN script, and then adding the additional lines in:

    ;====================== Set to XL mode =========================================
    ocnSetXLMode()
    ocnxlProjectDir( "./simulation" )
    ocnxlTargetCellView( "opamp090" "full_diff_opamp" "adexl" )
    ocnxlResultsLocation( "" )
    ocnxlSimResultsLocation( "" )
    
    ;====================== Tests setup ============================================
    
    ;---------- Test "AC" ------------- 
    ocnxlBeginTest("AC")
    simulator( 'spectre )
    design( "opamp090" "full_diff_opamp_AC" "schematic")
    path( "./models/spectre" )
    modelFile( 
        '("gpdk090.scs" "NN")
    )
    analysis('ac ?start "1"  ?stop "10G"  )
    analysis('dc ?saveOppoint t  )
    desVar(	  "gain" 10	)
    desVar(	  "vcm" 1	)
    desVar(	  "vdd" 2	)
    envOption(
    	'firstRun  t 
    	'analysisOrder  list("pz" "dcmatch" "stb" "tran" "envlp" "ac" "dc" "noise" "xf" "sp" "acmatch" "pss" "pac" "pstb" "pnoise" "pxf" "psp" "qpss" "qpac" "qpnoise" "qpxf" "qpsp" "hb" "hbac" "hbnoise" "hbsp" "sens" "lf") 
    )
    saveOption( ?infoOptions list(list("modelParameter" "models" "rawfile" "" "" "" t) list("element" "inst" "rawfile" "" "" "" t) list("outputParameter" "output" "rawfile" "" "" "" t) list("designParamVals" "parameters" "rawfile" "" "" "" t) list("primitives" "primitives" "rawfile" "" "" "" t) list("subckts" "subckts" "rawfile" "" "" "" t) list("asserts" "assert" "rawfile" "" "" "" nil) list("extremeinfo" "all" "logfile" "" "yes" "" nil) list("<Click_To_Add>" "none" "rawfile" "" "" "" nil) ) )
    save( 'i "/V0/PLUS" )
    temp( 27 ) 
    ocnxlOutputTerminal( "/V0/PLUS" ?save t)
    ocnxlOutputExpr( "dB20(value(VF(\"/outdiff\") 1))" ?name "DCGain" ?plot t)
    ocnxlOutputExpr( "abs(IDC(\"/V0/PLUS\"))" ?name "Current" ?plot t)
    ocnxlOutputExpr( "abs((VDC(\"/inp\") - VDC(\"/inn\")))" ?name "InputRandomOffset" ?plot t)
    ocnxlEndTest() ; "AC"
    
    ;---------- Test "TRAN" ------------- 
    ocnxlBeginTest("TRAN")
    simulator( 'spectre )
    design( "opamp090" "full_diff_opamp_TRAN" "schematic")
    path( "./models/spectre" )
    modelFile( 
        '("gpdk090.scs" "NN")
    )
    analysis('tran ?stop "100n"  ?annotate "no"  ?save "selected"  
    		?oppoint "no"  )
    desVar(	  "gain" 10	)
    desVar(	  "vcm" 1	)
    desVar(	  "vdd" 2	)
    envOption(
    	'analysisOrder  list("pz" "dcmatch" "stb" "tran" "envlp" "ac" "dc" "noise" "xf" "sp" "acmatch" "pss" "pac" "pstb" "pnoise" "pxf" "psp" "qpss" "qpac" "qpnoise" "qpxf" "qpsp" "hb" "hbac" "hbnoise" "hbsp" "sens" "lf") 
    )
    option(	'dochecklimit  "no" 
    )
    saveOption( ?outputParamInfo nil )
    saveOption( ?elementInfo nil )
    saveOption( ?modelParamInfo nil )
    saveOption( 'currents "selected" )
    saveOption( 'pwr "all" )
    saveOption( 'save "selected" )
    save( 'v "/outdiff" "/OUTN" "/OUTP" )
    temp( 27 ) 
    ocnxlOutputSignal( "/outdiff" ?save t)
    ocnxlOutputSignal( "/OUTN" ?save t)
    ocnxlOutputSignal( "/OUTP" ?save t)
    ocnxlOutputExpr( "slewRate(VT(\"/outdiff\") 0 t ymax(VT(\"/outdiff\")) t 10 90 nil \"time\")" ?name "SlewRate" ?plot t)
    ocnxlOutputExpr( "(settlingTime(VT(\"/outdiff\") 0 t 1e-07 t 1) - 5e-08)" ?name "SettlingTime" ?plot t)
    ocnxlEndTest() ; "TRAN"
    
    ;====================== Sweeps setup ===========================================
    ocnxlSweepVar("gain" "10")
    ocnxlSweepVar("vcm" "1")
    ocnxlSweepVar("vdd" "2")
    
    ;====================== Model Group setup ==========================================
    
    ;====================== Corners setup ==========================================
    ocnxlCorner( "monte"
       '(
          ("model" "gpdk090.scs" ?section "\"MC_models\"")
          ("modelGroup" "")
       )
    )
    
    ;====================== Test v/s corners setup =================================
    
    ;====================== Job setup ==============================================
    ocnxlJobSetup( '(
    	"blockemail" "1"
    	"configuretimeout" "300"
    	"distributionmethod" "Local"
    	"lingertimeout" "300"
    	"maxjobs" "2"
    	"name" "ADE XL Default"
    	"preemptivestart" "1"
    	"reconfigureimmediately" "1"
    	"runtimeout" "-1"
    	"showerrorwhenretrying" "1"
    	"showoutputlogerror" "0"
    	"startmaxjobsimmed" "1"
    	"starttimeout" "300"
    	"usesameprocess" "1"
    ) )
    
    ;====================== Disabled items =========================================
    
    ;====================== Run Mode Options ======================================
    ocnxlMonteCarloOptions( ?mcMethod "all" ?mcNumPoints "50" ?mcNumBins "" ?mcStopEarly "0" ?mcStopMethod "Significance Test" ?samplingMode "random" ?saveProcess "1" ?saveMismatch "0" ?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()
    
    ;------------------------------------------------------------------------
    ; Example of using RDB API to retrieve results
    ;------------------------------------------------------------------------
    rdb=axlReadHistoryResDB(ocnxlGetCurrentHistory() ?session ocnxlGetSession())
    foreach(point rdb->points()
      printf("Point %d\n" point->id)
      foreach(corner point->corners()
        printf(" Corner %L\n" corner->name)
        foreach(test corner->tests()
          printf("  Test %L\n" test->name)
          foreach(output test->outputs()
            when(output->type=='expr
              ; take your pick
              ;printf("    Output %s = %s\n" output->name output->valueAsString())
              printf("    Output %s = %L\n" output->name output->value)
            )
          )
        )
      )
    )
    
    ; If you know the output name, the test name, the corner name, and the 
    ; point id, you can also do:
    
    ;            OUTPUT     TEST  CORNER  POINT
    ;rdb->output("SlewRate" "TRAN" "monte" 5)->value
    
    ;so:
    numPoints=length(rdb->points())
    for(i 1 numPoints
      printf("%d: %L\n" i rdb->output("SlewRate" "TRAN" "monte" i)->value)
    )
    
    ;====================== End XL Mode command ===================================
    ocnxlEndXLMode()
    

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    Martin,

     I couldn't find it, but it looks as if it was probably the ADE XL Rapid Adoption Kit that's on Cadence Online Support. So I created the example again from scratch (just making sure the tests were called AC and TRAN, which I think the RAK suggests you do), dumping the OCEAN script, and then adding the additional lines in:

    ;====================== Set to XL mode =========================================
    ocnSetXLMode()
    ocnxlProjectDir( "./simulation" )
    ocnxlTargetCellView( "opamp090" "full_diff_opamp" "adexl" )
    ocnxlResultsLocation( "" )
    ocnxlSimResultsLocation( "" )
    
    ;====================== Tests setup ============================================
    
    ;---------- Test "AC" ------------- 
    ocnxlBeginTest("AC")
    simulator( 'spectre )
    design( "opamp090" "full_diff_opamp_AC" "schematic")
    path( "./models/spectre" )
    modelFile( 
        '("gpdk090.scs" "NN")
    )
    analysis('ac ?start "1"  ?stop "10G"  )
    analysis('dc ?saveOppoint t  )
    desVar(	  "gain" 10	)
    desVar(	  "vcm" 1	)
    desVar(	  "vdd" 2	)
    envOption(
    	'firstRun  t 
    	'analysisOrder  list("pz" "dcmatch" "stb" "tran" "envlp" "ac" "dc" "noise" "xf" "sp" "acmatch" "pss" "pac" "pstb" "pnoise" "pxf" "psp" "qpss" "qpac" "qpnoise" "qpxf" "qpsp" "hb" "hbac" "hbnoise" "hbsp" "sens" "lf") 
    )
    saveOption( ?infoOptions list(list("modelParameter" "models" "rawfile" "" "" "" t) list("element" "inst" "rawfile" "" "" "" t) list("outputParameter" "output" "rawfile" "" "" "" t) list("designParamVals" "parameters" "rawfile" "" "" "" t) list("primitives" "primitives" "rawfile" "" "" "" t) list("subckts" "subckts" "rawfile" "" "" "" t) list("asserts" "assert" "rawfile" "" "" "" nil) list("extremeinfo" "all" "logfile" "" "yes" "" nil) list("<Click_To_Add>" "none" "rawfile" "" "" "" nil) ) )
    save( 'i "/V0/PLUS" )
    temp( 27 ) 
    ocnxlOutputTerminal( "/V0/PLUS" ?save t)
    ocnxlOutputExpr( "dB20(value(VF(\"/outdiff\") 1))" ?name "DCGain" ?plot t)
    ocnxlOutputExpr( "abs(IDC(\"/V0/PLUS\"))" ?name "Current" ?plot t)
    ocnxlOutputExpr( "abs((VDC(\"/inp\") - VDC(\"/inn\")))" ?name "InputRandomOffset" ?plot t)
    ocnxlEndTest() ; "AC"
    
    ;---------- Test "TRAN" ------------- 
    ocnxlBeginTest("TRAN")
    simulator( 'spectre )
    design( "opamp090" "full_diff_opamp_TRAN" "schematic")
    path( "./models/spectre" )
    modelFile( 
        '("gpdk090.scs" "NN")
    )
    analysis('tran ?stop "100n"  ?annotate "no"  ?save "selected"  
    		?oppoint "no"  )
    desVar(	  "gain" 10	)
    desVar(	  "vcm" 1	)
    desVar(	  "vdd" 2	)
    envOption(
    	'analysisOrder  list("pz" "dcmatch" "stb" "tran" "envlp" "ac" "dc" "noise" "xf" "sp" "acmatch" "pss" "pac" "pstb" "pnoise" "pxf" "psp" "qpss" "qpac" "qpnoise" "qpxf" "qpsp" "hb" "hbac" "hbnoise" "hbsp" "sens" "lf") 
    )
    option(	'dochecklimit  "no" 
    )
    saveOption( ?outputParamInfo nil )
    saveOption( ?elementInfo nil )
    saveOption( ?modelParamInfo nil )
    saveOption( 'currents "selected" )
    saveOption( 'pwr "all" )
    saveOption( 'save "selected" )
    save( 'v "/outdiff" "/OUTN" "/OUTP" )
    temp( 27 ) 
    ocnxlOutputSignal( "/outdiff" ?save t)
    ocnxlOutputSignal( "/OUTN" ?save t)
    ocnxlOutputSignal( "/OUTP" ?save t)
    ocnxlOutputExpr( "slewRate(VT(\"/outdiff\") 0 t ymax(VT(\"/outdiff\")) t 10 90 nil \"time\")" ?name "SlewRate" ?plot t)
    ocnxlOutputExpr( "(settlingTime(VT(\"/outdiff\") 0 t 1e-07 t 1) - 5e-08)" ?name "SettlingTime" ?plot t)
    ocnxlEndTest() ; "TRAN"
    
    ;====================== Sweeps setup ===========================================
    ocnxlSweepVar("gain" "10")
    ocnxlSweepVar("vcm" "1")
    ocnxlSweepVar("vdd" "2")
    
    ;====================== Model Group setup ==========================================
    
    ;====================== Corners setup ==========================================
    ocnxlCorner( "monte"
       '(
          ("model" "gpdk090.scs" ?section "\"MC_models\"")
          ("modelGroup" "")
       )
    )
    
    ;====================== Test v/s corners setup =================================
    
    ;====================== Job setup ==============================================
    ocnxlJobSetup( '(
    	"blockemail" "1"
    	"configuretimeout" "300"
    	"distributionmethod" "Local"
    	"lingertimeout" "300"
    	"maxjobs" "2"
    	"name" "ADE XL Default"
    	"preemptivestart" "1"
    	"reconfigureimmediately" "1"
    	"runtimeout" "-1"
    	"showerrorwhenretrying" "1"
    	"showoutputlogerror" "0"
    	"startmaxjobsimmed" "1"
    	"starttimeout" "300"
    	"usesameprocess" "1"
    ) )
    
    ;====================== Disabled items =========================================
    
    ;====================== Run Mode Options ======================================
    ocnxlMonteCarloOptions( ?mcMethod "all" ?mcNumPoints "50" ?mcNumBins "" ?mcStopEarly "0" ?mcStopMethod "Significance Test" ?samplingMode "random" ?saveProcess "1" ?saveMismatch "0" ?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()
    
    ;------------------------------------------------------------------------
    ; Example of using RDB API to retrieve results
    ;------------------------------------------------------------------------
    rdb=axlReadHistoryResDB(ocnxlGetCurrentHistory() ?session ocnxlGetSession())
    foreach(point rdb->points()
      printf("Point %d\n" point->id)
      foreach(corner point->corners()
        printf(" Corner %L\n" corner->name)
        foreach(test corner->tests()
          printf("  Test %L\n" test->name)
          foreach(output test->outputs()
            when(output->type=='expr
              ; take your pick
              ;printf("    Output %s = %s\n" output->name output->valueAsString())
              printf("    Output %s = %L\n" output->name output->value)
            )
          )
        )
      )
    )
    
    ; If you know the output name, the test name, the corner name, and the 
    ; point id, you can also do:
    
    ;            OUTPUT     TEST  CORNER  POINT
    ;rdb->output("SlewRate" "TRAN" "monte" 5)->value
    
    ;so:
    numPoints=length(rdb->points())
    for(i 1 numPoints
      printf("%d: %L\n" i rdb->output("SlewRate" "TRAN" "monte" i)->value)
    )
    
    ;====================== End XL Mode command ===================================
    ocnxlEndXLMode()
    

    • 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