Hi,
I'm trying to use a persistent thread on the aDSP to process real-time RF samples provided by a host thread on the CPU. I allocated a buffer for the input samples and two for the two sets of output values, and passed them into my initialization function that constructs the thread via adsprpc, then stored their pointers for use later. I was under the impression that the DSP shared memory with the CPU and RPC calls were zero-copy, with the stub/skel code simply updating the cache entries on each as necessary, in which case I would expect the pointers to stay constant for the life of the application.
What I'm seeing, though, is that the pointers change from one adsprpc function to another. For example, the buffers' addresses in my initialize function are: input=0xfdb01000, output0=0xfdb00000, output1=0xfdb02000. When I call the update function, providing it the same host-side input array (allocated with ION), it uses the following address on the DSP side: input=0xfdb00000. This is the same address as output0 during initialization, suggesting that they are reusing temporary buffers rather than being distinct addresses. Am I missing something here?
What is the suggested way to do this? I'm essentially trying to create a zero-copy circular message queue from a single large input buffer, broken up into N equally sized messages. When the producer fills in a message it calls an RPC function that notifies the DSP thread by way of a QuRT pipe. Is there a way to do this without having to copy the data from the user into a buffer allocated on the DSP?
Thanks,
Adam
buffers are mapped and unmapped per call, so there is no guarantee that you would get the same virtual address on the next call.