Altera Cyclone V Device Handbook page 830

Hide thumbs Also See for Cyclone V:
Table of Contents

Advertisement

16-34
DMALPEND[S | B]
Figure 16-13: DMALP Instruction Encoding
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
Assembler syntax
DMALPEND[S|B]
Altera Corporation
15
8
7 6
5 4 3 2 1 0
0
0
1
iter[7:0]
15
8
7
6 5
backwards_jump[7:0]
0
0
1
0
0
0
0
1c
4 3 2 1
0
nf
lc
bs x
1
cv_54016
2013.12.30
DMA Controller
Send Feedback

Advertisement

Table of Contents
loading

Table of Contents