cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
293 Views
Registered: ‎09-04-2019

Writing OCM in OCM / 2ms delay with 140 byte.

Hello:

       We are trying to let cpu0 (linux) to write data into the OCM (0xFFFF1000) with 140 byte  (Loop 35 times, writing 4byte each time).  Before writing, a soft interrupt is sent to cpu1 (bare), and a soft interrupt is sent to cpu1 after writting all the data.

       As we saw on the oscilloscope, the whole process of writing the data took 1-2ms.  I tried to write 280 byte, and then the time of writting up to 3-4ms. 

       Why it takes so long?

 

 

0 Kudos
2 Replies
Highlighted
Participant
Participant
226 Views
Registered: ‎10-08-2018

Re: Writing OCM in OCM / 2ms delay with 140 byte.

How did you map the OCM in linux?  If it is through UIO, for example, it is likely uncached.  While you may want uncached memory for coherency with the other CPU (depending on how it is set up) that will drastically reduce write performance since every write will be a bus cycle rather than bursting cache lines.


Nathan Sullivan - Senior Embedded Software Engineer - www.designlinxhs.com
Highlighted
195 Views
Registered: ‎09-04-2019

Re: Writing OCM in OCM / 2ms delay with 140 byte.

Many thanks for your reply. But i have solved my problem by modifying the  memory write function. Previuos i wrote the OCM  one address with one file_open. Now, i write the address for all the data with only one file_open. After that, the delay is reduced to about 500us .

0 Kudos