
Figure 16-13: DMALP Instruction Encoding
0
7 6
5 4 3 2 1 0
15
8
iter[7:0]
1c
0
0
0
0
1
0
Assembler syntax
DMALP <loop_iterations>
where:
<loop_iterations>
Specifies the number of loops to perform, range 1-256.
• The assembler determines the loop counter register to use and either:
• Sets
lc
to 0, and the DMAC writes the value loop_iterations minus 1 to the loop counter 0 registers
• Sets
lc
to 1, and the DMAC writes the value loop_iterations minus 1 to the loop counter 1 registers.
Operation
You can only use this instruction in a DMA channel thread.
DMALPEND[S | B]
Loop End indicates the last instruction in the program loop but the behavior of the DMAC depends on
whether
DMALP
or
DMALPFE
starts the loop. If a loop starts with:
•
DMALP
The loop has a defined loop count and
DMALPEND[S|B]
instructs the DMAC to read the value
of the loop counter register. If a loop counter register returns:
• Zero—The DMAC executes a
DMANOP
and therefore exits the loop.
• Nonzero—The DMAC decrements the value in the loop counter register and updates the thread PC
to contain the address of the first instruction in the program loop, that is, the instruction that follows
the
DMALP
.
•
DMALPFE
The loop has an undefined loop count and the DMAC uses the state of the
request_last
flag to control when it exits the loop. If the
request_last
flag is:
• 0—The DMAC updates the thread PC to contain the address of the first instruction in the program
loop, that is, the instruction that follows the
DMALP
.
• 1—The DMAC executes a
DMANOP
and therefore exits the loop.
Figure 16-14: DMALPEND[S|B] Instruction Encoding
7
6 5
4 3 2 1
0
15
8
backwards_jump[7:0]
0
lc
nf
0
bs x
1
1
Assembler syntax
DMALPEND[S|B]
DMA Controller
Altera Corporation
cv_54016
DMALPEND[S | B]
16-34
2013.12.30