[Click] random bit errors element

Alastair McKinley amckinley03 at qub.ac.uk
Mon Feb 27 17:24:47 EST 2006


On Feb 27 2006, Eddie Kohler wrote:

> Hi Alastair,
> 
> Thanks for the patch! You missed one important fix, around line 168, 
> which would need changes to produce a random number with 28 bits of 
> randomness. There are a few other places too. I've checked in a fixed (I 
> hope) version that seems to work. Thanks again!
> 
> Eddie
> 
> 
Hi Eddie,

Thanks for the email.  I think I just sorted it out myself, at least it
was working pretty much as I expected (I was working on a proper test
this afternoon!). I was also wondering about something, why do you bit
shift the values from random() eg.

int v = (random() >> 3) & 0xFFFFFFF;

and

unsigned char errors = bit_flip_array[ ((random() >> 5) % n) + idx ];

I didnt quite figure that out, but anyway!

Thanks again,

Alastair 


More information about the click mailing list