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
152
Section 7: DMA
Document
1250_1125-UM100CB-R
In a receive channel the interface flags the start of a packet when it sends data to the DMA engine. In a transmit
channel the length field for one packet allows the DMA engine to directly determine when to expect the start
of the next packet. In either case the DMA engine will always advance to a new descriptor when a new packet
is started. Thus the first buffer in the pair can be used to point to small packet header buffers and the second
buffer can be large and used for packet bodies. (This does not apply for the Data Mover since each transaction
has its own descriptor.)
The descriptor associated with the first buffer in a packet is treated specially. It contains per-packet options
that are passed to the interface describing any special treatment that this packet should receive. Once a packet
has been completely transferred status information is written back into the first descriptor. Received packets
accumulate many status bits (described in
Section: “Option and Flag Bits for Ethernet MACs” on page 171
and
Section: “Control and Flag Bits for Synchronous Serial Interface” on page 174
), and additionally have the
packet length written in to the descriptor. Only the first descriptor of the packet is written and the SOP flag bit
will always be set. Software can clear the status word in all descriptors used by the receive engine and then
use the SOP bit to identify descriptors that start packets. The SOP bit will only be set when the full packet has
been received. If the system revision indicates PERIPH_REV3 or greater then the Ethernet DMA provides the
option of overwriting the a_size field in the SOP descriptor with the number of descriptors that were used by
the received packet. If this is enabled (by setting the xtra_status bit in the
dma_config1
register) and the
standard descriptor format is used then the software will need to keep track of the A buffer size by some
method other than reading the descriptor and will need to restore the a_size field before the descriptor can be
used for a subsequent DMA.
For transmitted packets the only change in the status flags is that the SOP bit is cleared, this can be used by
software to detect the packet transmission has completed. If software does not make use of this feature the
bandwidth used for descriptor management through the I/O bridge (and thus the latency for other accesses)
can be reduced by disabling writing back the transmit status.
In the Ethernet DMA engine the SOP bit must always be set for the descriptor associated with the start of a
packet, if the engine sees this bit clear in a descriptor that it believes should be the start of a packet then it will
report a descriptor error and stop until software fixes the problem. If the SOP bit is set then the options field of
the transmit descriptor must be nonzero and is used to enable operations on the data as it is transmitted, if the
SOP bit is clear then the options field of the descriptor must be zero.
If a channel is disabled, when it is enabled it will start from the descriptor pointed to by the base address. The
count will not be changed. The CPU must either zero the count (by adding the twos-complement of its current
value) or reorder the descriptors to put valid ones at the start of the ring or chain. If the system revision indicates
PERIPH_REV3 or greater then an Ethernet transmit DMA channel may be paused by setting the
pause_channel_en bit in the
dma_config1
register. This will pause the channel (but not the other transmit
channel) at the next packet boundary. Transmission will be resumed when the bit is cleared. This can be used
for example by software to stop tranmission of a best-effort queue when the link partner indicates it is only able
to buffer priority traffic.
The Ethernet interface will normally respond in hardware at the MAC layer to pause frame flow control
requests. However, if the system_revision indicates PERIPH_REV3 or greater it can also be set to implement
the pause at the DMA layer (when this is done the interface may stop more slowly because of any packets
buffered in the fifo between the DMA engine and MAC). If this option is enabled (by setting the
channel_base_fc_en bit in the
mac_vlantag
register) then the fc_pause_en bit in the
dma_config1
register
determines if the channel is affected by pause frames or not. Thus, provided the link partner is appropriately
configured, the interface can be set to pause only one channel and allow the other (high priority) to continue
even when the flow control is requested.
Содержание BCM1125
Страница 18: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page xviii Document 1250_1125 UM100CB R ...
Страница 28: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page xxviii Document 1250_1125 UM100CB R ...
Страница 515: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page vii Index Document 1250_1125 UM100CB R ...