The Write DMA reads data from the Avalon-MM address space and writes to the PCIe address space. It
issues memory write TLPs on the PCIe link. The source address is in the Avalon-MM address space. The
destination address is in the PCIe address space.
The DMA Descriptor Controller records the completion status for read and write descriptors in separate
status tables. Each table has 128 dword entries that correspond to the 128 descriptors. The Descriptor
Controller writes a 1 to the
done
bit of the status dword to indicate successful completion. The Descriptor
Controller also sends an MSI interrupt for the final descriptor. After receiving this MSI, host software can
poll the
done
bit to determine status. The status table precedes the descriptor table in memory. The
Descriptor Controller does not write the
done
bit nor send an MSI as each descriptor completes. It only
writes the
done
bit or sends an MSI for the descriptor whose ID is stored in the
RD_DMA_LAST PTR
or
WR_DMA_LAST_PTR
registers. The Descriptor Controller supports out-of-order completions. Consequently,
it is possible for the
done
bit to be set before all descriptors have completed.
The status entries for the 128 descriptors are stored in the 128 consecutive dwords specified by the values
programmed into the
RC Read Descriptor Base
and
RC Write Descriptor Base
registers. The actual
descriptors are stored immediately after the status entries at offset 0x200 from the values programmed
into the
RC Read Descriptor Base
and
RC Write Descriptor Base
registers. The status and
descriptor table must be located on a 32-byte boundary in Root Complex memory.
Note: For example, if 128 descriptors are specified and all of them execute, then 127 is written to the
RD_DMA_LAST_PTR
or
WR_DMA_LAST_PTR
register to start the DMA. The DMA Descriptor
Controller only writes the
done
bit when descriptor 127 completes. To get intermediate status
updates, host software should write multiple IDs into the last pointer register. For example, to get
an intermediate status update when half of the 128 read descriptors have completed, host software
should complete the following sequence:
1. Program the
RD_DMA_LAST_PTR
= 63.
2. Program the
RD_DMA_LAST_PTR
= 127.
3. Poll the status dword for read descriptor 63.
4. Poll the status dword for read descriptor 127.
In systems that support out-of-order Read Completions the Descriptor Controller may complete
descriptors out of order. Consequently, the
done
status stored for descriptor
<n>
does not necessarily
mean that descriptors
<n-1>
and
<n -2>
have also completed. You must request the completion status for
every descriptor by writing the descriptor ID for every descriptor to
RD_DMA_LAST_PTR
or
WR_DMA_LAST_PTR
. Many commercial system Root Ports do return out-of-order Read Completions based
on optimized accesses to host memory channels.
UG-01145_avmm_dma
2015.11.02
DMA Descriptor Controller Registers
7-17
Registers
Altera Corporation
Send Feedback