Using the Slave Interfaces
The slave interfaces connect the DMAC to the level 4 (L4) main bus and enable a microprocessor to access
the registers. Using these registers, a microprocessor can perform the following functions:
• Access the status of the DMA manager thread
• Access the status of the DMA channel threads
• Enable or clear interrupts
• Enable events
• Execute an instruction for the DMAC by programming the following debug registers:
•
DBGCMD
register
•
DBGINST0
register
•
DBGINST1
register
Issuing Instructions to the DMAC using a Slave Interface
When the DMAC is operating, you can only issue the following instructions:
•
DMAGO
—Starts a DMA transaction using a DMA channel that you specify
•
DMASEV
—Signals the occurrence of an event, or interrupt, using an event number that you specify
•
DMAKILL
—Terminates a thread
You must ensure that you use the appropriate slave interface, depending on the security state in which the
boot_manager_ns
signal initializes the DMAC. For example, if the DMAC is in the Secure state, you
must issue the instruction using the secure slave interface, otherwise the DMAC ignores the instruction.
You can use the secure or non-secure slave interface to start or restart a DMA channel when the DMAC is
in the Non-secure state.
Before you can issue instructions using the debug instruction registers or the
DBGCMD
register, you
must read the
DBGSTATUS
register to ensure that debug is idle, otherwise the DMAC ignores the
instructions.
Note:
The DMAC immediately processes any instructions received from a slave interface, unless the pipeline is
busy processing another instruction.
Prior to issuing
DMAGO
, you must ensure that the system memory contains a suitable program for
the DMAC to execute, starting at the address that the
DMAGO
specifies.
Note:
Using DMAGO with the Debug Instruction Registers
The following example shows the necessary steps to start a DMA channel thread using the debug instruction
registers:
1. Create a program for the DMA channel.
2. Store the program in a region of system memory.
3. Program one of the slave interfaces on the DMAC to a
DMAGO
instruction as follows:
a. Poll the
DBGSTATUS
register to ensure that debug is idle, and the
dbgstatus
bit is 0
b. Write to the
DBGINST0
register and enter all of the following:
Altera Corporation
DMA Controller
16-9
Using the Slave Interfaces
cv_54016
2013.12.30