PC104P-SIO4BX User Manual, Revision: 0
General Standards Corporation
8302A Whitesburg Drive Huntsville, AL 35802, Phone: (256) 880-8787
3.3
PCI DMA
The PCI DMA functionality allows data to be transferred between host memory and the SIO4BX onboard FIFOs
with the least amount of CPU overhead. The PCI9080 bridge chip handles all PCI DMA functions, and the device
driver should handle the details of the DMA transfer. (Note: DMA refers to the transfer of Data from the on-board
FIFOs over the PCI bus. This should not be confused with the DMA mode of the USC – transfer of data between the
USC and the on-board FIFOs. This On-Board DMA is setup by the driver and should always be enabled).
There are two PCI DMA modes – Demand Mode DMA and Non-Demand Mode DMA. Demand Mode DMA
refers to data being transferred on demand. For receive, this means data will be transferred as soon as it is received
into the FIFO. Likewise, for transmit, data will be transferred to the FIFOs as long as the FIFO is not full. The
disadvantage to Demand Mode DMA is that the DMA transfers are dependent on the user data interface. If the user
data transfer is incomplete, the Demand mode DMA transfer will also stop. If a timeout occurs, there is no way to
determine the exact amount of data transferred before it was aborted.
Non-Demand Mode DMA does not check the FIFO empty/full flags before or during the data transfer – it simply
assumes there is enough available FIFO space to complete the transfer. If the transfer size is larger than the available
data, the transfer will complete with invalid results. This is the preferred mode for DMA operation. The FIFO
Counters may be used to determine how much space is available for DMA so that the FIFO will never over/under
run. Demand Mode DMA requires less software control, but runs the risk of losing data due to an incomplete
transfer. The GSC Windows API uses this method (Non-Demand DMA and checking the FIFO counters) as the
standard transfer method.
3.4
Interrupts
The SIO4BX has a number of interrupt sources which are passed to the host CPU via the PCI Interrupt A. Since
there is only one physical interrupt source, the interrupts pass through a number of “levels” to get multiplexed onto
this single interrupt. The interrupt originates in the PCI9080 PCI Bridge, which combines the internal PLX interrupt
sources (DMA) with the local space interrupt. The driver will typically take care of setting up and handling the
PCI9080 interrupts. The single Local Interrupt is made up of the interrupt sources described in Section 2.1.10. In
addition, the Zilog USC contains a number of interrupt sources which are combined into a single Local Interrupt.
The user should be aware that interrupts must be enabled at each level for an interrupt to occur. For example, if a
USC interrupt is used, it must be setup and enabled in the USC, enabled in the GSC Firmware Interrupt Control
Register, and enabled in the PCI9080. In addition, the interrupt must be acknowledged and/or cleared at each level
following the interrupt.