• 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. How to print the Monte Carlo iterations results

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 144
  • Views 14881
  • 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

How to print the Monte Carlo iterations results

Micka
Micka over 16 years ago

Hello,

I am pretty new with writing ocean scripts.

I have a task to run Monte Carlo simulations and print or save results of iterations.

For example, for each input of CMOS_S_BOX I have to find mean value of leackage cuurent,

but I want to have saved these iteration results in a file...Where am I wrong?::

ocnWaveformTool( 'wavescan )
simulator( 'spectre )
design(  "/home/scard/simulation/CMOSSbox_test_new_htype/spectre/schematic/netlist/netlist")
resultsDir( "/home/scard/simulation/CMOSSbox_test_new_htype/spectre/schematic" )
definitionFile(
    "models.scs"
)
analysis('tran ?stop "1u" )
desVar(   "tclk" 1u )
desVar(   "j" 0 )
desVar(   "del" 200n )
option( 'temp  "25.0"
 'iabstol  "1e-14"
 'vabstol  "1e-8"
 'reltol  "1e-6"
)
save( 'i "/V4/PLUS" )
temp( 25.0 )
MCresults = outfile( "/home/scard/results/SBOX_mc_htypefinal/sbox_mc_results.txt" "w")
monteCarlo( ?numIters "10" ?startIter "1" ?analysisVariation 'mismatch ?sweptParam "None" ?sweptParamVals "25" ?saveData t ?nomRun "yes" ?append nil)
monteExpr( "leak" "-average(clip(i(\"/V4/PLUS\" ?result \"tran-tran\") 5e-07 1e-06))" )
monteRun()
Imc_mean = average(-average(clip(i("/V4/PLUS" ?result "tran") 5e-07 1e-06)))
fprintf( MCresults "%3.4f \n" Imc_mean*1e9 );
close(MCresults);
MCresults = outfile( "/home/scard/results/SBOX_mc_htypefinal/sbox_mc_results.txt" "a")
)
close(MCresults)

In this bolded area I am obviously doing mistakes, because in the mcdata file I get same results for all 10 iterations, but running an usual MC simulation I am getting different values...HELP,  PLEASE!!!

Thank you...

  • Cancel
Parents
  • AMRUT
    AMRUT over 15 years ago

    Even I am facing the similar problem. I want to save the iteration values i.e. using iterVsValue command , in monte carlo simulation.

    I need to save it in a file, how can I do that?  

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • AMRUT
    AMRUT over 15 years ago

    Even I am facing the similar problem. I want to save the iteration values i.e. using iterVsValue command , in monte carlo simulation.

    I need to save it in a file, how can I do that?  

     

    • 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