• 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. Functional Verification
  3. e-code: Generation of Normal_Gaussian Distribution

Stats

  • Locked Locked
  • Replies 0
  • Subscribers 64
  • Views 12638
  • 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

e-code: Generation of Normal_Gaussian Distribution

archive
archive over 19 years ago

This code generates a Normal distributed variable.

This cofde generates 12 (it's an importnat number) uniformly distributed variables (Xs)between -100 and 100 and adds them into a 1000 sample vector called gausian.

Of course, you can play with the parameters to satisfy your demands, but the important things are:
1) if you give Xs asymetric range , and you want a normal (i.e mean=0) distribution, don't forget to substract
range_size/2 from every sample.
2) The number 12 gives the std 1 because a uniform std is 0.25 =~sqrt(1/12) and by adding 12 Xs you obtain std=1
so if you change this number be sure to modify your std as well.
3) I gave an example with 1000 points. Of course, the more points-the more accurte distribution, but longer run.

The code includes coverage so that if you run it with specview and open the coverage window and look at samples
( under normal.collect) you can see graghically the distribution (flipped to the side)

author: Avi Farjoun updated 10/28/2004 1071 bytes


Originally posted in cdnusers.org by Administrator
Generation of Norma_Gaussian distributionl.doc
  • 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