LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Loop Speed Fluctuations FPGA

Hello,

 

I am sending model data from real time target to R series FPGA over DMA FIFO using Array. FPGA vi have for loop inside while loop to get back values from array. But I am seeing while loop speed fluctuations between 10 K to 65 K ticks as shown below. I am not sure if this is because of for loop or DMA FIFO. Any help on it is much appreciated.

 

 

Amplitude in TickAmplitude in Tick

 
 
 

 

0 Kudos
Message 1 of 10
(3,350 Views)

Hi omkara,

 

that is a nice image of a part of your frontpanel.

But I guess it is not the source of your problem - instead the problem should be in your code (aka VI).

 

Why don't you attach your VI(s) when you want help with it?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(3,321 Views)

Can you post pictures of your FPGA code?

 

Variable tick count could mean you are using a regular loop and not a single cycled timed loop (SCTL).


Certified LabVIEW Architect, Certified Professional Instructor
ALE Consultants

Introduction to LabVIEW FPGA for RF, Radar, and Electronic Warfare Applications
0 Kudos
Message 3 of 10
(3,317 Views)

Sorry, I have added FPGA VI in my original post but for some reason I don't see it . Here is the screen shot.For loop inside while loopFor loop inside while loop

0 Kudos
Message 4 of 10
(3,307 Views)

As Terry said, that is a regular while loop and not a single cycle timed loop.  You should use loops with blue borders in the FPGA.

 

Also, you have an unnecessary number of Index Arrays.  And you don't need those constants.

 

Delete all but the top one, drag the bottom border downward and you'll have more outputs.  By default they will be index 0, 1, 2, ..... without having to wire up any index constants.

0 Kudos
Message 5 of 10
(3,304 Views)

I made changes as you suggested and replaced while loop with single cycled timed loop. During compilation I got following error.

 

Error -61003 occurred at

Possible reason(s):

LabVIEW FPGA: You cannot include this function in a For Loop when the For Loop is inside a single-cycle Timed Loop.

 

image

0 Kudos
Message 6 of 10
(3,283 Views)

You're also reading from a buffer with infinite timeout, so it could be your FPGA code is totally fine but the buffer is being filled at a variable rate.

0 Kudos
Message 7 of 10
(3,281 Views)

Move the indicator out of the for loop.

0 Kudos
Message 8 of 10
(3,276 Views)

Yes, on my write and read DMA fifo timeout set to -1 (No timeout). I am setting and monitoring following DMA parameters.

Requested depth set to = 10 (For 10 channels)

Actual Depth = 512

Empty elements Remaining = 502

 

Empty elements given above is constant at every iteration. From this I deduced my buffer is not overflowing, but I am not positive about this approach.

How can I make sure my buffer is not over flowing?

0 Kudos
Message 9 of 10
(3,257 Views)

You could check the FIFO status on the FPGA, elements to write tells you if there is room.

You could also try sending counter values to see if data is really being dropped or you have other issues.


Certified LabVIEW Architect, Certified Professional Instructor
ALE Consultants

Introduction to LabVIEW FPGA for RF, Radar, and Electronic Warfare Applications
0 Kudos
Message 10 of 10
(3,247 Views)