Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,028 Views

little 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 

Anil
0 Kudos
6 Replies
Altera_Forum
Honored Contributor I
54 Views

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 I
54 Views

Thanks for your time. The issue resolved .

Altera_Forum
Honored Contributor I
54 Views

 

--- Quote Start ---  

Thanks for your time. The issue resolved . 

--- Quote End ---  

 

 

How was this issue resolved?
Altera_Forum
Honored Contributor I
54 Views

By following the arguments shown in the prototype of driver implementation function calls .

Altera_Forum
Honored Contributor I
54 Views

Anil, where did you find your driver? Did you write it yourself?

anilinintel
Beginner
54 Views

yes