UM10237_2 © NXP B.V. 2008. All rights reserved.
User manual Rev. 02 — 19 December 2008 241 o f 792
NXP Semiconductors UM10237
Chapter 11: LPC24XX Ethernet
Receive descriptors are stored in an array in memory. The base address of the array is
stored in the RxDescriptor register, and should be aligned on a 4byte address boundary.
The number of descriptors in the array is stored in the RxDescriptorNumber register using
a minus one encoding style e.g. 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 RxStatus register, and must be aligned on an 8byte address
boundary. During operation (when the receive datapath is enabled) the RxDescriptor,
RxStatus and RxDescriptorNumber registers should not be modified.
Two registers, RxConsumeIndex and RxProduceIndex, define the descriptor locations
that will be used next by hardware and software. Both registers act as counters starting at
0 and wrapping when they reach the value of RxDescriptorNumber. The RxProduceIndex
contains the index of the descriptor that is going to be filled with the next frame being
received. The RxConsumeIndex is programmed by software and is the index of the next
descriptor that the software receive driver is going to process. When RxProduceIndex ==
RxConsumeIndex, the receive buffer is empty. When RxProduceIndex ==
RxConsumeIndex -1 (taking wraparound into account), the receive buffer is full and newly
received data would generate an overflow unless the software driver frees up one or more
descriptors.
Fig 28. Receive descriptor memory layout
1
2
3
4
5
StatusInfo
StatusHashCRC
StatusInfo
StatusHashCRC
StatusInfo
StatusHashCRC
StatusInfo
StatusHashCRC
StatusInfo
StatusHashCRC
StatusInfo
StatusHashCRC
PACKET
CONTROL
PACKET
CONTROL
PACKET
CONTROL
PACKET
CONTROL
PACKET
CONTROL
PACKET
CONTROL
RxStatus
RxDescriptorNumber
RxDescriptor
DATA BUFFER
DATA BUFFER
DATA BUFFER
DATA BUFFER
DATA BUFFER
DATA BUFFER