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 9: Ethernet MACs Page
269
P
REPENDED
H
EADER
F
RAME
F
ORMAT
In devices with system revision indicating PERIPH_REV3 or greater the MAC interface supports a modified
frame format that has an additional header prepended before the Ethernet frame. The CRC can be set to cover
the prepended header and Ethernet frame or just the Ethernet frame (or a combination). Ignoring the framing
(IFG/Preamble/SFD for Ethernet, SOP/EOP marks on first and last bytes for Packet Fifo modes) the
prepended header format is shown in
. This figure shows the CRC offset pointing to part way through
the prepended header which is unusual, the standard cases are when the crc_offset is zero (i.e. the CRC
covers everything) or the crc_offset is equal to the pkt_offset (i.e. the CRC covers the Ethernet frame and not
the prepended header). The crc_offset must be less than or equal to the pkt_offset, if it is greater the behavior
of the interface is UNPREDICTABLE.
Figure 53: Prepended Header Format
The pkt_offset and crc_offset must be a multiple of 8 bytes. An offset of zero indicates there is no offset and
the start of the packet is used. The maximum offset is 248 (31*8) bytes. There are separate registers to set the
offsets on the transmit and receive sides (and their values may be different). In both cases the CRC offset
specifies the first byte of the packet that will be included in the CRC calculation. For the transmit side the
tx_pkt_offset is used to locate the Ethernet header for replacement of the source address, and the VLAN tag
position for automatic insertion, removal or replacement of the VLAN tag. On reception the rx_pkt_offset is
used to specify the start of the Ethernet header for the address filtering and for extraction of the packet type.
The figure also shows the iphdr_offset. This identifies the start of the IP header in the packet for checksum
checking (both IPv4 header checksum and TCP checksums are checked) and is discussed in later sections.
To allow for networks that have a mix of VLAN and non-VLAN packets the interface can be configured to
automatically add 4 bytes to the iphdr_offset when a packet with a VLAN tag is received.
Destination
Address
Source
Address
Type
Length
Data
CRC
VLAN Frame with Prepended Header
ss
ss
pkt_offset
Min Packet Size
Max Packet Size
n*8
6
6
2
46-1500
4
Destination
Address
Source
Address
Type
Length
Data
ss
ss
6
6
4
46-1500
4
CRC
2
VLAN
TAG
Standard Frame with Prepended Header
Prepended
Header
crc_offset
Covered by the CRC
Prepended
Header
iphdr_offset
4