
NXP Semiconductors
PNX15xx/952x Series
Volume 1 of 1
Chapter 23: LAN100 — Ethernet Media Access Controller
PNX15XX_PNX952X_SER_N_4
NXP B.V. 2007. All rights reserved.
Product data sheet
Rev. 4.0 — 03 December 2007
23-715
5.5.1
Device Driver Sets Up Descriptors
After initializing the receive descriptor and status arrays to receive packets from the
Ethernet connection (as dened in
Section 5.3), the Receive Datapath should be
enabled via the MAC1 register and the Control register.
During initialization, each Packet pointer in the descriptors is set to point to a data
fragment buffer. The size of the buffer is stored in the Size bits of the Control eld of
the descriptor. Additionally the Control eld in the descriptor has an Interrupt bit which
allows generation of an interrupt after a fragment buffer has been lled and its status
has been committed to memory.
After the Receive Datapath is initialized and enabled, all descriptors are owned by the
receive hardware and should not be modied by the software unless hardware hands
over the descriptor by incrementing the RxProduceIndex indicating a packet has been
received. The device driver is allowed to modify the descriptors after a (soft) reset of
the Receive Datapath.
5.5.2
Rx DMA Manager Reads Rx Descriptor Arrays
When the RxEnable bit in the Command register is set, the Rx DMA manager reads
descriptors from memory with block transfers at the address determined by
RxDescriptor and RxProduceIndex. The LAN100 will start reading descriptors even
before actual receive data arrives on the MII interface (called
descriptor prefetching).
The block size of the descriptor read block transfer is determined by the total number
of descriptors owned by the hardware: RxConsumeIndex – RxProduceIndex – 1.
Transferring blocks of descriptors maximizes prefetching and minimizes memory
loading. Read data returned from the descriptor read operation is consumed per
descriptor, and only if needed.
5.5.3
Rx DMA Manager Receives Data
After reading the descriptor, the receive DMA engine waits for the MII Interface to
return receive data that pass the receive ltering process. Receive packets that do
not match the ltering criteria are not passed to memory. For more information on
ltering refer to
Section 5.12. Once a packet passes the receive lter, the data is
written in the descriptors fragment buffer in memory. The Rx DMA manager does not
write beyond the size of the buffer. In case a packet is received that is larger than a
descriptor’s fragment buffer, the packet will be written to multiple fragment buffers of
consecutive descriptors. If a multi-fragment packet is received, all but the last
fragment in the packet will return a status word with the Last bit set to 0. Only on the
last fragment of a packet is the Last bit set in the status word. If a fragment buffer is
the last of a packet, the buffer may not be lled completely. The rst receive data of
the next packet will be written to the next descriptor’s fragment buffer.
After receiving a fragment, the Rx DMA manager writes status information back to the
StatusInfo and StatusTimeStamp elds of the status word.The LAN100 writes the ll
level of a descriptor’s fragment buffer in the EntryLevel eld of the Status word. The
value of the RxProduceIndex is only updated after the fragment data and the
fragment status information has been committed to memory. This is checked by
sensing the write acknowledge signal returned from memory. The Rx DMA manager
continues to receive packets until the descriptor FIFO is full. If it becomes full, the