Andy,

Don't get me wrong by personally I think you don't exactly follow DMA rules in your algorithm. It seems that for some reason you access the output buffers both by CPU and DMA. Thus some part of data are left in cache, and some are in external memory. GT_trace probably access all your data by CPU thus performing automatic write-back when cache runs out. Are you 100% sure your data is coherent upon returning from the process call, presumably all in external memory?

Hope you figure out the way and share this with community. I would certainly want to see what's going on, sine I had strange cache coherency problems myself...
Best,

Andy Ngo wrote:
According to a previous post (http://www.mail-archive.com/[email protected]/msg00960.html), the XDAIS Framework is suppose to handle cache coherency automatically (points 1-4 in the post above). Recently, I have been adding more and more code and data to my DSP speech codec and I've been getting weird problems with the data exchanged between the ARM and the DSP. For example, I would always get the same exact data on the output buffer from a call to SPHENC_process. In attempt to debug the problem, I put a GT_trace call in my DSP speech codec to print out the data that was being returned from SPHENC_process so that I can compare it to the data I saw being returned to on the ARM side. Weird thing is that by putting GT_trace in the speech codec, the problem went away (the return data is different each time). As soon as I comment out the call to GT_trace, the problem came back (ARM side sees same data being returned). Am I doing something wrong? Is there a cache cohency problem here? Why does adding a simple GT_trace fix the problem and my data looks correct? Instead of GT_trace, I tried putting some hard delays in an attempt to affect timing but that wouldn't
work, only a call to GT_trace work.  I've been on this for several days now.
Please advise. Thanks in advance. Regards,
Andy


------------------------------------------------------------------------

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


--
Adam Dawidziuk
Sentivision
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to