LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[FPGA] Analog I/O minimum number of clock cycles

Solved!
Go to solution

I'm lately trying to optimize my LabVIEW FPGA code by reducing the minimum number of cycles that each while loops needs. The card I'm using is a RIO 7852R (40 MHz clock), and right now my bottleneck is the Analog I/O function, which apparently I cannot run inside a while loop faster than 100 cycles. 

 

Is there any way to improve it? According to the specs it should be able run at 1 MHz, so around 40 cycles per loop.

0 Kudos
Message 1 of 3
(2,707 Views)

Hello gerardpc,

can you provide a screenshot, how the benchmark was done or the FPGA code?

Is the analog in and out in the same loop?

This link could be helpful:

Optimizing your LabVIEW FPGA VIs: Parallel Execution and Pipelining

best regards
Alexander
0 Kudos
Message 2 of 3
(2,690 Views)
Solution
Accepted by topic author gerardpc

I found the problem. I was accessing the same Analog input from two different loops. This reduced the speed about two times.

After modifying my code with a FIFO instead of a dual direct access to my input I could reduce the number of clock cycles to about 50 (close to the theoretical optimum of 40).

0 Kudos
Message 3 of 3
(2,636 Views)