Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
All support for Intel NUC 7 - 13 systems has transitioned to ASUS. Read latest update.

Dma Stratix IV

Honored Contributor II

Hi everybody, 


I am new on forums. 

I wanted to do a DMA with a StratixIV on a CentOS 6.5 in C with a driver. 

So to start, I search how to enable, set and configure the pci device. 

Which I did (with pci_enable, ...). 

I succeed to write in the virtual address provide by the BAR0 (pci_iomap). 

Then I wanted to make a DMA between the cpu and the Fpga ram, so I searched how to allocate and use a Dma buffer, thanks of the function dma_alloc_coherent. 

But among all the documentation I read, it didn't mention how to start / launch the dma. 

So I have a virtual address (provided by dma_alloc_coherent) and if I wrote in it it's very fast. For example to copy a file of 100 Mo. 

I concluded I was in the local RAM. 

Maybe I do a step wrong so do you have some explanations about the step of the dma ? 

I read a lot of free electron source and the DMA-API.txt. 

My BAR 0 has 256 MB. 

Thank you for your help. 



0 Kudos
0 Replies