Figure 11–28, Nxp semiconductors – NXP Semiconductors LPC24XX UM10237 User Manual

Page 242

Advertising
background image

UM10237_4

© NXP B.V. 2009. All rights reserved.

User manual

Rev. 04 — 26 August 2009

242 of 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 4 byte 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 8 byte 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

Advertising