MicroBlaze : Linkerscript for splitting the text block into 64kByte blocks

Hi all,

I am implementing a microblaze processor in a subdesign in a Virtex4 component (ISE v7.1 sp3, EDK v7.1 sp2). The microblaze is using the internal BRAMS as instuction and data memory.

The program is increasing and becomes more than 64kByte. The blockram controller does only support 64kByte size of memory. The solution for that is implementing two bram controllers in a continous address-space (bram ctrl 1 from 0x000 to 0x00ffff and bram ctrl 2 from 0x010000 to

0x01ffff). If I compile the code the compiler gives no error on the code size, but I got one text block of more than 64kByte.

If I insert the design in the bitstream with Data2Mem I got an error, because it is not possible to fit the textblock in one of the address spaces defined in the bmm file.

It would be a solution to split the textblock in two parts. I have found the instructions for writing a LinkerScript for doing that. The only problem I have is to find the place where the object files of my code are temporary stored.

The code is built with the mb-gcc cross compiler.

Is there anyone out there who is doing the same kind of implementation ? Could someone help me with some kind of documentation about the mb-gcc ?

Thanks in advance, Bart De Zwaef

Reply to
zeeman_be
Loading thread data ...

zeeman_be schrieb:

Hi Bart,

if it doesnt work with old-old EDK versions then you just need to upgrade. I have verified that continous memory block loading over 64kb boundaries work in EDK 8.2 SP1 - as part of work with

formatting link
one of my test targets has 192 KB internal memory and data2mem doesnt complain at all, just initializes the bit file

did you verify the BMM, does it have

ADDRESS_MAP microblaze_0 MICROBLAZE 100

/////////////////////////////////////////////////////////////////////////////// // // Processor 'microblaze_0' address space 'bram_combined'

0x00000000:0x0002FFFF (192 KB).

something alike? this is from working design that CAN init more than 64kb junks

Antti

Reply to
Antti

XAPP642 and Answer Record 16547 show how to locate individual functions into segments other than "text". In fact it's even slightly simpler than shown there. You only need to use the "Generate Linker Script" dialog to generate a new segment (say, "text2") and locate it in your second 64K block.

Then use the attributes as shown to place any individual functions in text2 instead of text. No need to write linker scripts or find object files.

(I've only used it with the PPC gcc under EDK 7.1 but see no reason why mb should be any different in this respect)

- Brian

Reply to
Brian Drummond

Brian Drummond schrieb:

hum

I just looked the project with large BRAMs and it seems that EDK 8.2 SP1 has a bug there -namly only the first BLOCK get PLACED attribute in the BMM file! surprisingly data2mem doesnt complain when data is sent to it that belongs to the block with no PLACED in BMM

seems really be a nasty BUG :(

Antti

Reply to
Antti

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.