CS8920A
be made to align with a double-word boundary.
The software remains in the loop until the DMA
frame count read is zero.
5.6 Auto-Switch DMA
Overview
The CS8920A supports a unique feature, Auto-
Switch DMA, that allows it to switch between
Memory or I/O mode and Receive DMA auto-
matically. Auto-Switch DMA allows the
CS8920A to realize the performance advantages
of Memory or I/O mode while minimizing the
number of missed frames that could result due to
slow processing by the host.
Configuring the CS8920A for Auto-Switch
DMA
Auto-Switch DMA mode requires the same con-
figuration as Receive-DMA-only mode, with one
exception: the AutoRxDMAE bit (Register 3,
RxCFG, Bit A) must be set, and the
RxDMAonly bit (Register 3, RxCFG, Bit 9)
must be clear (see Section 5.5.2). In Auto-Switch
DMA mode, the CS8920A operates in non-DMA
mode if possible, only switching to slave DMA
if necessary.
Note that if the AutoRxDMAE bit and the
RxDMAonly bit (Register 3, RxCFG, bit 9) are
both set, the CS8920A uses DMA for all receive
frames.
Auto-Switch DMA Operation
Whenever a frame begins to be received in Auto-
Switch DMA mode, the CS8920A checks to see
if there is enough on-chip buffer space to store a
maximum length frame. If there is, the incoming
frame is pre-processed and buffered as normal.
If there isn’t, the CS8920A’s MAC engine com-
pares the frame’s Destination Address (DA) to
the criteria programmed into the DA filter. If the
incoming DA fails the DA filter, the frame is dis-
DS238PP2
carded. If the DA passes the DA filter, the
CS8920A automatically switches to DMA mode
and starts transferring the frame(s) currently be-
ing held in the on-chip buffer into host memory.
This frees up buffer space for the incoming
frame.
Figure 5.8 shows the steps the CS8920A goes
through in determining when to automatically
switch to DMA.
Whenever the CS8920A automatically enters
DMA, at least one complete frame is already
stored in the on-chip buffer. Because frames are
transferred to the host in the same order as re-
ceived (first in, first out), the beginning of the
received frame that triggered the switch to DMA
Packet Received
Frame
Passed the No
DA filter?
Yes
Frame
Discarded
RxDMA only Yes
Bit=1
All Frames
use DMA
No
More
Buffer Space
Yes
Available?
Frame Buffered
in On-chip RAM
No
AutoRxDMA No
Bit=1?
Auto-Switch
DMA Disabled
Yes
Auto-Switch to DMA
Figure 5.8. Conditions for Switching to DMA
103