Home > Community > Forums > Custom IC Design > How to plot an histogram using ocean script? (monte carlo problem)

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 How to plot an histogram using ocean script? (monte carlo problem) 

Last post Sun, Mar 24 2013 4:46 AM by Andrew Beckett. 1 replies.
Started by Ricardo Alves 27 Feb 2013 08:14 AM. Topic has 1 replies and 4545 views
Page 1 of 1 (2 items)
Sort Posts:
  • Wed, Feb 27 2013 8:14 AM

    How to plot an histogram using ocean script? (monte carlo problem) Reply
    Hi all,

    I am new using Ocean script and i am having a problem.

    I want to do an histogram with the average value of a comparator output (voltage).

    However I couldn´t get it yet.

    The code i am trying to implement is the following:

    ocnWaveformTool( 'wavescan )
    simulator( 'spectre )
    design(     "/home/user22/simulation/comparator/spectre/schematic/netlist/netlist")
    resultsDir( "/home/user22/simulation/comparator/spectre/schematic" )
    modelFile(
        '("/opt/ic_tools/pdk/umc130_b06_pb/umc13mmrf/../Models/Spectre/l130e-rf-v171-control.scs" "")
        '("/opt/ic_tools/pdk/umc130_b06_pb/umc13mmrf/../Models/Spectre/L130E_MM_TRIPLEWELL_MAIN_V151.lib.scs" "")
        '("/opt/ic_tools/pdk/umc130_b06_pb/umc13mmrf/../Models/Spectre/l_cr20k_rfvil_V021.lib.scs" "typ")
        '("/opt/ic_tools/pdk/umc130_b06_pb/umc13mmrf/../Models/Spectre/l_nwcr20k_rfvil_V021.lib.scs" "typ")
        '("/opt/ic_tools/pdk/umc130_b06_pb/umc13mmrf/../Models/Spectre/l_sy20k_rfvil_V021.lib.scs" "typ")
        '("/opt/ic_tools/pdk/umc130_b06_pb/umc13mmrf/../Models/Spectre/l_nwsy20k_rfvil_V021.lib.scs" "typ")
        '("/home/user22/CADENCE/UMC130_B06_PB/Monte_Carlo_libs/L130E_statistical_m.scs" "")
        '("/opt/ic_tools/pdk/umc130_b06_pb/umc13mmrf/../Models/Spectre/l_sy20kct_rfvil_V021.lib.scs" "typ")
        '("/opt/ic_tools/pdk/umc130_b06_pb/umc13mmrf/../Models/Spectre/l_nwsy20kct_rfvil_V021.lib.scs" "typ")
        '("/opt/ic_tools/pdk/umc130_b06_pb/umc13mmrf/../Models/Spectre/l_sqsk_rfvil_V021.lib.scs" "typ")
        '("/opt/ic_tools/pdk/umc130_b06_pb/umc13mmrf/../Models/Spectre/l_nwsqsk_rfvil_V021.lib.scs" "typ")
        '("/home/user22/CADENCE/UMC130_B06_PB/Monte_Carlo_libs/L130E_HS12_V231_ma.lib.scs" "tt")
    )
    analysis('tran ?stop "170u"  )
    save( 'v "/out" )
    temp( 27 )
    monteCarlo( ?numIters "2" ?startIter "1"
        ?analysisVariation 'mismatch ?sweptParam "None"
        ?sweptParamVals "27" ?saveData t
        ?nomRun "yes" ?append nil
        ?saveProcessParams t
    )

    monteRun()
    selectResult('tran)
    monteSelectResults()
    specLimits ("bw_27" ?upper 15E+06 ?lower 5E+06)
    monteExpr( "bw_27" 'average(clip(v("/out" ?result 'tran) 0 85u)))

    histogram( "bw_27" ?type 'standard ?numBins '2 ?density 't)

    The error is shown bellow:
    simulation completed successfully.
     reading simulation data...
           ...successful.
     Monte Carlo Simulation completed successfully...
     ======================================================================
     Statistical Analysis Parameters and Spec Limits:
     
             Parameter        Lower        Upper
     ======================================================================
         noExprs_27       -1e+36       1e+36      
     *Error* eval: not a function - "bw_27"

     *Error* load: error while loading file - "monteCarlo.ocn"

      Can anyone help me please?

    Regards

    Ricardo Alves

     
    • Post Points: 20
  • Sun, Mar 24 2013 4:46 AM

    Re: How to plot an histogram using ocean script? (monte carlo problem) Reply

    You need to define the monteExpr before the monteRun. The expressions are evaluated as the simulation runs, and so you can't add them afterwards.

    Regards,

    Andrew

    • Post Points: 5
Page 1 of 1 (2 items)
Sort Posts:
Started by Ricardo Alves at 27 Feb 2013 08:14 AM. Topic has 1 replies.