User Manual
BCM1250/BCM1125/BCM1125H
10/21/02
B r o a d c o m C o r p o r a t i o n
Document
1250_1125-UM100CB-R
Section 7: DMA Page
179
Note that if the prefetch flag is set no data will be moved and the destination address is used just to write the
TCP sum if the append flag is set. If the Prefetch flag is clear then data will be moved as the checksum
calculation is done and the TCP sum is appended if the append flag is set. If the zero_mem flag is set then
zeros are added to the sum, this has no effect unless there is a retained byte from a previous merge to combine
in to the sum. If the prefetch and zero_mem flags are both set no memory is zeroed but zeros will be added to
the sum, again this will have no effect unless there is a retained byte or a retained byte is created.
CRC Generation
The programmable CRC generator can be used to generate any CRC up to 32 bits (output fieldwidths of 8, 16
and 32 bits are supported). There are two sets of CRC definition registers and each datamove specifies which
should be used. The CRC is programmed using a set of parameters:
•
crc_init
32 bit initial value
•
crc_poly
32 bit polynomial
•
crc_width
Sets width of output CRC field (32, 16 or 8 bit)
•
crc_txor
32 bit value to xor the final CRC
•
crc_bit_order
Sets the order of bits within a byte for the computation (0 for bit 0-7, 1 for 7-0)
When the CRC width is less than 32 bits the definition should be put in the high end of the registers. Thus for
a 16 bit CRC the width is set to 16, the polynomial must be placed the upper half of the crc_poly field (i.e. bits
63:48 of the
crc_def
register), the initial value will come from the upper half of the crc_init field (i.e. bits 31:16
of the
crc_def
register) and the partial result will be in the upper bits (31:16) of the crc_partial register. For an
8 bit CRC the width is set to 8 the polynomial must be placed in the upper byte (63:48) of the crc_poly field,
the initial value will come from the upper byte (31:24) of the crc_init field and the partial result will be in the
upper byte (31:24) of the crc_partial register. For other CRC widths the next larger output field width should be
used and the CRC result will be in the upper bits of the field and the upper bits of the registers are used for the
definition. In all cases unused bits must be set to zero or the result will be UNPREDICTABLE.
Before the result is written to memory it is XORed with the crc_txor value. Many CRCs require this to prevent
all zero data having a zero CRC.
The polynomial arithmetic behind the CRC algorithms splits a message (and the attached CRC) into the
coefficients of a polynomial. This is normally done in the order the bits flow serially over the wire. While all
interfaces send bytes in the order of ascending memory address, some choose to send the least significant bit
of the byte first and some the most significant bit first. This changes the order of the bits needed for the CRC
computation. The generator can compute with either order as set by the crc_bit_order flag. There is a similar
issue when the CRC result is written to memory. The data is always written in big endian manner (i.e. the high
bits of the result get written to the lower memory addresses) to match the final packet being sent in the order
of ascending memory address. But again a swap may be needed within the bits. This final swap is specified in
the DMA descriptor by setting the crc_xbit flag. This should only be done in the last descriptor of the
computation.
Table 112: Result in memory of appending the result CRC[31:0]
Addr+0
Addr+1
Addr+2
Addr+3
crc_xbit = 0. Big Endian Order
CRC[31:24]
CRC[23:16]
CRC[15:8]
CRC[7:0]
crc_xbit = 1. Big Endian Order, bit swapped bytes
CRC[24:31]
CRC[16:23]
CRC[8:15]
CRC[0:7]
Содержание BCM1125
Страница 18: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page xviii Document 1250_1125 UM100CB R ...
Страница 28: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page xxviii Document 1250_1125 UM100CB R ...
Страница 515: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page vii Index Document 1250_1125 UM100CB R ...