| | 1 | = GIET-VM / DMA Driver = |
| | 2 | |
| | 3 | [[PageOutline]] |
| | 4 | |
| | 5 | The [source:soft/giet_vm/giet_drivers/dma_driver.c dma_driver.c] and [source:soft/giet_vm/giet_drivers/dma_driver.h dma_driver.h] files define the DMA driver. |
| | 6 | |
| | 7 | This ''vci_multi_dma'' component is a multi-channels DMA controller, that can replicated in all clusters (''internal'' peripheral). |
| | 8 | |
| | 9 | There is (NB_CLUSTERS * NB_DMA_CHANNELS) channels, indexed by a global index: |
| | 10 | dma_id = cluster_xy * NB_DMA_CHANNELS + local_index |
| | 11 | |
| | 12 | A DMA channel is a private ressource allocated to a given processor. It is exclusively used by the kernet to speedup data transfers, and |
| | 13 | there is no lock protecting exclusive access to the channel. As the kernel uses a polling policy on the DMA_STATUS register to detect |
| | 14 | transfer completion, the DMA IRQ is not used. |
| | 15 | |
| | 16 | The virtual base address of the segment associated to a channel is: |
| | 17 | SEG_DMA_BASE + cluster_xy * PERI_CLUSTER_INCREMENT + DMA_SPAN * local_index |
| | 18 | |
| | 19 | The SEG_DMA_BASE virtual address and PERI_CLUSTER_INCREMENT values must be defined in the hard_config.h file. |