
Registers PCI CD/CDa Configurable DMA Interface User’s Guide
20 EDT, Inc. May 2007
Figure 6. PCI Local Bus Addresses
Scatter-gather DMA
PCI Direct Memory Access (DMA) devices in Intel-based computers access memory using physical
addresses. Because the operating system uses a memory manager to connect the user program to
memory, memory pages that appear contiguous to the user program are actually scattered throughout
physical memory. Because DMA accesses physical addresses, a DMA read operation must gather
data from noncontiguous pages, and a write must scatter the data back to the appropriate pages. The
PCI CD/CDa driver uses information from the operating system to accomplish this. The operating
system passes the driver a list of the physical addresses for the user program memory pages. With
this information, the driver builds a scatter-gather (SG) table, which the DMA device uses sequentially.
Most other PCI computers offer memory management for the PCI bus as well, so the operating system
needs to pass only the address and count for DMA. The addresses appear contiguous to the PCI bus.
The scatter-gather DMA list is stored in memory. The scatter-gather DMA channel copies it as
required into the main DMA registers. The format of the DMA list in memory is as follows (illustrated
in Figure 7):
• Each page entry takes eight bytes. Therefore, the scatter-gather DMA count is always evenly di-
visible by eight.
• The first word consists of the 32-bit start address of a memory page.
• The most significant 16 bits of the second word contain control data.
• The least significant 16 bits of the second word contain the count.
Only bit 16 contains control information. When set to one, and when enabled by setting bit 28 of the
Scatter-gather DMA Next Count and Control register, this bit causes the main DMA interrupt to be set
when the marked page is complete.
Address Bits
31 16 15 0
0xCC UI Xilinx data
0xC8 PCI interrupt status
0xC4 PCI interrupt and UI Xilinx configuration
0x84 not used flash ROM data
0x80 flash ROM address
0x20 not used
0x1C scatter-gather DMA next count and control
0x18 scatter-gather DMA current count and control
0x14 scatter-gather DMA next address
0x10 scatter-gather DMA current address
0x0C main DMA next count and control
0x08 main DMA current count and control
0x04 main DMA next address
0x00 main DMA current address
Byte 3 2 1 0
Word 1 0
Kommentare zu diesen Handbüchern