BCM1250/BCM1125/BCM1125H
User Manual
10/21/02
B r o a d c o m C o r p o r a t i o n
Page
268
Section 9: Ethernet MACs
Document
1250_1125-UM100CB-R
The frame is broken up into the following fields:
Table 160: Ethernet Frame Fields
Name
Description
IFG
Inter-frame Gap. This is the period that the link is idle between frames.
The size of the gap used by the MAC is programmable. The ifg_tx parameters in the
mac_frame_cfg
register sets the gap that will be used after reception and transmission of a
packet. The ifg_thrsh threshold sets the size of the end of the gap in which the MAC does not
check the carrier before transmitting.
Preamble
The preamble is used to allow other devices to detect the carrier and synchronize with the
transmitter. Alternating ones and zeros are sent.
SFD
The Start of Frame Detect byte is used to mark the start of the active frame. It is a single byte with
the value 8'hD5.
Destination Address The destination address is the 6 byte unique Ethernet address that this frame is intended for.
Packets with the destination address FF-FF-FF-FF-FF-FF are broadcast packets, and those with
the least significant bit of the first byte (i.e. the first bit sent on the wire) set are multicast packets.
The interface will filter incoming packets based on this field.
Source Address
The source address is the 6 byte unique Ethernet address of the sender of the frame. During
packet transmission the interface can automatically overwrite an old source address with its own.
Type/Length
The meaning of the type/length field depends on whether the packet is sent in 802.3 format or
Ethernet format. The field value is a 16 bit number, where the first byte is the most significant 8
bits and the second byte is the least significant 8 bits. If the value of the field is less than or equal
to 1500 then this is an 802.3 format frame and this field gives the length of the data field. If the
value is greater than 1535 then this is an Ethernet format frame and this field gives the type.
The receive interface can be set to check this length against the actual packet length, and report
an error if they differ.
Data
The data portion of the packet is the (layer 3) data that is being transported from the source to the
destination.
The standard gives the minimum and maximum sizes of the data as 46 and 1500 bytes (giving
minimum and maximum packet sizes of 64 and 1518 bytes). Both can be changed in the
mac_frame_cfg
register to support jumbo packets.
CRC
The CRC (also known as Frame Check Sequence or FCS) is a 32 bit cyclic redundancy check
calculated over all the bytes in the packet from the first destination byte to the last data byte. It is
normally appended to the frame during transmission and checked during reception.
The CRC is formed using the CRC-32 polynomial:
x
32
+ x
26
+ x
23
+ x
22
+ x
16
+ x
12
+ x
11
+ x
10
+ x
8
+ x
7
+ x
5
+ x
4
+ x
2
+x
1
+ 1
The partial CRC accumulator is initialized to 32’hFFFFFFFF at the start of the packet. The 32 bit
CRC is transmitted most significant byte first.
The interface can automatically insert the CRC during transmission, this is selected on a per-
packet basis in the DMA descriptor. If this is disabled the CRC must be provided as part of the
data from the transmit FIFO. The MAC will always check the transmitted CRC and log an error if
a packet has been sent with a bad CRC.
VLAN TAG
The VLAN Tag is not part of the Ethernet standard. It is an extra four byte header that is used
when encapsulating other packets into a "virtual LAN" link.
The interface can insert, replace or remove VLAN tags from packets during transmission. This is
selected on a per-packet basis in the DMA descriptor, if the VLAN tag is altered then automatic
CRC generation is also enabled.