RTD Embedded Technologies, Inc.
|
www.rtd.com
33
DM35425HR User’s Manual
6.2
BAR2
–
Functional Block Standard DMA
This section describes a standard DMA implementation is used by the Functional Blocks. There is a single DMA engine that services all of the
DMA channels used by the Function Block. Each DMA channel has a block of registers associated with it to configure the DMA channel, as
well as set up the descriptors for the buffers in system memory. In the sections below, “m” is used to enumerate the DMA channels, and “n” is
used to enumerate the buffer descriptors within a channel.
Table 16: DMA Registers
Offset
0x03
0x02
0x01
0x00
D + 0x00
FB_DMAm_Stat_Underflow
FB_DMAm_Stat_
Overflow
FB_DMAm_Setup
FB_DMAm_Action
D + 0x04
FB_DMAm_Current_Buffer
FB_DMAm_Count
D + 0x08
FB_DMAm_RD_FIFO_CNT
FB_DMAm_WR_FIFO_CNT
D + 0x0C
FB_DMAm_Last_Action
FB_DMAm_Stat_
Complete
FB_DMAm_Stat_
Invalid
FB_DMAm_Stat_
Used
D + 0x10
FB_DMAm_CTRL0
FB_DMAm_STAT0
Reserved
D + 0x14
Reserved
FB_DMAm_SIZE0
D + 0x18
FB_DMAm_ADDRESS0
D + 0x1C
D + 0x20
FB_DMAm_CTRL1
FB_DMAm_STAT1
Reserved
D + 0x24
Reserved
FB_DMAm_SIZE1
D + 0x28
FB_DMAm_ADDRESS1
D + 0x2C
…
D + 0x10 +
(0x10 * n)
FB_DMAm_CTRLn
FB_DMAm_STATn
Reserved
D + 0x14 +
(0x10 * n)
Reserved
FB_DMAm_SIZEn
D + 0x18 +
(0x10 * n)
FB_DMAm_ADDRESSn
D + 0x1C +
(0x10 * n)
6.2.1
FB_DMA
M
_A
CTION
(R
EAD
/W
RITE
)
This register is the overall control for this DMA channel. After writing to the Action register, the user should poll the Last_Action register (below)
until it reads the same value. This shows that the action has been performed by the DMA state machine. This is especially important when
entering and exiting the Clear state.
0x00 = Clear: Clear the Current Buffer field, the internal offset counters, and the FIFO. DMA is stopped.
0x01 = Go: Starts DMA
0x02 = Pause: DMA transfers are stopped, but all internal registers maintain their state. During PAUSE you will still receive
Stat_Underflow and Stat_Overflow interrupts. After PAUSE, you may transition to GO or CLEAR.
0x03 = Halt: Buffer has been filled that has the HALT bit set, attempted to use a buffer with the
bit cleared. After HALT, you
must transition to CLEAR.
NOTE: The DMA engine also writes to this register when a buffer is
completed with the HALT bit set, or it encounters an invalid buffer.
When changing this register from the Go to the Clear state, be sure to
read it back to make sure the DMA engine did not change it to the Halt
state.
6.2.2
FB_DMA
M
_LAST_ACTION
(READ/WRITE)
The DMA Engine writes the value of FB_DMAm_Action to this register after it has completed the action. This indicates to the user that
the last command has been processed. It specifically aids the transition to the Clear state. When transitioning to Clear, the user should
wait until FB_DMAm_Last_Action indicates that the Clear has been processed before initiating any other Action changes.