Figure 16-29: Unaligned to Aligned Program
The first
DMALD
instruction does not load sufficient data to enable the DMAC to execute a
DMAST
and
therefore the program includes an additional
DMALD
, prior to the start of the loop.
After the first
DMALD
, the subsequent
DMALD
s align with the source burst size. This optimizes the
p
performance but it requires a larger number of MFIFO buffer entries.
0
4
a
b
1
c
b
bn
c
c
d
e
8
Data from
DMALD
a
a
a
a
a
a
a
a
0
7
Data for
first DMAST
DMALD
DMAST
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
b
1
b
1
b
1
b
1
a
a
a
a
b
1
b
1
b
1
b
1
b
1
b
1
b
1
b
1
b
1
b
1
b
1
b
1
b
1
b
1
b
1
b
1
b
1
b
1
b
1
b
1
b
1
b
1
b
1
b
1
b
b
b
b b
1
b
1
b
1
b
1
Data for
14x DMAST
b
n
b
n
b
n
b
n
b
n
b
n
b
n
b
n
b
n
b
n
b
n
b
n
b
n
b
n
b
n
b
n
b
n
b
n
b
n
b
n
b
n
b
n
b
n
b
n
d
d
d
d b
n
b
n
b
n
b
n
Data for
last DMAST
The
DMALD
shown as d does not increase the MFIFO buffer usage because it loads four bytes into
an MFIFO buffer entry that the DMAC has already allocated to this channel.
Note:
This example has a static requirement of four MFIFO buffer entries and a dynamic requirement of four
MFIFO buffer entries.
Unaligned Source Address to Aligned Destination Address with Excess Initial Load
This program is an alternative to that described in
Unaligned Source Address to Aligned Destination Address
.
The program executes a different sequence of source bursts which might be less efficient, but require fewer
MFIFO buffer entries.
DMAMOV CCR, SB5 SS64 DB4 DS64
DMAMOV SAR, 0x1004
DMAMOV DAR, 0x4000
DMALD ; shown as a in the figure below
DMAST ; shown as b in the figure below
DMAMOV CCR, SB4 SS64 DB4 DS64
DMALP 14
DMALD ; shown as c and cn in the figure below
DMALPEND
DMAMOV CCR, SB3 SS64 DB4 DS64
DMALD ; shown as e in the figure below
DMAMOV CCR, SB1 SS32 DB4 DS64
DMALD ; shown as f in the figure below
Altera Corporation
DMA Controller
16-49
Unaligned Source Address to Aligned Destination Address with Excess Initial Load
cv_54016
2013.12.30