LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW FPGA - Code Execution Speed

Solved!
Go to solution

Hi,

Can someone explain why the For Loop in the snippet below takes 50 ticks to complete? Input array has 12 elements. I would expect less than 40 ticks:

For Loop Execution Time2.pngThe thing is that I need the whole loop to take less than 40 ticks so I can acquire with a rate of 1GS/s. I have not tried to increase the FPGA clock rate yet.

LabVIEW 2018, 3xNI-9223, cRIO-9045

Lucian
CLA
0 Kudos
Message 1 of 5
(3,266 Views)

In the screenshot it says 4 samples takes 16 ticks. So that is 4 ticks per sample. Then you are already  need 48 ticks to process 12 right. And you wire 14 channels to it. So 50 sounds reasonable. You also do not initialise your shift register.

0 Kudos
Message 2 of 5
(3,261 Views)

Please ignore the comment inside case structure. This was valid before I used the SCTL.

What shift register are you referring to?

Lucian
CLA
0 Kudos
Message 3 of 5
(3,259 Views)
Solution
Accepted by topic author LucianM

Well, the FOR loop itself will be around 4 ticks per iteration (index the value, SSTL, check stop condition, iterate counter).  Then you have the entering of the FOR loop and then entering the Sequence Structure to get the final time.  So I am getting 4*12 + 2 = 50!

 

I would get rid of the FOR loop and just do an Index Array and the stop logic (i >= 11) inside of the SSTL.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 5
(3,225 Views)

So the For Loop is taking 2 ticks (as mentioned in LabVIEW help), one for the SCTL and one for indexing the value. I wasn't aware that indexing is also using one tick and I expected 3 ticks per iteration.

I tried you idea to get rid of the For Loop and now it takes 14 ticks:). 

Thanks again crossrulz!

For Loop Execution Time 2nd vrs.png

Lucian
CLA
0 Kudos
Message 5 of 5
(3,213 Views)