
Applied Micro Circuits Corporation
6195 Lusk Blvd., San Diego, CA 92121 (619) 450-9333
15-37
ADD-ON DMA CONTROLLER DESIGN FOR THE S5933
3.2
Controlling S5933 PCI Bus Mastering with AMREN and AMWEN
For S5933 applications implementing add-on initiated bus mastering, the AMREN and AMWEN inputs enable
the S5933 to become a PCI bus master. These signals can be sourced from the DMA controller and asserted
when the controller is ready to service DMA requests. If add-on transfer counts are enabled for the S5933, this
function is not required, as the AMREN and AMWEN may remain asserted and PCI bus mastering is internally
enabled by a non-zero transfer count value.
AMREN should be asserted for DMA S5933 reads (RWCONT=1) and AMWEN should be asserted for DMA
S5933 writes (RWCONT=0). Once the DMA controller is initialized (address and transfer count written), the
appropriate enable should be asserted. When the transfer count reaches zero, the enable must be deasserted,
and the FIFO pointers should be reset (using FRC# for the PCI to add-on FIFO and FWC# for the add-on to PCI
FIFO). It is only really necessary to reset the PCI to add-on FIFO because extra data may have been read which
is not required. This must be flushed from the FIFO. Extra data does not enter the add-on to PCI FIFO without
WRFIFO# being asserted, the DMA controller logic prevents this.
The following PLD equation modifications are required to implement this function:
/* Inputs */
Pin
=
FWE;
/* Add-on to PCI FIFO Empty indicator */
/* Outputs */
Pin
=
nFRC;
/* PCI to add-on FIFO reset */
Pin
=
AMREN;
/* PCI to add-on FIFO PCI master enable */
Pin
=
AMWEN;
/* Add-on to PCI FIFO PCI master enable */
/* Logic Equations */
AMREN = !DONE & RD;
/* Assert for reads with tc != zero */
AMWEN = (!DONE # !FWE) & WR;
/* Assert for writes with tc != zero and */
/* FIFO not empty. The transfer count can */
/* decrement to zero, but bus master writes */
/* still remain, FWE indicates when the FIFO */
/* has finished all transfers */
nFRC = !(DONE & MASTER7 & RD); /* Assert the PCI to add-on FIFO reset */
/* during the recovery phase when the */
/* transfer count reaches zero */
3.3
Programming the DMA Controller with the Pass-thru Interface
Some applications may not implement a processor or intelligent logic on the add-on interface. This requires an
alternate method to program the DMA controller address and transfer count registers. The S5933 pass-thru
interface provides a simple method to perform this task with the host CPU. A Base Address Register is required
to define a pass-thru region for the DMA registers. An 8 byte I/O region is all that is needed (a decode of the
S5933 PTNUM1:0 outputs and pass-thru address line A2 are used for the add-on address decode).
Not implementing an add-on processor changes a number of things in the PLD. HOLD and HLDA are no longer
required, as the DMA controller is always add-on bus master in this implementation. RDY_OUT# is no longer
required (as it acted as a ready indicator to the 960 processor). RDY_OUT# is replaces with PTRDY#, which
indicates a pass-thru access to a DMA controller register is now complete. PTATN# acts as a request for the
DMA controller to read the pass-thru data register (writing the address or transfer count register).