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.

TMS320C6713B: Logic forum

Part Number: TMS320C6713B

I am making Active Noise Cancellation system. And I made prototype control code. But I have a problem now.

When I operate this code, because of length of filter, Overhead is happened.

I command to my project operating 8khz. but my code operate 4khz.

------------------------------------------- here is my vector processing code --------------------------------------------------------

#define Length = 100

float A[Length];

float B[Length];

float C;

float D[Length];

-------------------------------------------- interrupt service routine --------------------------------------------------------------------

   for ( i = Length-1; i >= 1; i -- )

   {

      A[i] = A[i-1];

   }

   A[0] = B;

   // Normalization

   Norm = 1.0f;

   for ( i = Length-1 ; i >= 0 ; i-- )

   {

      Norm += A[i]*A[i];

   }

   // model output

   for ( i = Length-1; i >= 0; i -- )

   {

       C += D[i]*A[i];

   }

   // Modeling error
   error = yn_e[0] - Model_out;

   //LMS algorithm
   mu = 0.001f;
   alpha = mu*error/Norm;

   for ( i = Length-1; i >=0; i-- )

   {

       D[i] += alpha*A[i];

   }

-------------------------------------- code end -----------------------------------------------------

This code have four 'for' loop. And these loop is organized serial.

I think that overhead is happened due to serial connection between 'for' loop.

Can you suggest to me some advice?

  • Please check your compiler output for the for loops and see if they are being optimized correctly. Also please confirm that you are using -o3 option with the compiler so the code generated is optimized and not the reason for the latency.  Ensure that you are running timing critical code from DSP L2 memory and not from SDRAM or other onchip memory.

    I would recommned reviewing the tips that we provide in the application notes here:

    www.ti.com/.../sprabf2.pdf