In certain situations, the number of entries required to store the data loaded from a source is not a simple
calculation of amount of source data divided by MFIFO buffer width. The calculation of the number of
entries required is not simple when any of the following occur:
• The source address is not aligned to the AXI bus width.
• The destination address is not aligned to the AXI bus width.
• The transactions are to a fixed destination, that is, a non-incrementing address.
The
DMALD
and
DMAST
instructions each specify that an AXI transaction is to be performed. The amount
of data transferred by an AXI transaction depends on the values programmed in to the
CCR n
register and
the address of the transaction.
The following sections provide several example DMAC programs together with illustrations of the MFIFO
buffer usage.
These sections show MFIFO buffer usage in the following ways:
• A graph of the number of MFIFO buffer entries versus time
• A diagram of the byte-lane manipulation that the DMAC performs when data enters the MFIFO
buffer.
Note:
The numbers 0 and 7 in the MFIFO buffer diagrams indicate the byte lanes in the MFIFO buffer.
Note:
Related Information
Information about unaligned transfers available from the ARM info center website.
Aligned Transfers
Simple Aligned Program
The following program shows the MFIFO buffer usage. In this program, the source address and destination
address are aligned with the AXI data bus width.
DMAMOV CCR, SB4 SS64 DB4 DS64
DMAMOV SAR, 0x1000
DMAMOV DAR, 0x4000
DMALP 16
DMALD shown as a in figure below
DMALPEND
DMAEND
Altera Corporation
DMA Controller
16-45
Aligned Transfers
cv_54016
2013.12.30