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# 16536

8.1i EDK - "ERROR:Data2MEM:31 - Out of bounds code segment for ram space in 'system_bd.bmm'."


Keywords: ELF, bit, 128, linker, script, contiguous, memory, BRAM

I am trying to extend my code space by using two BRAM memory controllers contiguously, so I do not have to use a linkerscript or so that I can have larger code sections in BRAM.

When I try to update the bitstream, Data2MEM reports the following error:

"ERROR:Data2MEM:31 - Out of bounds code segment for ram space in 'system_bd.bmm'.
Memory space 'plb_bram_if_cntlr_1_bram' occupies [0x00000000:0x0001FFFF]
Code segment #1 occupies [0x00000000:0x00034D73]"


Resolution 1

Data2MEM does not support contiguous memories generated from EDK.

To work around this, use a linker script to place the application code sections in the separate memory regions.

XPS provides a tool called "Generate Linker Script" to help create a linker script that maps the application code to the two memories.

To open this tool in XPS, select Tools -> Generate Linker Script.

NOTE: This tool is available in EDK 6.3 and later.

Resolution 2:

The default EDK linker script generates an ELF file with a single program header. A loader program (in this case, Data2MEM) reads this header to download the ELF onto the memory. Because the memory regions are contiguous, it is logical to just give the START_ADDR option to the linker and the linker uses the address to generate the ELF file; however, Data2MEM cannot distinguish between contiguous memories, and an error results.

The solution is to change your linker script to generate program headers for each physical memory. The PHDRS construct in the linker script can be used to generate a program header. In this case, the linker generates two program headers, one for each physical memory in the ELF file. Data2MEM can download the ELF file correctly into the appropriate memories as it now reads two headers, one for each physical memory region.

For more information on ELF program headers, see:

Resolution 3:

An alternate solution to this problem is to modify the BMM file by hand and run Data2MEM in stand-alone mode.

NOTE: This solution will work only with contiguous, equal-sized memory spaces.

1. Run the entire hardware flow in XPS (Tools -> Update Bitstream) or in ISE, so that an annotated BMM has been generated.
2. Modify the BMM file to put all the BUS BLOCKs into one ADDRESS BLOCK. Adjust the address of the one, primary address block to span the entire address region.
3. Save the BMM file, and run Data2MEM in stand-alone mode, as shown below:

> data2mem -bm system_bd.bmm -bd executable.elf tag top_level_tag_name
> -bt system.bit -o b down.bit

... where top_level_tag_name is the top address block instance name.

The download.bit file produced should have the entire bitstream initialized.
AR# 16536
日期 04/25/2007
状态 Archive
Type 综合文章