04-02-2012 08:10 AM
Hi
Attached a project I wrote with Labview 2011 FPGA. The main.vi has a while loop that running other 3 sub vis.
During compilation I got "Timing error". I follow all the advices in the help to overcome this error, but none of then help.
Please advice.
Regards
Gabi
04-02-2012 12:02 PM
Unfortunately this is life in the FPGA world - you need to rework your code until it meets timing. I don't immediately understand what your code is doing so I can't offer specific suggestions, but I would try the following:
1) Don't write to the AO channels in the first sequence of the frame. The compiler may be smart enough to determine that no arbitration is necessary in this case, but on FPGA it is always a good idea to make sure that you only write to and read from a resource (such as an input or output) in a single location. If you need to initialize the values, use a "First Call" function.
2) Similarly, avoid using multiple copies of local variables. In your case this will definitely lead to extra arbitration code because you are using the same local variable in two loops.
3) If possible, convert your loops to single-cycle timed loop.
04-02-2012 12:08 PM
Hi
Thanks for the advices.
Is there any paper with more rules for good FPGA programming?
Regards
Gabi
04-02-2012 01:18 PM
I don't know of one single document, but many of these points are mentioned in the LabVIEW FPGA module help.