Endianess of CRC

Bruce Leshay Bruce.Leshay at QNTM.COM
Fri May 29 11:09:29 PDT 1998


* From the T10 (formerly SCSI) Reflector (t10 at symbios.com), posted by:
* Bruce Leshay <Bruce.Leshay at qntm.com>
*
The order of the CRC bytes transmitted on the bus was brought up as an issue
at the Spi-3 Working Group meeting on 5/22.  I think we should treat both
the data (for the purposes of the CRC calculation) and the CRC as big-endian
quantities.  This is consistent with CDB data, (examples are the LBA and
XFRLEN fields) which are big-endian.

Imagine the CRC generator/checker as a black box with a 32 bit input and a
32 bit output.  If on a wide SCSI bus,
and two words are transferred word0[15:0] first, then word1[15:0].  Then for
generating/checking the CRC, the correspondence between the bus data and and
the crc input is:

word0[7:0]   <-> CRC_input[31:24]
word0[15:8] <-> CRC_input[23:16]
word1[7:0]   <-> CRC_input[15:8]
word1[15:8] <-> CRC_input[7:0]

Then when the CRC_output[31:0] is transmitted over the scsi bus, it should
be transmitted in word2 and word3:

CRC_output[31:24] <-> word2[7:0]
CRC_output[23:16] <-> word2[15:8]
CRC_output[15:8]   <-> word3[7:0]
CRC_output[7:0]     <-> word3[15:8]

This may seem confusing, but it's really just renaming of fields.

						Bruce Leshay
						Quantum Corporation

*
* For T10 Reflector information, send a message with
* 'info t10' (no quotes) in the message body to majordomo at symbios.com





More information about the T10 mailing list