Board logo

标题: ERROR:31 - Out of bounds code segment for ram space in 'system_bd.bmm' [打印本页]

作者: pengpengpang    时间: 2014-11-20 15:45     标题: ERROR:31 - Out of bounds code segment for ram space in 'system_bd.bmm'

在使用EDK下遇到的一些很常见的问题,在此记录一下,以备未来。
在EDK下生成download.bit file时候出现这样的error:

ERRORata2MEM:31 - Out of bounds code segment for ram space in 'system_bd.bmm'
Xilinx 论坛上的解答:
'system_bd.bmm' file associates BRAMs to physical components (RAMB) in FPGA.
Basically from FPGA point of view he tells which RAMB is used by BRAM memory.
This tells how to layout memory on FPGA and creates "physical adress" space.
In other words RAMBs create BRAMs and system_bd.bmm file tells which RAMBs are used to do that.
Data2Mem tool places *.elf file to *.bit file. It needs to know howto put that *.elf (software binary) into *.bit.
It uses *.bmm files to find them and to create configuration bitstream which is later used by impact tool to program fpga.
ADDRESS_SPACE plb_bram_if_cntlr_1_bram_combined RAMB16 [0xFFFF0000:0xFFFFFFFF]
BUS_BLOCK
plb_bram_if_cntlr_1_bram/plb_bram_if_cntlr_1_bram/ramb16_0 [63:62] PLACED = X2Y9;
plb_bram_if_cntlr_1_bram/plb_bram_if_cntlr_1_bram/ramb16_1 [61:60] PLACED = X2Y13;
plb_bram_if_cntlr_1_bram/plb_bram_if_cntlr_1_bram/ramb16_2 [59:58] PLACED = X0Y13;
plb_bram_if_cntlr_1_bram/plb_bram_if_cntlr_1_bram/ramb16_3 [57:56] PLACED = X0Y14;
plb_bram_if_cntlr_1_bram/plb_bram_if_cntlr_1_bram/ramb16_4 [55:54] PLACED = X0Y0;

This warning tells that BRAMs are to small (not enought RAMB components), therefor you need to just increase it.
Also use powerpc-eabi-size *.elf file to see how much space your binary needs to fit into memory.
This problem doesn't have to do anything with linker script.
It would generate warning / error during compilation if code wouldn't fit to memory specified in linker script.
Anyway you can check if memory size declarated in linker script matches the one you have in system.
In linker script (*.ld) you can find something similar to that:
MEMORY
{
xps_bram_if_cntlr_1 : ORIGIN = 0xFFFF0000, LENGTH = 0x00010000
}

晕死,最后发现BRAM设置太小了,生成的程序装不大导致的。




欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0