Talk About Network

Google





Electronic Equipment > Digital Signal Processing (DSP) > Re: generate wh...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 11 Topic 14019 of 14426
Post > Topic >>

Re: generate white noise in assembly

by Jerry Avins <jya@[EMAIL PROTECTED] > Oct 9, 2008 at 03:22 PM

Andor wrote:
> Jerry Avins wrote:
>> hbarcellos wrote:
>>> Hi all,
>>> I'm working whit ADSP 21161 analog devices, I'm looking for a way to
>>> generate a white noise in assembly, something like a random function
in C.
>>> kind regard's
>> A linear congruential generator is probably good enough. Thay are easy
>> to code. If you don't need all the bits, discard the lower-order
ones.http://en.wikipedia.org/wiki/Linear_congruential_generator
> 
> For DSP, the linear congruential generators might be good enough.
> There is a particular pair of numbers "a" and "b", such that
> 
> x(n) = (a x(n-1) + b ) % 2^32
> 
> produced what looks and sounds like uniform random integers and has a
> period of 2^32 - 1. For processors that sup****t 32bit fixed-point
> arithmetic (like the SHARC), this is extremely fast (the % is for
> free). The numbers "a" and "b" are in one of Knuth's volumes and the
> old Numerical Recipes in C (in the new version, they completely
> discourage the use of linear congurential generators - a pity, because
> for dithering and simple randomization, the above generator works just
> fine).
> 
> Hey wait, the old version of NR is available online here:
> 
> http://www.nrbook.com/a/bookcpdf.php
> 
> Chapter 7.1 (Uniform Deviates), section Quick and Dirty Generators. So
> "a" is 1664525 and "b" is 1013904223.

The link I cited gives several pairs. Knuth (TACP, chap 3) has a lot of 
good discussion, but makes no specific recommendations. A general Linear 
congruential RNG has the form  X_{n+1} = (a*X_n + c)mod m.
For the ANSI C RNG, m=2^32, a=1103515245, c=12345, and bits 30..16 are 
returned.

Jerry
-- 
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
** Posted from http://www.teranews.com
**
 




 11 Posts in Topic:
generate white noise in assembly
"hbarcellos" &l  2008-10-09 04:36:14 
Re: generate white noise in assembly
"mikefromparis"  2008-10-09 12:51:41 
Re: generate white noise in assembly
Jerry Avins <jya@[EMAI  2008-10-09 14:28:41 
Re: generate white noise in assembly
Andor <andor.bariska@[  2008-10-09 11:42:24 
Re: generate white noise in assembly
Jerry Avins <jya@[EMAI  2008-10-09 15:22:51 
Re: generate white noise in assembly
Andor <andor.bariska@[  2008-10-09 12:56:45 
Re: generate white noise in assembly
Jerry Avins <jya@[EMAI  2008-10-09 16:18:46 
Re: generate white noise in assembly
glen herrmannsfeldt <g  2008-10-11 19:35:28 
Re: generate white noise in assembly
Raymond Toy <raymond.t  2008-10-23 17:29:55 
Re: generate white noise in assembly
glen herrmannsfeldt <g  2008-10-23 20:37:56 
Re: generate white noise in assembly
Raymond Toy <raymond.t  2008-10-24 09:08:24 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Thu Jan 8 22:26:25 PST 2009.