Intel
®
81341 and 81342—Application DMA Unit
Intel
®
81341 and 81342 I/O Processors
Developer’s Manual
December 2007
506
Order Number: 315037-002US
5.8
CRC Generation
When enabled, the ADMA generates a 32-bit CRC based on the programmed data
stream and a 32-bit seed. The CRC engine uses the CRC-32C algorithm required by the
iSCSI* Specification.
5.8.1
CRC Mode Configuration and Operation
In addition to the normal ADMA Descriptor configuration, the following additional steps
are required to configure the CRC engine:
1. When writing out the descriptor, bit 9 of the DC is set to enable CRC generation. For
a single descriptor CRC operation or the first descriptor of a multiple descriptor CRC
operation, bit 11 of the DC is cleared to enable the CRC seed fetch. See
for details of how to properly use bit 11 and bit 9 of the DC to chain
a CRC operation across multiple descriptors.
2. Word 2 of the descriptor is written with the 32-bit aligned CRC Address.
When a descriptor is configured to generate CRC, the ADMA performs the following
steps in addition to the Data Transfer:
Note:
When Word 3 (Byte Count) is set to 0, then the CRC seed value is not affected and the
ADMA advances to the next descriptor.
1. Prior to the start of the Data Transfer, the ADMA loads the 32-bit seed value from
the CRC Address into an internal CRC Shift Register.
2. The ADMA accumulates the 32-bit CRC value in an internal register as the Data
Transfer is occurring. Specifically, this CRC internal register is recirculated through
the CRC-32C algorithm using the current contents of this register and the most
recent data transferring through the ADMA.
a. CRC Internal Register (n) = CRC-32C (CRC Shift Register (n-1), Data(n)).
3. Following the completion of the Data Transfer, the ADMA transposes this internal
register’s contents into a CRC value and write it to CRC Address.
4. Finally, the ADMA writes the Byte Count Register back to the descriptor with the
Transfer Complete bit set.
Note:
See
Figure 70, “Calculation of 32-bit CRC for iSCSI PDU” on page 508
for details on the
implementation.
Note:
ADCR bit 10 may be used to disable the Data Transfer during a CRC calculation. This
provides the ability to generate CRC on a source data block without writing a
destination data block.