LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA Target to Host data transfer from 2 loops with different speeds

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? 

 

FPGA How Do.png

 

How should I write my Reading vi to ensure that neither FIFO fills with data?

 

Related:
https://forums.ni.com/t5/LabVIEW/FPGA-Write-Read-DMA-FIFO-for-multiple-channels-FOR-loop-vs/td-p/386...

0 Kudos
Message 1 of 5
(1,641 Views)

Hi JScherer,

 

use two loops in the host - you also use two loops in the FPGA…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(1,636 Views)

@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?

0 Kudos
Message 3 of 5
(1,629 Views)

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…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(1,618 Views)

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.


Certified LabVIEW Architect, Certified Professional Instructor
ALE Consultants

Introduction to LabVIEW FPGA for RF, Radar, and Electronic Warfare Applications
0 Kudos
Message 5 of 5
(1,615 Views)