I've been making the following experiment: Using a C6a8168 EVM, with Linux running on the ARM and Bios 6 running on the DSP, I have a program with two simultaneous threads running on the ARM, each of which communicates to the DSP via Syslink. For each ARM thread there is a corresponding task of equal priority on the DSP. Consider the following situations:
1. If thread 1 on the ARM runs followed by thread 2 on the ARM, implying that the corresponding DSP tasks follow sequentially, everything works as expected, images are setup and processed in shared memory.
2. If however thread 1 on the ARM and thread 2 on the ARM run simultaneously, implying that sub-processes of DSP tasks 1 and 2 become intermixed, corruption is observed in the images in shared memory. I suspect the cause of this is due a non-coherence of the DSP cache. I have attempted to get this to work by protecting DSP task activities with a GateMutex, but this is only partially successful, the corruption of shared memory persists. Is there a way to get this second case to work? The DSP sub-tasks do such things as DMA between L1D and DDR.
The Real-time Operating System v6 User's Guide says: "Entire context saved to the task stack" upon task preemption. I assume that this includes such things as the PC, stack pointer, registers, and so forth, but what about the state of the cache?
I've been putting ping-pong buffers in L1D with DMA between L1D and DDR and I'm wondering whether it might be better to put the ping-pong buggers in L2 and keep the L1D cache full size.
Lee Holeva