LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring FPGA Latency in a Regular While Loop — Tick Count Not Accurate

Solved!
Go to solution

Hi everyone,

I’m working on a LabVIEW FPGA project where I generate a digital HIGH–LOW signal inside a regular While Loop and want to measure the latency between when the output is generated and when it’s observed.

I tried using the Tick Count / Tick Rate VI on the FPGA to measure this latency, but the values I’m getting don’t make sense — they are inconsistent and don’t match what I see on the CRO.   

A few questions:

  1. Why is Tick Count / Tick Rate unreliable for measuring latency on FPGA?

  2. What is the best-practice method to measure FPGA latency deterministically in a While Loop?

  3. Are there any tips for correlating FPGA-measured latency with what I observe on a CRO, given IO and probe delays?

Thanks in advance for any advice!

0 Kudos
Message 1 of 8
(731 Views)
Solution
Accepted by topic author AJAYY06

You're going to have to attach code or a picture or both.

0 Kudos
Message 2 of 8
(712 Views)

AJAYY06_1-1769525068602.jpeg

 

0 Kudos
Message 3 of 8
(699 Views)

Instead of toggling the boolean each iteration, why not just toggle it once and wait for the input to respond?

0 Kudos
Message 4 of 8
(677 Views)

You are not using FPGA Tick Count VI in your block diagram.

If you want to count using shift register, you need to replace while loop with Single Cycle Timed Loop.

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
0 Kudos
Message 5 of 8
(636 Views)

AJAYY06_0-1770110966519.png

iam using counter to find the how many tick does it take to read hing value,and also checking with the tick count vi but getting the diffrence of both value is zero ,before i was running these iam setting the value low at those pins..... the above code is okay wheather i change the code give me some ideas

 

0 Kudos
Message 6 of 8
(560 Views)
Solution
Accepted by topic author AJAYY06

Hi Ajay,

 


@AJAYY06 wrote:

 the above code IMAGE of code is okay wheather i change the code give me some ideas


We still cannot debug images with LabVIEW…

 

But you could cleanup the block diagram, so errors cannot hide so easily!

  • You don't need to compare booleans with TRUE…
  • STRAIGHT wires!
  • Descriptive labels on ALL controls and indicators…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 8
(557 Views)

YOU CHECK WITH BELOW VI

 

Download All
0 Kudos
Message 8 of 8
(524 Views)