|
The threads that we are talking about on the GPIF II side of FX3 are not same as the threads that you create in software.
They are not software threads. This terminoligy might be confusing a bit. But they are hardware threads specific to FX3.
Is it alright if I only use one thread, and one consumer and one producer socket? Is there an advantage to use more threads and sockets?
Yes. You can go ahead with one consumer and one producer socket. In this case you will be using a single thread for data transfer.
You will be creating a DMA channel (using DMA channel create API) between these sockets (one consumer and one producer). There will be some buffer allocated to that channel to do data transfers.
Let say you have created a buffer of total 64KB (each buffer is 16KB, count - 4). GPIF II side socket is continuously filling this buffer and it filled the initial 16KB of buffer completely. Then it will switch to next 16KB buffer. This switching requires some time. The point to note here is that there is some latency. It may have some effect on your throughput.
Let say you want to optimize it for better throughput. Then it is better to have multiple threads. when you are using two threads then it will create a total of 64KB for each thread. GPIF II side socket is continuously filling this buffer and it filled the initial 16KB buffer of thread 0 completely. Then you can switch to Thread 1 and start filling the 1st buffer of thread 1. There is no latency in switching the threads. In this way, you can avoid the buffer switching delay using multiple threads.
Please refer to the attached document for more clear information regarding the same.
Thanks,
sai kirshna.
|