![](http://datasheet.mmic.net.cn/110000/GT-96100A_datasheet_3491740/GT-96100A_263.png)
GT-96100A Advanced Communication Controller
Revision 1.0
263
12.3.3 Receive Operation
In order to initialize a receive operation, the CPU must do the following:
1. Prepare a chained list of descriptors and packet buffers.
NOTE: The RxDMA supports four priority queues. If the user wants to take advantage of this capability, a sep-
arate list of descriptors and buffers should be prepared for each of the priority queues.
2. Write the pointer to the first descriptor to the DMA’s first and current descriptor registers (RxFDP,
RxCDP) associated with the priority queue to be started. If multiple priority queues are needed, the user
has to initialize TxFDP and TxCDP for each queue.
3. Initialize and enable the Ethernet port by writing to the port’s configuration and command registers.
4. Initialize and enable the DMA channel by writing to the DMA’s configuration and command registers.
After completing these steps, the port starts waiting for a receive frame to arrive at the MII interface. When this
occurs, receive data is packed and transferred to the RxFiFO. At the same time, address filtering test is done in
order to decide if the packet is destined to this port. If the packet passes address filtering check, a decision is
made regarding the destination queue to which this packet should be transferred. When this is done, actual data
transfer to memory takes place.
NOTE: Packets which fail address filtering are dropped and not transferred to memory.
For packets that span more than one buffer in memory, the DMA will fetch new descriptors as necessary. How-
ever, the first descriptor pointer will not be changed until packet reception is done.
When reception is completed, status is written to the first longword of the first descriptor, and the Next Descrip-
tor’s address is written to both first and current descriptor pointer registers. This process is repeated for each
received packet.
NOTES:The RxCDP and RxFDP point to the same descriptor whenever the DMA is ready for receiving a new
packet. RxFDP is not modified during packet reception and points to the first descriptor. Only after the
packet had been fully received and status information was written to the first LW of the first descriptor,
will the ownership bit be reset (i.e. descriptor returned to CPU ownership).
Ownership of any descriptor other than the first is returned to CPU upon completion of data transfer to
the buffer pointed by that descriptor. This means that the first descriptor of a packet is the last descrip-
tor to return to CPU ownership (per packet).
12.3.3.1 RX DMA Descriptors
Figure 42 shows the format of RX DMA descriptors.
The following set of restrictions apply to RX descriptors:
Descriptor length is 4LW and it must be 4LW aligned (i.e. Descriptor_Address[3:0]=0000).
Descriptors reside anywhere in the CPU address space except NULL address, which is used to indicate
end of descriptor chain.
RX buffers associated with RX descriptors are limited to 64K bytes and must be 64-bit aligned. Mini-
mum size for RX buffers is 8 bytes.