LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labVIEW FPGA Timed Loop Help

Hi,

 

I am currently having issues getting my labview programme to run on my fpga. I have a series of logics and functions within a timed structure running at a 40MHz. However, when i attempt to compile the programme to my fpga it doesnt allow it due to the fpga trying to execute the entire timed structure in 1 tick. 

 

is there a way to programme the fpga to execute my loop either a) ever X ticks or b) allow the fpga to take longer than 1 tick to execute the loop?

 

any help would be greatly appreciated

0 Kudos
Message 1 of 5
(2,298 Views)

Yes and no.

The code will need to execute in 1 tick, but you can introduce "pipelining" to help it get there by using Feedback nodes (with direction changed so the wires still flow forward.

 

Data on wires After the node are actually valid a full tick later. In this way you can break up your longest logic path, but will need to be very aware of the delays introduced so that data which needs to be processed together stays together.

 

https://zone.ni.com/reference/en-XX/help/371599P-01/lvfpgaconcepts/fpga_pipelining/

Message 2 of 5
(2,249 Views)

The other option, if throughput allows it, is to create a "Derived Clock" from your 40MHz clock. If you right-click the clock in your project and select "Create derived clock" you can specify one with 10MHz, which will obviously allow four times as much in a single tick

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

Hi JSpens,

 

The Timed Loop goal is precisely to execute in 1 tick. If you don't need it, the classic while loop is probably a better choice (your b) choice).

However if you need to run your logic functions at high speed, you should try to keep the timed loop and to use pipelining or state machines inside it, so you know that your code will always be taking the same short amount of time. With this kind of structure, you can split your code into several 1 tick cases that will run one after another, which match your a) request.

 

Edit : As Intaris said, pipelining is probably the best option in your case.

Regards

Alban RCENTUM ADENEO
Certified LabVIEW Developer

0 Kudos
Message 4 of 5
(2,241 Views)

Hi,

 

Thanks for taking the time to reply. I will look into the things that you have suggested.

0 Kudos
Message 5 of 5
(2,198 Views)