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
265
The DMA controllers are described in
. On the transmit side there are two DMA
channels which are serviced using a weighted round robin algorithm. In the receive direction there are also two
channels, the packet header is used to select which will be used for delivery.
The transmit packet flow starts with the packet being DMAed from memory into the transmit FIFO. The FIFO
is not intended to store the complete packet, it is there to buffer the line rate from the system bus. The DMA
controller will fetch 32 byte cache blocks as required to keep the FIFO filled. The controller can be configured
to either fetch one or two blocks at a time. The memory performance will be improved by fetching two blocks
at a time since the second is likely to hit the memory page opened by the first, however it lowers the granularity
of control over the FIFO. The data unpacker extracts 64 bit double-words from the FIFO and forwards them as
a byte stream to the protocol engine. Either the Ethernet MAC engine or the Packet FIFO protocol bypass path
is selected. For successful transmission one byte must be sent to the protocol engine every cycle, this is
enabled by only starting to send a new packet when enough data has been written in to the FIFO to buffer the
DMA latency.
The Ethernet MAC protocol engine formats the packet according to the Ethernet specification, executes the
MAC protocol to gain access to the transmission medium and sends the packet to the (external) physical layer
interface over the GMII pins. It will also respond to flow control requests and block packet transmission as
required. The Packet FIFO protocol engine generates simple framing signals for the external interface, but
otherwise acts as a bypass path for data to the GMII pins.
The receive packet flow starts with a byte stream being delivered from the physical layer device over the GMII
pins. Bytes are sent either to the Ethernet or Packet FIFO protocol blocks. The protocol engine will validate the
packet, strip the MAC layer overhead and forward the data to the packing unit. The received bytes are packed
into 64 bit double-words and inserted into the receive FIFO. Again, the FIFO just provides a buffering function
to cover the DMA latency. The receive DMA engine will extract 32 byte cache blocks from the FIFO and
transfer them into memory. The receive protocol engine can also request flow control, it will do this either under
software control or if the DMA engine is running out of buffers for incoming packets.
A set of registers in the control section allows the interface to be configured and status to be read. The MAC
must be configured before it is used. After the system has been reset the transmit section, receive section and
protocol engine are all held in reset until enabled by software.
There is one main interrupt associated with each interface. It combines the interrupts from the transmit and
receive sides of each of the two DMA channels and the interrupt from detection of errors. There is a second
interrupt that can be enabled to split the DMA channels. When the second interrupt is enabled it signals events
from the channel 1 transmit and receive DMA engines, and the main interrupt only signals events from the
channel 0 DMA engines and error conditions.