[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [oc] Again! modulo arithmetic hardware



just some thoughts about these simple solutions:

> 1) Generate a larger binary random number [0:255] (8 bits).
> take any 4 bits of this number to produce a random number
> between 0:15. Discard any number above 9 (i.e. regenerate
> another random number). Only when you discard will you
> need to regenerate. To reduce regeneration somewhat you could
> perhaps take the low 4 bits for your first pick. If that fails
> take the high 4 bits. If that fails then regenerate new random
> number.
this may take forever to find a random number...
maybe you can search for near-random number, if none
of nibbles are ok, then take a number of 0..7

> 2) Generate a random number of 9 bits (or larger) in width. Use a
> logic core that inputs of 9 bits and outputs the count of bits
> set.
I am not an expert in random math, but I would say this new distribution
is not random anymore.

Marko



--
To unsubscribe from cores mailing list please visit http://www.opencores.org/mailinglists.shtml