BCM5722 Programmer’s Guide
10/15/07
Broadcom Corporation
Page 149 Endian Control (Byte and Word Swapping) Document 5722-PG101-R
WORD SWAP NON-FRAME DATA AND BYTE SWAP NON-FRAME DATA BITS
The Word Swap Non-Frame Data, and Byte Swap Non-Frame Data bits affect the byte ordering of certain shared memory
data structures (buffer descriptors, statistics block, etc.) when those structures are transferred across PCI.
The following table shows as example of how a Send Buffer Descriptor is stored internally in the BCM5722 Ethernet
controller.
Since the BCM5722 Ethernet controller uses a 64-bit memory subsystem, the above diagram is shown in 64-bit format.
Furthermore, the table shows both the internal byte offset for each field and the bit position for each byte.
To provide flexibility for different host processor/memory architectures, the BCM5722 Ethernet controller can order the data
in memory in four different ways depending on the settings of the Word Swap Non-Frame Data and Byte Swap Non-Frame
Data bits. The following tables show how data will appear depending on the settings of those swap bits:
Table 69: Send Buffer Descriptor (Big-Endian 64-Bit format)
Byte # 0 1 2 3 4 5 6 7
Bit # 63 4847 3231 1615 0
MSB Host Address LSB 0x00
MSB Length LSB Flags Reserved VLAN 0x08
Note: This may seem confusing because big-endian notation normally has the bit positions incrementing from left
to right. However, in this case, the bit positions are relevant because they correspond to the bit positions on PCI
(AD[63:0]) if neither of the non-frame data swap bits are set. For clarification, the following table shows the same
structure in 32-bit format.
Table 70: Send Buffer Descriptor (Big-Endian 32-Bit format)
Byte # 0 1 2 3
Bit # 31 16 15 0
MSB Host Address 0x00
LSB 0x04
MSB Length LSB Flags 0x08
Reserved VLAN 0x0C