User manual

Table Of Contents
Zynq-7000 AP SoC Technical Reference Manual www.xilinx.com 282
UG585 (v1.11) September 27, 2016
Chapter 9: DMA Controller
DMASTPS P0
# Finish single loop
DMALPEND
# Flush the peripheral, in case the single transfers were in response
# to a burst request
DMAFLUSHP 0
DMAEND
9.4.4 Restart Channel using an Event
When the INTEN register is programmed to generate an event, the DMASEV and DMAWFE
instructions can be used to restart one or more DMA channels. Refer to the Interrupt Enable register
in Appendix B, Register Details.
The following sections describe the DMAC behavior when:
DMAC executes DMAWFE before DMASEV
DMAC executes DMASEV before DMAWFE
DMAC Executes DMAWFE before DMASEV
To restart a single DMA channel:
1. The first DMA channel executes DMAWFE and then stalls while it waits for the event to occur.
2. The other DMA channel executes DMASEV using the same event number. This generates an
event, and the first DMA channel restarts. The DMAC clears the event, one DMA{3:0}_ACLK cycle
after it executes DMASEV.
Multiple channels can be programmed to wait for the same event. For example, if four DMA channels
have all executed DMAWFE for event 12, then when another DMA channel executes DMASEV for
event 12, the four DMA channels all restart at the same time. The DMAC clears the event one clock
cycle after it executes DMASEV.
DMAC Executes DMASEV before DMAWFE
If the DMAC executes DMASEV before another channel executes DMAWFE, then the event remains
pending until the DMAC executes DMAWFE. When the DMAC executes DMAWFE, it halts execution
for one DMA{3:0}_ACLK cycle, clears the event, and then continues execution of the channel thread.
For example, if the DMAC executes DMASEV 6 and none of the other threads have executed
DMAWFE 6, then the event remains pending. If the DMAC executes DMAWFE 6 instruction for
channel 4 and then executes DMAWFE 6 instruction for channel 3, then:
1. The DMAC halts execution of the channel 4 thread for one DMA{3:0}_ACLK cycle.
2. The DMAC clears event 6.
3. The DMAC resumes execution of the channel 4 thread.