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.

Errors in EDMA Data Transfer

Other Parts Discussed in Thread: TMS320C6678

Hi,

                I am trying to transfer a Block  of data from one array to another both residing in DDR RAM. But, after the transfer, i am getting incorrect results. The following is my Parameter Configuration:

myParam.option = CSL_EDMA3_OPT_MAKE(CSL_EDMA3_ITCCH_DIS, \
CSL_EDMA3_TCCH_DIS, \
CSL_EDMA3_ITCINT_DIS, \
CSL_EDMA3_TCINT_EN, \
0, CSL_EDMA3_TCC_NORMAL,\
CSL_EDMA3_FIFOWIDTH_NONE, \
CSL_EDMA3_STATIC_DIS, \
CSL_EDMA3_SYNC_AB, \
CSL_EDMA3_ADDRMODE_INCR, \
CSL_EDMA3_ADDRMODE_INCR );

myParam.srcAddr = (Uint32)&fprop[(5*102*34*34)+(34*34)+35];
myParam.aCntbCnt = CSL_EDMA3_CNT_MAKE(136,3400);
myParam.dstAddr = (Uint32)&f[((5*102*34*34)+34*34+36)];
myParam.srcDstBidx = CSL_EDMA3_BIDX_MAKE(136,136);
myParam.linkBcntrld= CSL_EDMA3_LINKBCNTRLD_MAKE(CSL_EDMA3_LINK_NULL,0);
myParam.srcDstCidx = CSL_EDMA3_CIDX_MAKE(0,1);
myParam.cCnt = 1;

But, if i do with the following the C Code, the results differ:

  Ex=102;Ey=34;Ez=34;

l=5;
for(i=1;i<=Xmax;i++)
{
       for(j=1;j<=Ymax;j++)
       {
            for(k=1;k<=Zmax;k++)
            {
                   c=k+1;
                   f[l*Ex*Ey*Ez+i*Ey*Ez+j*Ez+c]=fprop[l*Ex*Ey*Ez+i*Ey*Ez+j*Ez+k];
              }
        }
  }

Both f and fprop are floating point arrays. Other EDMA transfers are working fine.

Kindly, let me know if further information is required and also the reason for the error.

Thanks & Regards

Varun

  • What are the actual addresses of the Source and Destination as being programmed into the PaRAM?  

    What's the base address of f[] and fprop[] arrays?

    How are you validating the results?

    Best Regards,

    Chad

  • The Source and Destination addresses as programmed in PaRAM are 

    0x82accbac 0x82240e88

    The Base addresses of f[] ad fprop[] arrays are 

    0x82000008 0x8288bd30.

    fprop[] array is my source in PaRAM . Also, i am using C6678 MultiCore DSP Processor.

    For Validation, i have run my C code(Which involves memory transfers) without EDMA(Which gave me correct results) and then replaced the corresponding portion of code with EDMA. Also, the EDMA transfer is working for other cases. For ex. for data transfer between &fprop[4*102*34*34+34*34+34+1] and &f[4*102*34*34+2*34+1] with other parameters remaining same is giving me correct results.

    Regards,

    Varun

  • How big are these arrays?  

    Is there a reason you're starting the transfers in the middle/end of the arrays?  I suspect you may be transferring data that is outside the bounds of the array.

    Where are you checking the array's from, the beginning or starting from the offsets you used in the Arrays.

    Have you looked at the data to see what has been declared as being incorrect?  Can you provide these details?

    Best Regards,

    Chad

  • Hello Chad,

    Can you explain the meaning of parameter of CSL_Edma3ParamSetup. I don't know what it is use to do in the follow code:

        CSL_Edma3ParamSetup    myParamSetup;
        
        myParamSetup.srcAddr     = (Uint32)srcAddr;
        myParamSetup.aCntbCnt    = CSL_EDMA3_CNT_MAKE(4,512);//1.what's the meaning of 4 and 512?
        myParamSetup.dstAddr     = (Uint32)destAddr;
        myParamSetup.srcDstBidx  = CSL_EDMA3_BIDX_MAKE(4,4);//2.what's the meaning of 4 and 4?
        myParamSetup.linkBcntrld = CSL_EDMA3_LINKBCNTRLD_MAKE(0xFFFF,0);
        myParamSetup.srcDstCidx  = CSL_EDMA3_CIDX_MAKE(0,1);
        myParamSetup.cCnt        = 1;//3.what's the meaning of 1?

    Thank you!

    Regards,

    Jack

  • Jack,

    That's there if you want to directly program the EDMA PaRAM settings.  Each PaRAM entry takes up 8 32b words of the PaRAM memory.  The definetions of what all these are are in the EDMA3 User Guide which can be found on the product support page such as -> TMS320C6678 in the User Guide area.

    It looks like you left off the first portion of this.

    myParamSetup.option = CSL_EDMA3_OPT_MAKE(CSL_EDMA3_ITCCH_DIS, \

    CSL_EDMA3_TCCH_DIS, \
    CSL_EDMA3_ITCINT_DIS, \
    CSL_EDMA3_TCINT_EN,\
    0,CSL_EDMA3_TCC_NORMAL,\
    CSL_EDMA3_FIFOWIDTH_NONE, \
    CSL_EDMA3_STATIC_DIS, \
    CSL_EDMA3_SYNC_AB, \
    CSL_EDMA3_ADDRMODE_INCR, \
    CSL_EDMA3_ADDRMODE_INCR);

    Go to section 2.3.1 of the EDMA UG and you'll see how the bitfield definitions of the CSL code match the PaRAM entry bitfields.  This is used to program the EDMA with with the various fields.

    Best Regards,
    Chad 

  • Chad,

    Thank you! I get it.

    Regards,

    Jack