How do I calculate the address space in a BMM file?
The formula for calculating the address space is:
#of blockRAM * size of blockRAM bits / 8 -1 = address space (starting from zero)
For the Spartan-II/-IIE and Virtex/-E architectures the size of the blockRAM is 2^12 = 4,096 bits
For the Spartan-3 and Virtex-II/-II Pro architectures the size of the blockRAM is 2^14 = 16,384 bits
For example in a Virtex-II design:
# of blockRAM = 22
size of blockRAM = 2^14
You divide by 2^3 = 8 to convert from bits to bytes.
Therefore, in this example 22 * (2^14) / (2^3) - 1 = 45055 = AFFF in hex
ADDRESS_BLOCK test RAMB16 [0x00000000:0x0000AFFF]