This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

is possible transfer pBuf data with EDMA3 automatically?

Hi,

I am using a TMDSEVM6678le . I am using UDP daemon to get data arriving.


The information is received through pBuf  buffer and I see this buffer change its memory address. So  for this I copy every string  I get in pBuf  to a buffer I have defined, buffer A, all this in core 0(master). This is not so good because  I have to do another transfer to slave cores when the buffer is full.

I can copy the buffer to   slave cores using edma3 but I still have to copy the pBuf to buffer A .

So I was wondering how to do a transfer automatically from pBuff to another section of memory using edma3. I mean  it needs to do a  fixed memory addressing in order to program the edma parameters and it would be to have 100 pBuf messages before to trigger the transfer.

I watch the pBuf behavior but it is not so clear how it is working, the only celar  is it is changing the memory address.

So I hope someone could help me to know if this is possible.

This how I get pBuf inside callback function of DaemonNew definition

    i = (int)recvncfrom( s, (void **)&pBuf, 0, (PSA)&sin1, &sizeof(sin1), &hBuffer );

Here how  I am defined the size of buffer used for recvfrom:

     rc = 10 * 8192; CfgAddEntry( hCfg, CFGTAG_IP, CFGITEM_IP_SOCKTCPRXLIMIT, CFG_ADDMODE_UNIQUE, sizeof(uint), (UINT8 *)&rc, 0 );

Thanks in advance and happy new year.

Julian

  • Hi Julian,

    It is not very clear what you are trying to do here. To maximize your chance of getting help, can you clarify the flow here a bit more?

    Murat

  • Murat,

    the main idea is not transfer string by string arriving to pBuf to a myArray[i][200], instead I am asking

    if it is possible declare or access, if this is alredy set, a pBuf[i][200] that could be used for recvfrom() to store arriving strings. I understand there is  a buffer and I guess that is the reason pBuf address is changing constantly.

    This is in order to do a bulk transfer of strings from pBuf[i][200] to myArray[i][200], i variable  takes values from 1 to 1000, using edma3.

    So the  question is what is they way to access, with edma3, the data in reception buffer (usually pBuf). Or if this is not possible what is the more efficient way to do bulk transfers from received data of udp or tcp to another memory section.

    I hope this clarify what I need to do.

     I would appreciate any help

    Julian

  • Hi Julian,

    If I understand it correctly, you don't have control over the addresses stored in the pBuf[] array. That would make it difficult to issue a single EDMA bulk transfer. If you could establish a constraint such that the addresses stored in the pBuf[] array were fixed width apart, eg. pBuf[i+1] - pBuf[i] == <constant-offset>, then you could submit a 2D transfer where the <1D> dimension (ACNT)  is the max-string-size stored, and the 2D dimension (BCNT) is the count of pBuf entries you want to bulk transfer. Then you would set the source address to pBuf[i], and source-index to <constant-offset>. You would do the same for the destination addresses and index using myArray[].

    If you don't have control over the pBuf[i] address allocation, then the only other way would be using linked transfers where you configure each transfer's paRam setting with the pbuf[i] address, ... however this would be still quite expensive: (1) resource management wise, you would have to acquire/reserve large number of PaRams for each individual transfer in the link-set, (2) programming those would also require some CPU overhead. So you might be almost better of doing memcpy unless there is some other clever approach that can be devised.

    Murat

  • Murat,

    thanks for your answer.

    You are right it will be a high cost implementing a data transfer where the parameters are changing every time a message in pBuf is received.

    Actually, I have implemented this transfer using  memcpy.  I just wanted to improve the performance of transfers. I will keep using this approach if I does not find a better way to do this.

    Thank you very much.

    Julian