wiki:dma_driver

Version 1 (modified by alain, 10 years ago) (diff)

--

GIET-VM / DMA Driver

The dma_driver.c and dma_driver.h files define the DMA driver.

This vci_multi_dma component is a multi-channels DMA controller, that can replicated in all clusters (internal peripheral).

There is (NB_CLUSTERS * NB_DMA_CHANNELS) channels, indexed by a global index:

dma_id = cluster_xy * NB_DMA_CHANNELS + local_index

A DMA channel is a private ressource allocated to a given processor. It is exclusively used by the kernet to speedup data transfers, and there is no lock protecting exclusive access to the channel. As the kernel uses a polling policy on the DMA_STATUS register to detect transfer completion, the DMA IRQ is not used.

The virtual base address of the segment associated to a channel is:

SEG_DMA_BASE + cluster_xy * PERI_CLUSTER_INCREMENT + DMA_SPAN * local_index

The SEG_DMA_BASE virtual address and PERI_CLUSTER_INCREMENT values must be defined in the hard_config.h file.