High Performance DMA Controller
UG0331 User Guide Revision 15.0
240
8.2.0.5
Read Buffer Controller
The read buffer controller places the address and asserts the ready signal
to the AHB master (AHB-M1
or AHB-M2). Depending on the transfer direction, AHB-M1 or AHB-M2 initiates the data transfers from
internal data buffer to destination memory.
If the data buffer is empty or if the DMA controller pause bit is enabled, then the read buffer controller
initiates IDLE transfers on the AHB bus.
8.2.0.6
Data Buffer
The data buffer block is 32 bits wide and 8 words deep. Data buffer read/write operations are performed
on the rising edge of the clock signal. There are 4-bit read and write pointers that increment on read and
write.
The 3 least significant bits (LSBs) are used to address the 8 locations; the most significant bit (MSB) of
the read and write pointers is used to signal the data buffer empty and full.
8.2.0.6.1
Data Buffer Full and Empty
When the read pointer and write pointer are equal, the data buffer is empty. When the 3 LSBs of read
pointer and write pointer are equal and the MSBs of the read pointer and write pointer are not equal, the
data buffer is full.
8.2.1
Initialization
To initiate and setup DMA transactions, HPDMA has to be initialized. The initialization process starts with
a reset sequence followed by Channel configuration and interrupt configuration.
8.2.1.1
Reset
The HPDMA registers are reset on power-up. The HPDMA can be reset by configuring the Bit 17 of
SOFT_RESET_CR system register.
8.2.1.2
Descriptor Configuration
Before configuring each HPDMA channel, the round robin weight is specified if needed, using the
MASTER_WEIGHT_CR register or configuring the AHB bus matrix in Libero SoC.
To configure each HPDMA descriptor, the following registers have to be set:
•
Descriptor Control registers:
•
Direction: bit 1 of HPDMADXCR_REG (where X is 0 to 3)
•
Transfer size in bytes: bits[15:0] of HPDMADXCR_REG (where X is 0 to 3)
•
Enable Interrupts: bits[22:20] of HPDMADDXCR_REG (where X is 0 to 3)
•
32 bit Source memory start Address: bits[31:0] of HPDMADXSAR_REG (where X is 0 to 3)
•
32 bit Destination memory start Address: bits[31:0] of HPDMADXDAR_REG (where X is 0 to 3)
8.2.1.3
Interrupt
There are two interrupts: HPD_XFR_CMP_INT and HPD_XFR_ERR_INT from the HPDMA to the NVIC
on the Cortex-M3 processor. The interrupt signals are mapped to one of the IRQs in the Cortex-M3 NVIC
controller.
The interrupt signals are also mapped to the dedicated interrupt signal MSS_INT_M2F[9] and the
MSS_INT_M2F[22] of the fabric interface interrupt controller (FIIC).
This is to interrupt the user logic instantiated in the FPGA fabric. To enable HPDMA interrupts, the 9th bit
(HPD_XFR_CMP_INT_EN) and the 22nd bit (HPD_XFR_CMP_INT_EN) of INTERRUPT_ENABLE0
register (located at address 0x40006000) has to be set. The status of the interrupts to FIIC can be
determined by reading the 9th and 22nd bits of the INTERRUPT_REASON0 register (located at
0x40006008).
To determine the descriptor transfer status, monitor the Descriptor status register (HPDMADXSR, where
X is 0 to 3). Before start of transaction, the enabled Descriptor interrupt bits are to be cleared. Refer to
for clearing of interrupts.
Содержание SmartFusion2 MSS
Страница 1: ...UG0331 User Guide SmartFusion2 Microcontroller Subsystem ...
Страница 166: ...Cortex M3 Processor Reference Material UG0331 User Guide Revision 15 0 132 ...
Страница 200: ...Embedded NVM eNVM Controllers UG0331 User Guide Revision 15 0 166 Figure 87 System Builder Window ...
Страница 407: ...Universal Serial Bus OTG Controller UG0331 User Guide Revision 15 0 373 ...
Страница 806: ...Fabric Interface Controller UG0331 User Guide Revision 15 0 772 Figure 345 FIC Master AHB Lite Subsystem ...