08-04-2011 02:56 PM
Hi everyone,
I am using NI PCI 7833R to create my FPGA application. The FPGA application contains multiple single cycle timed loops present in a sequence. When I compiled the code, the FPGA utilization was just 12.5%. However, when I add a piece of code, which just scales the input signal (by multiplication) and writes the input signal to one DAC port, the FPGA utilization just shoots up to 85%. When I compile the above piece of code (writing to DAC) seperately, the utilization is only 2.9%. I do not understand why is this happening. After all I am just writing a signal to a port. Could anybody please help.
Thanks
Prashant
08-04-2011 03:12 PM
Can you please post an image of the application highlighting the change? I'm not sure why you are seeing that behavior from the description you gave.
08-04-2011 04:02 PM
Without seeing the code, I'm guessing you're doing some array operations between the sections. If you're not careful this can use up a very large chunk of your FPGA resources. If this is the case we should be able to spot the offending code from a screenshot.
Does it matter though? Other than trying to be more efficient, which is always good, if your code fits on the FPGA you're done. Using 85% of the FPGA isn't the same as using 85% of a CPU processor.
08-04-2011 06:42 PM
Attached here is just a part of the entire VI. The subdiagram in part 4 is the culprit. Though I don't see how is that possible. part1 is a shift register, part2 is a dot product, part4 is writing to one port on DAC, part6 is reading from one port of ADC,part7 contains division with divisor being variable, part8 implements the equation x = x + (alpha*y). I have not included the other parts as they are repetitions of part1 and part2.
08-09-2011 10:47 AM
At first glance, I don't see anything that should cause the increase you are seeing. I have seen situations in the past where this happens and it usually has to do with the compiler optimizing out a good chunk of the code because the results weren't being used by anyone. Perhaps that is happening here, but I can't be sure unless I can get my hands on the actual application.