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.

TMS320C6678 Multicore write EMIF16 problem

 

Hi,everybody

         I interface C6678 and FPGA via EMIF16. In my case, multicores will send data to FPGA at the same time via EMIF16. So I use hardware semaphore

to prevent simultaneous accesses to EMIF16 . EMIF16 Write function like this.

void Emif16Write(unsigned int *data,unsigned int len)

{

         while((CSL_semAcquireDirect(3)) == 0);//use 3 hardware semaphore to provent simutaneous access

         for(unsigned int i = 0; i < len; i++)

         {

                   *((unsigned int*)0x74000000) = *data++;  //All core send data to the same address

         }

         CSL_semReleaseSemaphore(3);

}

         All cores use Emif16Write() to send data to FPGA.

         But I meet a problem like this:

         firstly,Core 1 call Emif16Write():

         Short core1Data[5] = {1,2,3,4,5};

         Emif16Write(core1Data,5);

 

         And then core2 call  Emif16Write():

         Short core2Data[3] = {6,7,8};

         Emif16Write(core2Data,3);

 

         FPGA should received data sequence like        1,2,3,4,5,6,7,8.

         But sometimes FPGA received data sequence like 1,2,3,6,7,8,4,5.

         It seems like hardware semaphore didn't work.

         EMIF16 is configured as asynchronous mode. Or is there something like data cache inside EIMF16 module?

         Is there anyone can help me?

        

         Thanks a lot.

         acai