Ameba-D User Manual
User Manual All information provided in this document is subject to legal disclaimers. © REALTEK 2019. All rights reserved.
110
9.2.8.1.5
Example 5
Scenario:
The destination peripheral enters the Single Transaction Region while the DMAC is the flow controller. This example also
demonstrates how the DMAC channel FIFO is flushed at the end of a block transfer to the destination. Consider the case with the parameters
set to values listed in Table 9-7.
Table 9-7 Parameters in transfer operation – Example 5
Parameter
Description
CTL
x
.TT_FC = 3’b011
Peripheral-to-peripheral transfer with DMAC as flow controller
CTL
x
.BLOCK_TS = 44
–
CTL
x
.SRC_TR_WIDTH = 3’b000
8 bits
CTL
x
.DST_TR_WIDTH = 3’b011
64 bits
CTL
x
.SRC_MSIZE = 3’b001
Source burst transaction length = 4
CTL
x
.DEST_MSIZE = 3’b001
Destination burst transaction length = 4
CFG
x
.MAX_ABRST = 1’b0
No limit on maximum AMBA burst length
DMAH_CH
x
_FIFO_DEPTH = 32 bytes
–
In this example, the block size is a multiple of the source burst transaction length:
blk_size_bytes_dma/src_burst_size_bytes
= (44 * 1)/4 = 11 =
integer
The source block transfer is completed using only burst transactions, and the source does not enter the Single Transaction Region.
The block size is not a multiple of the destination burst transaction length:
blk_size_bytes_dma/dst_burst_size_bytes
44/32 !=
integer
So near the end of the block transfer to the destination, the amount of data left to be transferred is less than
dst_burst_size_bytes
and the
destination enters the Single Transaction Region.
Fig 9-27 shows one way in which the block transfer to the destination can occur.
Fig 9-27 Block transfer to destination
After the first 32 bytes (
dst_burst_size_bytes = 32
) of the destination burst transaction have been transferred to the destination, there are 12
bytes (
blk_size_bytes_dma
-
dst_burst_size_bytes =
44 - 32) left to transfer. This is less then the amount of data that is transferred in a
destination burst (
dst_burst_size_bytes
= 32). Therefore, the destination peripheral enters the Single Transaction Region where the DMAC can
complete a block transfer to the destination using single transactions.
Note
:
In the Single Transaction Region, asserting dma_single initiates a single transaction for hardware handshaking.
The destination peripheral, not knowing the length of a block and only able to request burst transactions, sits and waits for the FIFO to
fall below a watermark level before requesting a new burst transaction request.
At time t2 in Fig 9-27, a single transaction to the destination has been completed. There are now only four bytes (12 -
dst_single_size_bytes =
12 - 8) left to transfer in the destination block. However, CTL
x
.DST_TR_WIDTH implies 64-bit AHB transfers to the destination
(
dst_single_size_bytes =
8 byte); therefore, the DMAC cannot form a single word of the specified CTL
x
.DST_TR_WIDTH.
Realtek confidential files
The document authorized to
SZ99iot
2019-05-15 10:08:03