I am using the block RAM on the Spartan-6 FPGA to store my application.
However, I am limited to 64K. How can I increase the memory size?
There is a limitation in the block RAM controller that limits the block RAM to 64K for 32-bit applications.
To work around this limitation, the user will need to add the following:
One block RAM from the IP catalog (to add, double click on the IP and click OK to keep all defaults):
Two block RAM Controllers from the IP catalog (to add, double click on the IP and click OK to keep all defaults):
Select the Bus Interface Tab in XPS and connect the Controller as shown below:
Note: Use the existing BRAM topology for reference here.
Next, select the Address Tab, and add the address space for the new block RAM controllers.
These need to be concatenated with the existing block RAM controller. This is shown below:
In XPS, select Project -> Export to SDK. Once the SDK is open, the linker script appears in a text editor.
This is shown below:
In the linker script, comment out the existing memory, and add a dummy memory that encapsulates the two block RAM controllers:
The BMM file will also need to be modified to allow for a contiguous block, as the tools will create two address spaces; one for each controller.
In SDK, open the BMM file:
Here, you will see that there are two Address spaces; 0x00000000: 0x0000FFFF and 0x00010000: 0x0001FFFF.
To make a contiguous range, the second address space can be removed, leaving two blocks in the one address space:
Finally, the address range will need to be updated to cover the whole range 0x000000000:0x0001FFFF:
This BMM file is used in the Program FPGA GUI in SDK.
However, this same approach can be used for any BMM file.