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++

Dma Stratix IV

Altera_Forum
Honored Contributor II
1,053 Views

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. 

 

 

Sincerely
0 Kudos
0 Replies
Reply