• 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. oceanXL/Monte Carlo error: "return can only be used within...

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 126
  • Views 2871
  • 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

oceanXL/Monte Carlo error: "return can only be used within a prog"

RFdog
RFdog over 11 years ago

Greetings,

I'm a reasonably proficcient skill/ocean user, but have not worked with oceanXL before.  I'm trying to create a monte-carlo script with oceanXL which will run a certain monte-seed, update some parameters, then re-run the same seed.  Should be easy.... as a first step, I exported an ocean script (FILE--> Save Script) from a working ADEXL Monte-Carlo simulation.  The script looks complete and has no obvious errors.  The last line in the script is:

 ocnxlRun( ?mode 'monteCarlo ?nominalCornerEnabled t ?allCornersEnabled t ?allSweepsEnabled t)

This always errors-out with:

 *Error* return: return can only be used within a prog

version 6.1.5-64b.500.17 (using GXL license for XL)

 thoughts?

 

 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    The best thing is to contact customer support over this. I've not seen this before. You might get a bit more info by doing:

    sstatus(errsetTrace t)
    _stacktrace=50

    before loading the script. But even then, it will probably need support input.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RFdog
    RFdog over 11 years ago

    I've opened a support ticket. Also some more info: I created a simple circuit with an ideal voltage source, gnd, and resistor. Another non-ideal resistor forms a voltage divider such that the midpoint varies with monte-carlo analysis. Same symptom: I can run just fine through the GUI, but not with ocnxl. Auto-generated script is included below for 10x monte runs (model file path removed for IP reasons) 

    (EDIT: unix2dos fix) 

    ;---------- Test "drm_test:junk3:1" -------------

    ocnxlBeginTest("drm_test:junk3:1")
    simulator( 'spectre )
    design( "drm_test" "junk3" "schematic")
    modelFile( '("" "mc_lib") )
    analysis('dc ?saveOppoint t ?param "temp" ?start "-40" ?stop "125" ?lin "10" )
    saveOption( 'currents "selected" )
    saveOption( 'save "selected" )
    save( 'v "/vmid" )
    temp( -40.0 )
    ocnxlOutputSignal( "/vmid" ?save t)
    ocnxlEndTest() ; "drm_test:junk3:1"

    ;====================== Sweeps setup ===========================================

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

     ;====================== 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" ) )

    ;====================== Disabled items =========================================

    ;====================== Run Mode Options ====================================== ocnxlSweepsAndCornersOptions( ?submitpointsenabled "0" )
    ocnxlMonteCarloOptions( ?mcMethod "all" ?mcNumPoints "10" ?mcNumBins "" ?mcStopEarly "0" ?mcYieldTarget "99.73" ?mcYieldAlphaLimit "0.05" ?samplingMode "random" ?saveProcess "1" ?saveMismatch "0" ?useReference "0" ?donominal "1" ?saveAllPlots "1" ?monteCarloSeed "1" ?mcStartingRunNumber "" )
     ;====================== Starting Point Info ======================================  


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

    ;====================== End XL Mode command ===================================
    ocnxlEndXLMode()

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Tawna
    Tawna over 11 years ago

    If you've opened a Case with Customer Support, please work with the AE assigned to you.

    (It's not a good use of resources to have multiple people working in parallel on the same issue...particularly when they don't know and cannot collaborate.)

    Thanks!

     

    best regards,

    Tawna

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RFdog
    RFdog over 11 years ago

    So here's the solution:

    The problem is related to a (now) known bug where ADEXL doesn't clear completely even when you "close data".  This was hitting me since I was running the script from the CIW window in the same cadence session as I had previously saved the script from.

    If I modify the script to open the cellview in read mode and *also* run the script only from a clean / new cadence session then the error goes away.  

    To open in read-mode:

    Existing => ocnxlTargetCellView( "myoalib" "ampTest" "adexl" )
    Modify To => ocnxlTargetCellView( "myoalib" "ampTest" "adexl" ?mode "r") 
     
    //dan. 
    • 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