LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to record time elapsed in LabVIEW FPGA across VI's?

I have a PXI system set up with an arbitrary waveform generator module generating a waveform and an oscilloscope module reading the signal and transferring it using Peer-to-Peer streaming to an FPGA module where an FFT is performed, and the data is then sent using Peer-to-Peer to a second FPGA module where a neural network uses the data and performs an inference, the inference is displayed in the second FPGA VI front panel. I would like to record how much time elapses from the generation of the signal to the inference to see what the latency is. I know of tick counters but I don't know how I would implement that as I will need to start counting in the host VI where the signal is generated and end the count in the second FPGA VI after the inference is performed. Does anyone know of a way to achieve this?

0 Kudos
Message 1 of 2
(1,183 Views)

On the FPGA everything is always running.  Under the hood it is all circuits.  What changes is what is enabled, data valid in/out, etc.  Given that, I think you are looking to measure latency.

 

Find two signals (i.e. booleans) on the FPGA from which you need to measure latency.  For example, you may want to know when the Output Valid values go true from the first and last functions.  Check their rising edge value use it to start a counter.  The counter will run until you stop it (same thing as above but for the second signal).  You want to hold that value so it does not keep recomputing.

 

The other thing is that many functions have latency documented.  That is something you can review and count up the values.  That times the clock speed will give you latency.


Certified LabVIEW Architect, Certified Professional Instructor
ALE Consultants

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