UM10237_2 © NXP B.V. 2008. All rights reserved.
User manual Rev. 02 — 19 December 2008 244 o f 792
NXP Semiconductors UM10237
Chapter 11: LPC24XX Ethernet
8.2 Transmit descriptors and statuses
Figure 11–29 depicts the layout of the transmit descriptors in memory.
Transmit descriptors are stored in an array in memory. The lowest address of the transmit
descriptor array is stored in the TxDescriptor register, and must be aligned on a 4byte
address boundary. The number of descriptors in the array is stored in the
TxDescriptorNumber register using a minus one encoding style i.e. if the array has 8
elements the register value should be 7. Parallel to the descriptors there is an array of
statuses. For each element of the descriptor array there is an associated status field in the
status array. The base address of the status array is stored in the TxStatus register, and
must be aligned on a 4 byte address boundary. During operation (when the transmit
datapath is enabled) the TxDescriptor, TxStatus, and TxDescriptorNumber registers
should not be modified.
Two registers, TxConsumeIndex and TxProduceIndex, define the descriptor locations that
will be used next by hardware and software. Both register act as counters starting at 0 and
wrapping when they reach the value of TxDescriptorNumber. The TxProduceIndex
contains the index of the next descriptor that is going to be filled by the software driver.
The TxConsumeIndex contains the index of the next descriptor going to be transmitted by
the hardware. When TxProduceIndex == TxConsumeIndex, the transmit buffer is empty.
When TxProduceIndex == TxConsumeIndex -1 (taking wraparound into account), the
transmit buffer is full and the software driver cannot add new descriptors until the
hardware has transmitted one or more frames to free up descriptors.
Fig 29. Transmit descriptor memory layout
1
2
3
4
5
StatusInfo
StatusInfo
StatusInfo
StatusInfo
StatusInfo
StatusInfo
PACKET
CONTROL
PACKET
CONTROL
PACKET
CONTROL
PACKET
CONTROL
PACKET
CONTROL
PACKET
CONTROL
TxStatus
TxDescriptorNumber
TxDescriptor
DATA BUFFER
DATA BUFFER
DATA BUFFER
DATA BUFFER
DATA BUFFER
DATA BUFFER