UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 52063

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

Description

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?

Solution

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:

MEMORY
{
/* 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 : {
*(.text)
*(.text.*)
*(.gnu.linkonce.t.*)
} > 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
Date Created 09/27/2012
Last Updated 09/01/2015
Status Active
Type General Article
Devices
  • Spartan-6
Tools
  • EDK - 14.2
  • EDK - 14.1
  • EDK - 14.7
  • More
  • EDK - 14.6
  • EDK - 14.5
  • EDK - 14.4
  • EDK - 14.3
  • Less