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.

Cache miss

Other Parts Discussed in Thread: OMAP3530

This is a part of YUV422 image resize function,

#pragma MUST_ITERATE(30,60,2)

 for(k = 0; k < height/4; k++)

{

    memcpy(g_acBuffA,(src->imageData+k*iSrcBufsz),iSrcBufsz); //(1)

     psrc = g_acBuffA; //g_acBuffA is located in L1D SRAM

     pdst = g_acBuffB; //g_acBuffB is located in L1D SRAM

//(2)

     #pragma MUST_ITERATE(4,4,4)

      for (j = 0; j < 4; j++) {

           #pragma MUST_ITERATE(358,718,2)

            for (i = 0; i < width - 2; i++)

           {

                  _mem4(pdst) = _amem4_const(psrc);

                  pdst += 3;

                  psrc += 4;

            }

             //last two iteration

            {

                   _mem4(pdst) = _amem4_const(psrc);

                  pdst += 3;

                  psrc += 4;

 

                   *pdst++ = *psrc++;

                   *pdst++ = *psrc++;

                   *pdst++ = *psrc++;

                    psrc += 1;

             }

             psrc += s_step;

        }

      //(3)

       memcpy((dst->imageData+k*iDesBufsz),g_acBuffB,iDesBufsz); //(4)

}

 

 (1) Copy source image data from DDR to L1D SRAM buffer A

(2)~(3) Resize image and store it to L1D SRAM buffer B

(4) Copy L1D SRAM buffer B to DDR

 

I used the CCSV3.3 profile tool and found (2) ~(3) has Large L1D Miss.

How can I get a high L1D hits?

 Thanks