Forum Discussion
Altera_Forum
Honored Contributor
8 years agolittle problem in understanding MODULAR sgDMA ?
hello all,
I have created a SoC in platform designer which have a modular SG-DMA. I have a confusion on what to pass the arguments while using HAL API function calls. ex: alt_msgdma_standard_descriptor_async_transfer( argument 1 , argument 2); argument 1 : it is simply a pointer to msgdma instance (i have clarity on this) argument 2 : <alt_msgdma_standard_descriptor *desc> which says *desc : a pointer to a standard descriptor structure. In the address editor of qsys tool , descriptor port of msgdma has 0x0208_1040 address. what should i give in this argument 2. ??? The same confusion while using another API : alt_msgdma_construct_standard_mm_to_mm_descriptor (arg1,arg2,arg3,arg4,arg5,arg6); arg1 : device instance arg2 : a pointer to a standard descriptor structure (????) arg3 : read_address arg4 : write_address arg5 : length arg6: control coming to hardware part, It has nios, ocm,msgdma, myown 4kb memory (burst capable) acts as source, another instance as destination. I am attaching c file and as well as qsys IP integration. my questions are 1. am i missing any other function call 2. how to use the arg2 as i asked above. 3. any fundamental mistake is there in my SoC ,please check zip file. please somebody help me to sort out this issue. Hope this will resolve this time at-least. Thanks Anil6 Replies
- Altera_Forum
Honored Contributor
I have never used the driver but it's documented in chapter 26 of this document: https://www.altera.com/content/dam/altera-www/global/en_us/pdfs/literature/ug/ug_embedded_ip.pdf
It looks like you call the construction API to create your descriptor then you pass it into the transfer function so that the driver will send the descriptor to the DMA. - Altera_Forum
Honored Contributor
Thanks for your time. The issue resolved .
- Altera_Forum
Honored Contributor
--- Quote Start --- Thanks for your time. The issue resolved . --- Quote End --- How was this issue resolved? - Altera_Forum
Honored Contributor
By following the arguments shown in the prototype of driver implementation function calls .
- Altera_Forum
Honored Contributor
Anil, where did you find your driver? Did you write it yourself?
- anilinintel
Occasional Contributor
yes