
Applied Micro Circuits Corporation
6195 Lusk Blvd., San Diego, CA 92121 (619) 450-9333
15-42
ADD-ON DMA CONTROLLER DESIGN FOR THE S5933
BE3.OE = HLDA;
/* HLDA indicates that the DMA controller may */
BE2.OE = HLDA;
/* become bus master.
All outputs are enabled*/
BE1.OE = HLDA;
/* when HLDA is asserted */
BE0.OE = HLDA;
nRDY_OUT.OE = HLDA;
nBLAST.OE = HLDA;
nADS.OE = HLDA;
[A7..0].OE = MASTER2;
/* Address outputs only enabled during MASTER2*/
[A15..8].OE = MASTER2;
/* which is the address phase of the transfer */
[A23..16].OE = MASTER2;
[A31..24].OE = MASTER2;
W_nR.OE = HLDA;
/* Shorthand notation for address and transfer count values */
BYTE0 = A7 & A6 & A5 & A4 & A3 & A2;
BYTE1 = A15 & A14 & A13 & A12 & A11 & A10 & A9 & A8;
BYTE2 = A13 & A22 & A21 & A20 & A19 & A18 & A17 & A16;
CBYTE0 = !C7 & !C6 & !C5 & !C4 & !C3 & !C2;
CBYTE1 = !C17 & !C16 & !C15 & !C14 & !C13 & !C12 & !C11 & !C10 & !C9 & !C8;
/* Need to know when count is below 4 data phases (double-words) for */
/* the MASTER state machine */
ONELEFT = CBYTE1 & !C7 & !C6 & !C5 & !C4 & !C3 & C2;
TWOLEFT = CBYTE1 & !C7 & !C6 & !C5 & !C4 &
C3 & !C2;
THREELEFT = CBYTE1 & !C7 & !C6 & !C5 & !C4 & C3 & C2;
/* A read indicates an S5933 read and an add-on Write.
A write */
/* indicates an S5933 write and an add-on read
*/
RD = RWCONT;
WR = !RWCONT;
/* STOP indicates a condition where the FIFO cannot support
*/
/* further transfers (empty or full) and the current burst must */
/* terminate.
*/
STOP = (RD & RDEMPTY) # (WR & WRFULL);
/* DONE indicates the transfer count is zero and transfers should */
/* stop.
*/
DONE = CBYTE0 & CBYTE1;
/* Increment address and decrement TC after each completed data
*/
/* phase.
Do not count if the read FIFO is empty or the write
*/
/* FIFO is full.
Run a dummy cycle and begin again when the
*/
/* transfer can continue.
This assumes a 1 clock RDY pulse.
CNT */
/* only toggles when the DMA controller is local bus master */
/* (HLDA=1).
*/