Ameba-D User Manual
User Manual All information provided in this document is subject to legal disclaimers. © REALTEK 2019. All rights reserved.
128
An arbitration scheme decides which of the request lines (2 * DMAH_NUM_CHANNELS) is granted the particular master bus interface. Each
channel has a programmable priority. A request for the master bus interface can be made at any time, but is granted only after the current
AHB transfer (burst or single) has completed. Therefore, if the master interface is transferring data for a lower priority channel and a higher
priority channel requests service, then the master interface will complete the current burst for the lower priority channel before switching to
transfer data for the higher priority channel.
To prevent a channel from saturating the master bus interface, it can be given a maximum AMBA burst length (MAX_ABRST field in CFGx
register) at channel setup time. This also prevents the master bus interface from saturating the AHB bus where the system arbiter cannot
change the grant lines until the end of an undefined length burst.
The following is the interface arbitration scheme employed when no channel has locked (Channel Locking) the arbitration for the master bus
interface:
If only one request line is active at the highest priority level, then the request with the highest priority wins ownership of the AHB master
bus interface; it is not necessary for the priority levels to be unique.
If more than one request is active at the highest requesting priority, then these competing requests proceed to a second tier of
arbitration.
If equal priority requests occur, then the lower-numbered channel is granted.
In other words, if a peripheral request attached to Channel 7 and a peripheral request attached to Channel 8 have the same priority, then
the peripheral attached to Channel 7 is granted first.
Note
: A channel source is granted before the destination if both have their request lines asserted when a grant decision is made. A channel
source and channel destination inherit their channel priority and therefore always have the same priority.
9.2.13
Scatter/Gather
Scatter is relevant to a destination transfer. The destination address is incremented or decremented by a programmed amount – the scatter
increment – when a scatter boundary is reached. Fig 9-43 shows an example destination scatter transfer. The destination address is
incremented or decremented by the value stored in the destination scatter increment (DSR
x
.DSI) field, multiplied by the number of bytes in a
single AHB transfer to the destination š (decoded value of CTLx.DST_TR_WIDTH)/8 – when a scatter boundary is reached. The number of
destination transfers between successive scatter boundaries is programmed into the Destination Scatter Count (DSC) field of the DSRx register.
Scatter is enabled by writing a 1 to the CTLx.DST_SCATTER_EN field. The CTLx.DINC field determines if the address is incremented,
decremented, or remains fixed when a scatter boundary is reached. If the CTLx.DINC field indicates a fixed-address control throughout a DMA
transfer, then the CTLx.DST_SCATTER_EN field is ignored, and the scatter feature is automatically disabled.
Gather is relevant to a source transfer. The source address is incremented or decremented by a programmed amount when a gather boundary
is reached. The number of source transfers between successive gather boundaries is programmed into the Source Gather Count (SGRx.SGC)
field. The source address is incremented or decremented by the value stored in the source gather increment (SGRx.SGI) field, multiplied by the
number of bytes in a single AHB transfer from the source – (decoded value of CTLx.SRC_TR_WIDTH)/8 – when a gather boundary is reached.
Gather is enabled by writing a 1 to the CTLx.SRC_GATHER_EN field. The CTLx.SINC field determines if the address is incremented, decremented,
or remains fixed when a gather boundary is reached. If the CTLx.SINC field indicates a fixed-address control throughout a DMA transfer, then
the CTLx.SRC_GATHER_EN field is ignored, and the gather feature is automatically disabled.
Note
: For multi-block transfers, the counters that keep track of the number of transfers left to reach a gather/scatter boundary are re-
initialized to the source gather count (SGRx.SGC) and destination scatter count (DSC), respectively, at the start of each block transfer.
Fig 9-43 shows an example of a destination scatter transfer.
Realtek confidential files
The document authorized to
SZ99iot
2019-05-15 10:08:03