• 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. Monte carlo simulation question

Stats

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

Monte carlo simulation question

Holz
Holz over 3 years ago

Hi everyone,

I have a 16 bits adder circuit, and for each adder, it has three input ports: a,b and carry_in. I want to do monte carlo simulation(sweep these three input values) to analyze how the delay distributes.

So, the value of the inputs of each adder should be either 0 or VDD, I have no idea how to do this since there are no swept values, and if I write "vary ***" in "process", it will not work.

 

Thanks for the help!

Regards,

Holz

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago

    Holz,

    You could create a spectre file like this:

    parameters VDD=3.3 \
      dist0=0 bit0=(dist0>0?VDD:0) \
      dist1=0 bit1=(dist1>0?VDD:0) \
      dist2=0 bit2=(dist2>0?VDD:0) \
      dist3=0 bit3=(dist3>0?VDD:0)
    
    statistics {
        process {
    	vary dist0 dist=unif N=1
    	vary dist1 dist=unif N=1
    	vary dist2 dist=unif N=1
    	vary dist3 dist=unif N=1
        }
    }

    Then you could reference the bit0/bit1 etc on your input sources:

    Vb0 (b0 0) vsource dc=bit0
    Vb1 (b1 0) vsource dc=bit1
    Vb2 (b2 0) vsource dc=bit2
    Vb3 (b3 0) vsource dc=bit3

    Hope that helps? Given that you can't have discrete distributions, I've just created uniform distributions between +/-1 for each and then the ternary expression on each "bit" parameter translates that to VDD or 0 depending on whether the dist parameter is positive or not.

    Andrew 

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • Holz
    Holz over 3 years ago in reply to Andrew Beckett

    Thanks, Andrew, this really helps!

    • 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