06-03-2008 03:15 PM - edited 06-03-2008 03:20 PM
06-05-2008 09:29 AM
Hi Tommy,
It seems like you are following most of the techniques for optimizng FPGA code. There are a few you may still be able to apply:
1. Use the Select function instead of a Case Structure with R 1 hiLow.
2. Eliminate coercion dots by using Conversion functions.
3. Use the smallest data types possible.
4. Where possible, change front panel controls and indicators to constants.
It is possible to derive a clock from the onboard clock, but the slowest top-level clock supported on the 9104 is 40 MHz, or 25 ns per clock cycle.
06-05-2008 01:34 PM
06-08-2008 02:54 PM
I notice you are not using a single cycle timed loop, but I don't think you can use those with analog signals. If you can, you probably need to generate a slower clock. I didn't think you would have timing exceptions when not using the single cycle timed loop, but what do I know?
My big question: Why did you use delayed shift registers? By using multiple terminals for each shift register, the delay between reading an input signal and generating an output related to that input is about 10 loops. It really doesn't make any sense to me unless the delayed signals are part of your calculations, but I doubt that.
I would think that you could easily clean up the code and put four copies of the loop on the diagram without much problem. It is kind of challenging to debug FPGA programs, though. Things that look like they should work great have some small error that is unexpected.
Posting the actual code wouldn't hurt, either. We would have to sit through the compile process to test it, but we might be able to post improved code for you.
Bruce
06-09-2008 11:27 AM
06-10-2008 01:32 PM
06-10-2008 03:21 PM
06-10-2008 07:48 PM
06-11-2008 09:07 AM
06-12-2008 06:09 PM