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
273
Automatic retry would normally only be enabled for collisions since the other conditions could indicate a more
serious problem (once the system is known to work automatic retry could be added for occasional underflows).
The Gigabit Ethernet standard allows bursts of packets to be transmitted without requiring the link be released
and reacquired. This is enabled by setting the burst_en configuration bit, which should only be set when the
MAC is configured for half-duplex 1000 Mbp/s operation.
T
RANSMIT
P
ATH
Each MAC has two transmit DMA channels associated with it. If only one is enabled or only one has descriptors
available then it is selected for transmission. If both channels are enabled and have packets available then the
weights set in the
mac_txd_ctl
register are used to select which is used. The number of packets selected by
the weight are sent from one DMA channel then the other is serviced for the number of packets set in its weight;
if a channel becomes empty then the other channel immediatly starts. (Note that if both channels are enabled
and given weights of zero then no packets will be transmitted.) If the packets in each DMA channel are the
same length (or on average the same length) then this will share the transmission bandwidth according to the
weights. If the packets are on average of very different lengths the weights can be skewed accordingly. The
selected DMA channel will write a packet into the transmit fifo, with the start and end specially marked for the
protocol engine.
The packet to be transmitted is encapsulated in the Ethernet frame described above. The inter-frame gap,
preamble and SFD are automatically prepended before data read from the FIFO. The data is then copied from
the FIFO to form the body of the packet. There are six manipulations that the protocol engine can perform,
configured per packet by options in the DMA descriptor:
•
Replacement of source address. The source address that is in the packet supplied by the DMA engine
can be overwritten with the address of this interface that has been set in the
mac_ethernet_addr
register.
•
Removal of VLAN tag. The four bytes of VLAN tag can be dropped from the packet, converting a VLAN
packet into a regular Ethernet packet.
•
Insertion of VLAN tag. The four bytes in the
mac_vlantag
register can be inserted into the packet just
after the source address, converting a standard Ethernet packet into a VLAN packet.
•
Replacement of VLAN tag. The four bytes in the
mac_vlantag
register overwrite the four bytes in the
VLAN tag position in the packet.
•
Padding short packets to the minimum frame size.
•
Insertion of CRC. The four byte CRC can be automatically replaced in the packet or appended to it. If any
of the other modifications are done the CRC will be replaced to ensure the interface uses the correct CRC
for the data sent.
During packet transmission the protocol engine always calculates the CRC of the frame. This value will be
inserted if the interface is configured to automatically append the CRC. The CRC that is transmitted will always
be compared to the CRC that was calculated. If the CRC was automatically generated they will always match.
If the CRC was supplied through the transmit FIFO and it does not match the calculated one then a transmit
CRC error is reported.
In Packet FIFO mode the only packet modification that can be done by the transmitter is to append the CRC.
CRC error
None
Cannot be retried
The transmitted CRC is compared to the CRC that was computed over the frame, and
this error is raised if they differ. If the interface is automatically appending the CRC,
then this error will never happen. If the CRC is being supplied with the data then this
error indicates that the supplied CRC was bad, and that the packet will be rejected by
the recipient.
Table 161: Transmission Error Conditions
(Cont.)
Error
Bit to Set for
Automatic Retry
Description