CS8900
5.5 Auto-Switch DMA
Overview
The CS8900 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 CS8900
to realize the performance advantages of Mem-
ory or I/O mode while minimizing the number of
missed frames that could result due to slow proc-
essing by the host.
Configuring the CS8900 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.4, Configuring the
CS8900 for DMA Operation). In Auto-Switch
DMA mode, the CS8900 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 CS8900 uses DMA for all receive
frames.
Auto-Switch DMA Operation
Whenever a frame begins to be received in Auto-
Switch DMA mode, the CS8900 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 CS8900’s MAC engine compares
the frame’s Destination Address (DA) to the cri-
teria programmed into the DA filter. If the
incoming DA fails the DA filter, the frame is dis-
carded. If the DA passes the DA filter, the
CS8900 automatically switches to DMA mode
and starts transferring the frame(s) currently be-
ing held in the on-chip buffer into host memory.
94
This frees up buffer space for the incoming
frame.
Figure 5.8 shows the steps the CS8900 goes
through in determining when to automatically
switch to DMA.
Whenever the CS8900 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
is not the first frame to be transferred. Instead,
the oldest non-committed frame in the on-chip
buffer is the first frame to use DMA. When
DMA begins, any pending RxEvent reports in
Packet Received
Frame
Passed the No
DA filter?
Yes
Frame
Discarded
RxDMA only Yes
Bit=1
No
All Frames
use DMA
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
DS150PP2