733
/
838
Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
multiple descriptors, the intermediate descriptors are closed after acquisition;
5.
TxDMA waits for transmit status information and timestamp of the previous frame (provided that timestamp is
enabled). After receive status information, TDES0.OWN is cleared, indicating that ownership of descriptor is
handed over to CPU, and at the same time the relevant status information will be written to corresponding bit of
TDES0 by DMA;
6.
After transmit a complete frame, ETH_DMASTS.TI will be set only when TDES1.IC is 1. If DMA interrupt is
enabled, corresponding interrupt will be entered. If status information returned by previous frame is normal,
skip to step 3; if it indicates that there is a data underflow error, TxDMA enters suspended state and skips to step
7;
7.
If the pending status information and timestamp of a transmit frame are received in suspended state (provided
that timestamp is enabled), TxDMA will write this information into transmit descriptor and corresponding
TDES0.OWN cleared, then set relevant interrupt flag and return to suspend state;
8.
In suspended state, if any write operation is performed to register ETH_DMATXPD, TxDMA will return to
running state and try to re-acquire descriptor, and transmit underflow flag will be cleared. If there is pending
status information, skip to step 1 again; otherwise, skip to step 2 again.
RxDMA
25.4.8.4.1
Receive frame processing
When MAC receives the frame data, address filtering module also starts to work. If the frame does not pass address
filtering, MAC RxFIFO will discard frame and will not forward it to receiving buffer through RxDMA. Conversely,
if working in cut-through (threshold) mode and the received frame length is greater than or equal to the preset receive
threshold, or working in store-and-forward mode and a complete frame is stored in the RxFIFO, it will be forwarded
to the receive buffer. In the process of receiving a frame, if the data in RxFIFO is less than 64 bytes, the receiving
process collides, or the receiving frame is terminated in advance, the data in RxFIFO will be lost and will not be
forwarded.
When the forwarding conditions are met, RxDMA controller starts to transfer data from RxFIFO to the receive buffer.
If the current buffer contains SOF, RDES0.FS will be set when RxDMA controller writes back the frame receiving
state, indicating that the first part of the frame is stored in this descriptor. If the current buffer contains EOF,
RDES0.LS is set when RxDMA controller writes back the frame received state to indicate that this descriptor stores
the last part of the frame. Usually when the receive buffer size is larger than the length of the received frame,
RDES0.FS and RDES0.LS will be set in the same descriptor. When the buffer receives EOF, or the buffer of the
current descriptor is not enough to store the entire frame, RxDMA will get the next receive descriptor and clear the
RDES0.OWN of the previous descriptor to close the previous descriptor. When RDES1.DIC = 0 and RDES0.LS is
set, other states of the descriptor will also be updated and ETH_DMASTS.RI will be set; when RDES1.DIC = 1,
ETH_DMASTS.RI will not be set. When a new frame is received, if RDES0.OWN of the descriptor is 1, the above
RxDMA controller operation is repeated. If the descriptor's RDES0.OWN is 0, DMA controller enters the pending
state and sets ETH_DMASTS.RU to 1. Record the current value of the descriptor list address pointer and use it as
the starting address of the descriptor after exiting the pending state.
25.4.8.4.2
RxDMA descriptor
RxDMA descriptor structure contains four 32-bit words, RDES0, RDES1, RDES2, and RDES3. If IEEE 1588