BCM1250/BCM1125/BCM1125H
User Manual
10/21/02
B r o a d c o m C o r p o r a t i o n
Page
180
Section 7: DMA
Document
1250_1125-UM100CB-R
gives some example values for some common CRCs (in a particular use care will need to be taken
with the final bit order).
If the CRC is enabled then for every byte in the move the data is merged in to the partial CRC. At the end of
any move that has CRC enabled the partial sum register associated with a channel is updated. At the start of
any move with CRC enabled that do not have the reset flag set the current sum is updated from the partial sum
register for that channel. At the start of any move that has the reset flag set the current sum is set to the crc_init
value for the selected CRC definition. At the end of a move that has the append bit or the crc_xbit flag set the
partial sum register associated with the channel is written with the final CRC value after the XOR and bit-flip
have been done.
If the append bit is set then the CRC is appended BEFORE the checksum and is included in the checksum.
This matches protocols such as iSCSI where the CRC is internal to the TCP payload. The number of bytes
appended will be 1, 2 or 4 to match the field width of the CRC. If required a read-modify-write is done. Note
that when a checksum is appended it is not included in the CRC.
When the prefetch flag is set no data will be moved and the destination address is used just to write the CRC
if the append flag is set. If the Prefetch flag is clear then data will be moved as the CRC calculation is done
and the CRC is appended if the append flag is set. If the zero_mem flag is set then zeros are added to the
CRC, this will have an effect on the result. If both prefetch and zero_mem flags are set then the zeros will be
added to the CRC but no memory will be zeroed.
Computation Sizes and Bandwidth
The TCP checksum is done in 16-bit operations, and CRC calculation is done in 12-bit operations so for a full
32 byte cache line 16 or 24 ZBbus cycles are needed. There will be a few clocks overhead, but this gives a
theoretical max sum/crc bandwidth of about 6 or 4 Gbps.
Table 113: Example CRC configurations
crc_width
crc_poly
crc_init
crc_txor
crc_bit_order
crc_xbit
CRC32 (Ethernet)
32
04C11DB7
FFFFFFFF
FFFFFFFF
1
1
CRC32C (iSCSI)
32
1EDC6F41
FFFFFFFF
FFFFFFFF
1
1
CRC-CCITT (HDLC)
16
80050000
00000000
00000000
1
1