Forum Discussion
Generating normally distributed random numbers
Hi,
Does anyone have any tips regarding how to generate normally distributed pseudo-random numbers in Verilog or VHDL? Any help would be most appreciated. Regards15 Replies
- Altera_Forum
Honored Contributor
For those interested in a synthesizable core for generating normally distributed random numbers (often used for additive white Gaussian noise - AWGN), we offer affordable IP cores for Altera FPGAs that generate normally distributed numbers accurate up to 7.2 standard deviations.
Look up the Ukalta Engineering website for more details. - Altera_Forum
Honored Contributor
No,Thank you.
- Altera_Forum
Honored Contributor
Did you have a question, or were you showing off your latest and greatest code?
- Altera_Forum
Honored Contributor
TO_BE_DONE
- Altera_Forum
Honored Contributor
Thanks for the replies.
I have decided to use a Tausworthe generator which consists of three LFSRs. If anyone is interested, check out this link: http://www.ams.org/journals/mcom/1996-65-213/s0025-5718-96-00696-5/s0025-5718-96-00696-5.pdf. At the end there is an implementation of the generator in C. Regards - Altera_Forum
Honored Contributor
I normally code as below
signal shift : std_logic_vector(15 downto 1); process(reset,clk) if reset = '1' then shift <= "010"&x"123"; -- seed elsif rising_edge(clk) then if en = '1' then shift(1) <= shift(14) xor shift(15); -- taps shift(2 to 15) <= shift(1 to 14); -- shift end if; end if; end process; - Altera_Forum
Honored Contributor
Thats good to see. Im sure Ive seen someone from whoever the VHDL controlling body is coming up with something similar, that I think might make it into the next revision of VHDL (of course not synthesisable - only there for testbenching and verification.)
- Altera_Forum
Honored Contributor
a nice looking VHDL package that can create a signal with a normal distribution:
http://read.pudn.com/downloads111/sourcecode/asm/459855/random1.vhd__.htm - Altera_Forum
Honored Contributor
--- Quote Start --- It is often incorrectly assumed that Gaussian noise (i.e., noise with a Gaussian amplitude distribution — see normal distribution) is necessarily white noise, yet neither property implies the other. Gaussianity refers to the probability distribution with respect to the value i.e. the probability that the signal has a certain given value, while the term 'white' refers to the way the signal power is distributed over time or among frequencies. --- Quote End --- :o http://en.wikipedia.org/wiki/white_noise - Altera_Forum
Honored Contributor
absolutely, thanks for pointing out my oversight.
this is going to bother me all day. :)