|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: iSCSI CRC: A CRC-checking exampleJust a small point - If c is an unsigned 32 bit value and d is an unsigned 8 bit value, on most machines for the non-reflected lookup I don't think the "&" is necessary, is it? Shifting right 24 places ensures the first 24 bits are 0. i.e For the non-reflected table lookup you have: CRC32(c,d) (c=(c<<8)^crc32tab[(c>>24)^(d)]) and the same number of instructions as for the reflected case. As for all these issues about the reflection and the iversion, I suspect we have all spent too much time worrying about this already. These must be very minor issues - the important thing is that the specification clearly state which way it is to be done. For those of us preparing to implement the CRC in hardware, the arguments are very unsettling. Must I now add even more gates to make the reflection and the inversion programmable, in case the committee changes its mind? Steve Douglas Otis wrote: > Follow on: > > Slight correction: > > For the non-reflected table lookup you have: > CRC32(c,d) (c=(c<<8)^crc32tab[((c>>24)^(d))&0xFF]) > > For the reflected table lookup you have: > CRC32(c,d) (c=(c>>8)^crc32tab[(c^(d))&0xFF]) > > Doug
Home Last updated: Tue Sep 04 01:03:56 2001 6315 messages in chronological order |