• 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. Changing Monte Carlo Seed automatically

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 125
  • Views 15107
  • 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

Changing Monte Carlo Seed automatically

MonaG
MonaG over 4 years ago

Hi,

I wanted to know if there is a way to automatically set seed for Monte Carlo simulation to a random number in each run like cpu time, date, ... ? My version of Cadence is IC6.1.8.

Thanks,

  • Cancel
  • ShawnLogan
    ShawnLogan over 4 years ago

    Dear Mona,

    MonaG said:
    if there is a way to automatically set seed for Monte Carlo simulation to a random number in each run like cpu time, date, ... ? M

    I am confused by your question. Each sub-run within a Monte-Carlo run uses a random variable independent of the prior run when choosing the "Sampling" algorithm. The seed does not impact other sub-runs other than the first. Is this what you wanted? It will not convergence as quickly as other Monte-Carlo algorithms (including the default method).

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • MonaG
    MonaG over 4 years ago in reply to ShawnLogan

    Thank you for your reply. From what I learned, the seed if it is not set it would be the default value 12345. When I set the seed to be default in each run I get the exact same result. But when I change the seed I get different results. Now I want the seed to change in each run automatically. I hope I cleared the question.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 4 years ago in reply to MonaG

    Dear Mona,

    MonaG said:
    When I set the seed to be default in each run I get the exact same result. But when I change the seed I get different results. Now I want the seed to change in each run automatically

    I think something may not be correct in your setup. If you run a series of N Monte-Carlo simulations using the default seed value, and you have either mismatch or process set to vary (or both), each of the N runs will use different amounts of variation and will not produce the same result. There is no need to randomly assign a new seed for the remaining N-1 runs in the simulation set.

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • MonaG
    MonaG over 4 years ago in reply to ShawnLogan

    I guess I have explained the issue in a wrong way. I run a Monte Carlo simulation with 100 samples, and yes the simulation results are different for each 100 samples. But when I again run Monte Carlo for another 100 samples, without changing the seed, I get exactly the same results for each sample as I did before. I mean Sample 1 of the first run is equal to sample 1 of the second run. and so on. But I want to get different results for all 100 samples when I run a new Monte Carlo, which I guess it is possible by changing the seed.  

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 4 years ago in reply to MonaG

    Dear Mona,

    MonaG said:
    I run a Monte Carlo simulation with 100 samples, and yes the simulation results are different for each 100 samples. But when I again run Monte Carlo for another 100 samples, without changing the seed, I get exactly the same results for each sample as I did before. I mean Sample 1 of the first run is equal to sample 1 of the second run. and so on.

    Ahah! Thank you for the explanation. The behavior you are experiencing is expected and normal.

    MonaG said:
    But I want to get different results for all 100 samples when I run a new Monte Carlo, which I guess it is possible by changing the seed.  

    Yes. you are correct. Simply change the seed. In most cases, people want to be able to replicate the same statistical case in order to compare any potential changes to the netlist.

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • MonaG
    MonaG over 4 years ago in reply to ShawnLogan

    Yes but instead of changing the seed each time manually, I wanted to know if there is any setting that can set the seed to a random number like date, cpu time or ...

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 4 years ago in reply to MonaG

    Dear Mona,

    I am afraid I do not understand your motivation for changing the seed "automatically" for each Monte-Carlo set of simulations. Why would you want to do this? I think this may be why the feature has not been requested as one usually does want to use the same seed when evaluating a Monte_Carlo set for design iterations.

    I also see several ways to what I believe will have a similar effect:

    1. Change the starting number of each Monte-Carlo simulation set from 1 to some other number.  You might be able to make the starting number a variable and assign it with a SKILL script before your simulations start if you know SKILL.

    2. Increase the number of simulations in your Monte-Carlo set and then analyze the data for non-overlapping regions of the Monte-Carlo interactions. (i.e., set N to, say, 1000, and study the statistics of output simulations 1 - 200, 201 - 400, 401 - 600, etc...)

    Shawn

    • 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