‎01-18-2013 02:22 PM
I am trying to find out how does the compilation report come up with the
Memory declared:
# of elements: 30720 elements
Data type: I32
30720 * 32 = 983040 bits used
If I have a Vitex-II 3000, I should have 1728kbit of RAM. That is equal to 1720*1024 = 1769472 bits avaiable
If my compilation report tells me that I used 47% of my RAM, I should be able to get the same result by diong (bits used)/(bits available)*100, right? My result is a bit off. Why is that?
‎01-19-2013 02:50 AM
I'm not familiar with the hardware but are you sure you're not mixing up bits and bytes?
‎01-20-2013 10:17 AM - edited ‎01-20-2013 10:19 AM
On a second look that's obviously not the case.
I've grown tomore or less ignore the estimates resource calculations. They never add up in the end.
Also seems like your software thinks that your hardware has 2048 Kbits, then it adds up.
‎01-21-2013 09:31 AM - edited ‎01-21-2013 09:43 AM
Hi jyang,
If you look at the Virtex-II data sheet, you will see that the data-width of the RAM is 36 bits wide, not 32. Using 36 bits in your above calculation should get you closer to the estimated usage.
EDIT: Just did the math, and it comes out to 62.5% used, which is even more than you expected. Do you have a memory item that you aren't using, which might be optimized out during compilation? Which FPGA target is this exactly (781x or 783x)?
EDIT 2: FYI, the result should lie between MNEmin and MNEmax from the formulas below, based on how Xilinx optimizes the memory space:
‎01-21-2013 10:23 AM
I guess I am just wondering how is the % ram usage calculated in the compilation report.
‎01-21-2013 10:52 AM
Hi T-REX,
Your calculation attached appeared as broken links. I can't see them. Can you re-attach again?
How does the data-width of the RAM play a role in the calculation? As you can see, I didn't use it.
I made a little mistake in my previous calculation. Please see my calculation corrected below. The I32 is what I declare my waveform memory to have. It takes I32 in the program. I am working with a PCI-7833R
Memory declared:
# of elements: 30720 elements
Data typen declared: I32
30720 * 32 = 983040 bits used
If I have a Vitex-II 3000, I should have 1728kbit of RAM. That is equal to 1728*1024 = 1769472 bits avaiable
If my compilation report tells me that I used 59.4% of my RAM, I should be able to get the same result by diong (bits used)/(bits available)*100, right? I am getting 55.56 in my calculation. Why is that?
‎01-21-2013 12:23 PM
Hi jyang,
This image should work (the other one works fine for me, but...)
MNE = Maximum Number of Elements (i.e., how many Elements can I put in memory items)
Basically, we try to optimize what we can fit in the available space, which may take up a maximum of 36 bits, but may be as little as 32 bits (both for a 32 bit number).
That %RAM usage is reported back directly from the compiler, and includes every piece of RAM any part of your diagram could use. Some functions (FFTs or other math functions generally) may use Block RAM as well. This could be the source of the difference for you. Also notice that memory comes in 18Kb chunks. If your memory item requires 2.5 of these chunks, then it will really take up 3. This number will be reflected in the "Actual Number of Elements" in the properties window for the memory item (not sure if your above number reflects that).
If you're curious, the only sure-fire way to find out (assuming password protected VIs may use BRAM), would be to dig through the (insanely enormous) Xilinx Log to see which components are using up that resource. It may be difficult (or impossible for end users) to find which part of your block diagram is instantiating that resource though.