Direct Memory Access Controller (DMAC)
User Manual All information provided in this document is subject to legal disclaimers. © REALTEK 2019. All rights reserved.
171
9.4.1
Register Access
All registers are aligned to a 64-bit boundary and are 64 bits wide. In general, the upper 32 bits of a register are reserved. A write to reserved
bits within the register is ignored. A read from reserved bits in the register reads back 0. To avoid address aliasing, do one of the following:
(1)
The DMAC should not be allocated more than 1 KB of address space in the system memory map. If it is, then addresses selected above 1
KB from the base address are aliased to an address within the 1 KB space, and a transfer takes place involving this register.
(2)
Software should not attempt to access non-register locations when hsel is asserted.
Note
: The hsel signal is asserted by the system decoder when the address on the bus is within the system address assigned for DMAC.
9.4.2
Illegal Register Access
An illegal access can be any of the following:
(1)
A AHB transfer of hsize greater than 64 is attempted.
(2)
The hsel signal is asserted, but the address does not decode to a valid address.
(3)
A write to the SARx, DARx, LLPx, CTLx, SSTATx, DSTATx, SSTATARx, DSTATARx, SGRx, or DSRx registers occurs when the channel is enabled.
(4)
A read from the ClearBlock, ClearDstTran, ClearErr, ClearSrcTran, ClearTfr is attempted.
(5)
A write to the StatusBlock, StatusDstTran, StatusErr, StatusSrcTran, StatusTfr is attempted.
(6)
A write to the StatusInt register is attempted.
(7)
A write to either the DmaIdReg or DMA Component ID Register register is attempted.
The response to an illegal access is configured using the configuration parameter DMAH_RETURN_ERR_RESP. When DMAH_RETURN_ERR_RESP
is set to True, an illegal access (read/write) returns an error response.
If DMAH_RETURN_ERR_RESP is set to False, an OKAY response is returned, a read returns back 0x0, and a write is ignored.
9.4.3
DMA Transfer Types
A DMA transfer may consist of single or multi-block transfers. On successive blocks of a multi-block transfer, the SAR
x
/DAR
x
register in the
DMAC is reprogrammed using either of the following methods:
Block chaining using linked lists
Auto-reloading
Contiguous address between blocks
On successive blocks of a multi-block transfer, the CTL
x
register in the DMAC is reprogrammed using either of the following methods:
Block chaining using linked lists
Auto-reloading
When block chaining, using Linked Lists is the multi-block method of choice. On successive blocks, the LLP
x
register in the DMAC is
reprogrammed using block chaining with linked lists.
A block descriptor consists of six registers: SARx, DARx, LLPx, CTLx, SSTATx, and DSTATx. The first four registers, along with the CFG
x
register,
are used by the DMAC to set up and describe the block transfer.
Note
: The term Link List Item (LLI) and block descriptor are synonymous.
9.4.3.1
Multi-Block Transfers
Multi-block transfers are enabled by setting the DMAH_CHX_MULTI_BLK_EN configuration parameter to True.
Note
: Multi-block transfers—in which the source and destination are swapped during the transfer—are not supported. In a multi-block
transfer, the direction must not change for the duration of the transfer.
Realtek confidential files
The document authorized to
SZ99iot
2019-05-15 10:08:03