Functional Description
889
SLAU723A – October 2017 – Revised October 2018
Copyright © 2017–2018, Texas Instruments Incorporated
Ethernet Controller
The data buffer also resides in the physical memory space and consists of an entire frame or part of a
frame, but cannot exceed a single frame. Buffers contain only data and buffer status is maintained in the
descriptor. Data chaining refers to frames that span multiple data buffers. However, a single descriptor
cannot span multiple frames. The DMA skips to the next frame buffer when the end-of-frame is detected.
Data chaining can be enabled or disabled through the descriptors.
NOTE:
The EMAC DMA Controller only has access to internal system SRAM.
15.3.3.1 Burst Access
The DMA attempts to execute fixed length Burst transfers if the FB bit is set in the EMACDMABUSMOD
register. The maximum burst length is indicated and limited by the PBL field in the EMACDMABUSMOD
register. The Receive and Transmit descriptors are always accessed in the maximum possible (limited by
PBL) burst-size for the bytes to be read.
The TX DMA initiates a transfer only when there is sufficient space in the FIFO to accommodate the
configured burst or remaining bytes of the end of a frame. When the DMA is configured for fixed-length
burst, it transfers data using the best combination of fixed burst sizes of 4, 8, or 16 and single
transactions. Otherwise when the FB bit is clear in the EMACDMABUSMOD register, the DMA transfers
data as a continuous undefined burst and single transactions.
The RX DMA initiates a data transfer only when sufficient data to accommodate the configured burst is
available in RX FIFO or when the end-of-frame (when it is less than the configured burst length) is
detected in the RX FIFO. The DMA indicates the start address and the number of transfers required to the
system. When the FB bit is set in the EMACDMABUSMOD register, then it transfers data using the best
combination of fixed burst sizes of 4, 8, or 16 and single transactions. If the end-of frame is reached
before the fixed-burst ends, then dummy transfers are performed in order to complete the fixed-burst.
Otherwise, if the FB bit is clear, the DMA transfers data using INCR (undefined length) and SINGLE
transactions. When the DMA is configured for address-aligned transfers, both DMA engines ensure that
the first burst transfer on the system bus is less than or equal to the size of the configured PBL in the
EMACDMABUSMOD register. Thus, all subsequent transfers start at an address that is aligned to the
configured PBL. The DMA can only align the address for burst transfers up to size 16 because only bursts
of 16 are supported.
15.3.3.2 Data Buffer Alignment
The transmit and receive data buffers do not have any restrictions on the start address alignment. For
example, in systems with 32-bit memory, the start address for the buffers can be aligned to any of the four
bytes. However, the DMA always initiates write transfers, with address aligned to the bus width and
dummy data (old data) in the byte lanes that are not valid. This typically happens during the transfer of the
beginning or end of an Ethernet frame. The software driver should discard the dummy bytes based on the
start address of the buffer and size of the frame.
For example, if the transmit buffer address is 0x0000.0FF2, and 15 bytes need to be transferred, then the
DMA reads five full words from address 0x0000.0FF0, but when transferring data to the TX FIFO, the
extra bytes (the first two bytes) are dropped or ignored. Similarly, the last 3 bytes of the last transfer are
also ignored. The DMA always ensures that it transfers a full 32-bit data to the TX FIFO, unless it is the
end of frame.
If the receive buffer address is 0x0000.0FF2 and 15 bytes of a received frame need to be transferred,
then the DMA writes five full words from address 0x0000.0FF0. However, the first two bytes of first
transfer and the last three bytes of the fifth transfer have dummy data. The DMA considers the offset
address only if it is the first Receive buffer of the frame. The DMA ignores the offset address and performs
full word writes for the middle and the last Receive buffer of the frame.