[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [oc] Again! modulo arithmetic hardware
On Tue, Mar 12, 2002 at 08:33:11AM +0100, Marko Mlinar wrote:
>
> I like the solution!
>
> maybe it would be easier to implement it like this:
>
> static int temp = 0;
> int random ()
> {
> int x = rand16() + temp;
> if (x >= 10) x -= 10;
> if (x >= 10) x -= 10;
> return temp = x;
> }
>
> Is this distribution still flat and random?
only if the range of x[in] is an multiple of 10. not true
in general for prbs which are often 2^^n - 1 states long.
I thuought this was a hardware list. what kind of speed bounded
rtl is this?
john
>
> Marko
--
To unsubscribe from cores mailing list please visit http://www.opencores.org/mailinglists.shtml