AR# 52063


14.7 - XPS - How can I increase the Spartan-6 block RAM to 128K?


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:

/* microblaze_0_i_bram_ctrl_microblaze_0_d_bram_ctrl : ORIGIN = 0x00000050, LENGTH = 0x0000FFB0 */
/* microblaze_1_i_bram_ctrl_microblaze_1_d_bram_ctrl : ORIGIN = 0x00010000, LENGTH = 0x00010000 */
dummy : ORIGIN = 0x00000050, LENGTH = 0x0001FFB0
mcb_ddr3_S0_AXI_BASEADDR : ORIGIN = 0xA8000000, LENGTH = 0x08000000
Finally, place all sections in the linker script to this "dummy" memory space:

For example:

.text : {
} > dummy

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.

AR# 52063
日付 09/01/2015
ステータス アクティブ
種類 一般
ツール 詳細 概略
People Also Viewed