• 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 SKILL
  3. Trimming during MC runs and getting results

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 15453
  • 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

Trimming during MC runs and getting results

Mavrik
Mavrik over 9 years ago

Hello Everyone,

I am new to Ocean script and i need some help in this regard.

I have the following problem.

  1. I have a Bandgap circuit in which i need to first run a MC simulation , with in that MC run 
    1. i need to first calculate the DC op point. (untrimmed Bandgap)
    2. Than i need to trim the band gap at room temp
    3. get the result out of trim code and apply it to the design variable.

Run MC over temperature again to get the Bandgap temperature variation

So my question is how to do it. i know i need a for loop but how do i get the results out and how it the flow or sequence of flow should be.

Any help would be great

regards

  • Cancel
  • Mavrik
    Mavrik over 9 years ago

    Also here is the script i am using  ocnWaveformTool( 'wavescan )

    simulator( 'spectre )

    design( "/localdisk/simulation/tb_bandgap_MC/spectre/schematic/netlist/netlist")

    resultsDir( "/localdisk/simulation/hessen/tb_bandgap_MC/spectre/schematic" )

    modelFile(

       '("active_thin.scs" "mc")

       '("active_thick.scs" "mc")

       '("active_hv.scs" "tt")

       '("diodes.scs" "typ")

       '("bipolars.scs" "typ")

       '("resistors.scs" "mc")

       '("capacitors.scs" "nom")

       '("wrapper.scs" "sigma3")

    )

    analysis('dc ?saveOppoint t  ?param "bgtrim"  ?start "-16"  

    ?stop "15"  ?step "1"  )

    desVar(  "bgtrim" 0 )

    desVar(  "ibias" 500n )

    desVar(  "avdd" 5.3 )

    option( 'temp  "25.0"

    )

    saveOption( 'save "all" )

    temp( 25.0 )

    for(N 1 2

    monteCarlo( ?numIters "1" ?startIter N

       ?analysisVariation 'processAndMismatch  ?sweptParam "None"

       ?sweptParamVals "27" ?saveData t

       ?nomRun nil ?append nil

       ?saveProcessParams t

    )

    monteExpr( "trimbg" "round(cross(VS(\"/vbg\") 1.2 1 \"either\" nil nil))" )

    monteRun()

    ;monteResults()

    monteSelectResults()

    ;vtrim=trimbg_25

    iterVsValue( "trimbg_25" )

    ;plot(getData("trimbg_25") )

    ;printf( "%d" "trimbg_25" ))

    ;ocnPrint( getData( "trimbg_25" ) )

    desVar("bgtrim" "trimbg_25")        here i am trying to assign the value but it seems it does not work

    ;delete('monteExpr)

    )

    monteResults()

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    You didn't mention which version of the tools you're using. The way Monte Carlo works is considerably different in IC61X compared with IC5141, so I might have suggested using some functions that I wrote in this solution. However, it might be simpler to just use ?saveData t in the monteCarlo call (which you are) and then after the monteRun you can do:

    vbg=value(round(cross(VS("/vbg") 1.2 1 "either" nil nil)) 'iteration N)  ; I think the sweep variable is called iteration

    You could try plotting the expression without the value() bit around it to see what the sweep variables are called. It's possible there are other sweep variables you'd need to do the value() over. I'm afraid I don't have time to try experiments in a variety of versions to cater for the various possibilities here.

    Then use:

    desVar("bgtrim" vbg)

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

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