Broadcom BCM5722 Programmer's Manual page 156

Host programmer interface specification for the netxtreme and netlink family of highly integrated media access controllers
Table of Contents

Advertisement

BCM5722
P
F
ACKET
ILTERING
M
H
T
ULTICAST
ASH
The MAC hash registers are used to help discard unwanted multicast packets as they are received from the external media.
The destination address is fed into the normal CRC algorithm in order to generate a hash function. The most significant bits
of the CRC are then used without any inversion in reverse order to index into a hash table, which is comprised of these MAC
hash registers. If the CRC is calculated by shifting right, then the right-most bits of the CRC can be directly used with no
additional inversion or bit swapping required. See
All four MAC hash registers are used so that register 1 bit-32 is the most significant hash table entry and register 4 bit-0 is
the least significant hash table entry. This follows the normal big-endian ordering used throughout the BCM5722 Ethernet
controller. Since there are 128 hash table entries, 7 bits are used from the CRC. When hash table is extended to 256 entries,
8bits from the CRC will be used as hash index.
The MAC hash registers are ignored if the receive MAC is in promiscuous mode.
E
CRC C
THERNET
ALCULATION
The BCM5722 Ethernet controller uses the standard 32-bit CRC required by the Ethernet specification as its FCS in all
packets. The checksum is the 32-bit remainder of the polynomial division of the data taken as a bit stream of polynomial
coefficients and a predefined constant, which also represents binary polynomial coefficients. The checksum is optionally
appended most-significant bit first to a packet, which is to be sent down the wire. At the receiving side, the division is
repeated on the entire packet including the CRC checksum. The remainder is compared to a known constant. For details on
the mathematical basis for CRC checksums, see Tanenbaum's Computer Networks, Third Edition, c1996.
The 32-bit CRC polynomial divisor is shown below:
x32 + x26 + x23 + x22 + x16 + x12 + x11 + x10 + x8 + x7 + x5 + x4 + x2 + x + 1
G
CRC
ENERATING
The following steps describe a method to calculate the CRC with the resulting 32-bit quantity having reversed bit order (i.e.,
most significant bit x31 of the remainder is right-most bit). The data should be treated as a stream of bytes. Set remainder
to 0xFFFFFFFF. For each bit of data starting with least-significant bit of each byte:
1. If right-most bit (bit-0) of the current remainder XORed with the data bit equal 1,
then remainder = (remainder shifted right one bit) XOR 0xEDB88320,
else remainder = (remainder shifted right one bit).
2. Invert remainder such that remainder = ~remainder.
Remainder is CRC checksum.
Right-most byte is the most significant and is to be sent first.
Swap bytes of CRC if big-endian byte ordering is desired.
Page 97
Packet Filtering
S
/C
ABLE
ETUP
ONFIGURATION
"Ethernet CRC Calculation"
Bro adco m C orp or atio n
Programmer's Guide
for more details on the CRC algorithm.
Document 5722-PG101-R
10/15/07

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the BCM5722 and is the answer not in the manual?

This manual is also suitable for:

Bcm5722kfb1g

Table of Contents