10-12-2020 01:47 PM
I have two loops in my FPGA, one FIFO one runs at 100kHz and the other at 250kHz . What is the most effective way to transfer the data gathered in each loop from the FPGA host to the target?
How should I write my Reading vi to ensure that neither FIFO fills with data?
10-12-2020 01:49 PM
10-12-2020 02:01 PM
@GerdW wrote:
Hi JScherer,
use two loops in the host - you also use two loops in the FPGA…
I really should have thought of that... Unfortunately, It would be best for my code base if I could keep this in one ReadFPGA.vi . Is there a way to read both in one loop?
10-12-2020 02:29 PM
Hi JScherer,
@JScherer wrote:
Is there a way to read both in one loop?
Yes, sure.
Read 10k samples from slower FIFO and 25kS from faster FIFO!
(I'm unsure about any side effects. Check FIFO buffer fill rate for safety…)
10-12-2020 02:48 PM
I too recommend two separate VIs. It keeps the two processes separate and I think it is easier in the long run in case changes are needed or if one needs to pause/stop and the other does not.
If you must however, on the host you would read the values available to read (from each FIFO), send to feedback node and read that many back on the next iteration.