Ameba-D User Manual
User Manual All information provided in this document is subject to legal disclaimers. © REALTEK 2019. All rights reserved.
94
blk_size_bytes_dma
= CTL
x
.BLOCK_TS *
src_single_size_bytes
(5)
Source peripheral is block flow controller
blk_size_bytes_src
= (Number of source burst transactions in block *
src_burst_size_bytes
) + (Number of source single
transactions in block *
src_single_size_bytes
)
(6)
Destination peripheral is block flow controller
blk_size_bytes_dst
= (Number of destination burst transactions in block *
dst_burst_size_bytes
)
+ (Number of destination single transactions in block *
dst_single_size_bytes
)
(7)
9.2.5
Memory Peripherals
Fig 9-5 shows the DMA transfer hierarchy of the DMAC for a memory peripheral. There is no handshaking interface with the DMAC, and
therefore the memory peripheral can never be a flow controller. Once the channel is enabled, the transfer proceeds immediately without
waiting for a transaction request.
The alternative to not having a transaction-level handshaking interface is to allow the DMAC to attempt AHB transfers to the peripheral once
the channel is enabled. If the peripheral slave cannot accept these AHB transfers, it inserts wait states onto the bus (by de-asserting hready)
until it is ready; it is not recommended that more than 16 wait states be inserted onto the bus. By using the handshaking interface, the
peripheral can signal to the DMAC that it is ready to transmit or receive data, and then the DMAC can access the peripheral without the
peripheral inserting wait states onto the bus.
Note
: If a channel is used exclusively for memory-to-memory DMA transfers – that is, no transaction-level handshaking on the source or
destination side – then set DMAH_MAX_MULT_SIZE to 4 in order to achieve logic optimization.
9.2.6
Handshaking Interface – Peripheral is Not Flow Controller
When the peripheral is not the flow controller, the DMAC tries to efficiently transfer the data using as little of the bus bandwidth as possible.
Generally, the DMAC tries to transfer the data using burst transactions and, where possible, fill or empty the channel FIFO in single bursts –
provided that the software has not limited the burst length. The DMAC can also lock the arbitration for the master bus interface so that a
channel is permanently granted the master bus interface. Additionally, the DMAC can assert the AMBA hlock signal to lock the AHB system
arbiter.
Before describing the handshaking interface operation when the peripheral is not the flow controller, the following sections define the terms
“Single Transaction Region” and “Early-Terminated Burst Transaction.”
9.2.6.1
Single Transaction Region
There are cases where a DMA block transfer cannot complete using only burst transactions. Typically, this occurs when the block size is not a
multiple of the burst transaction length. In these cases, the block transfer uses burst transactions up to the point where the amount of data left
to complete the block is less than the amount of data in aburst transaction. At this point, the DMAC samples the “single” status flag and
completes the block transfer using single transactions.
The peripheral asserts a single status flag to indicate to the DMAC that there is enough data or space to complete a single transaction from or
to the source/destination peripheral.
Note
: For hardware handshaking, the single status flag is a signal on the hardware handshaking interface.
The Single Transaction Region is the time interval where the DMAC uses single transactions to complete the block transfer; burst transactions
are exclusively used outside this region.
Note
: Burst transactions can also be used in this region.
The Single Transaction Region applies to only a peripheral that is
not
the flow controller. The precise definition of when this region is entered is
dependent on what acts as the flow controller:
The DMAC is the flow controller – The source peripheral enters the Single Transaction Region when the number of bytes left to complete
in the source block transfer is less than
src_burst_size
_
bytes.
If:
blk_size_bytes/src_burst_size
_
bytes = integer
(8)
then the source never enters this region, and the source block uses only burst transactions.
Realtek confidential files
The document authorized to
SZ99iot
2019-05-15 10:08:03