Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Visitor
vbmazter
Posts: 17
Registered: ‎04-18-2012
0
Accepted Solution

Separate memories for heap and stack?

Hi,

 

I implemented a Microblaze system with DDR3 access. Because I need quiet some heap, I need mapped it to the DDR RAM. Unfortunately EDK claims that the heap must always go together with the stack, i.e. also on the DDR RAM.

 

As expected, this slows down the applications running on Microblaze by around a factor of two in my case.

 

Why can't I separate heap (to DDR) and stack (to BRAM)? Is there any way around this limitation?

 

Thanks,

Regards,

martin

Xilinx Employee
austin
Posts: 3,671
Registered: ‎02-27-2008
0

Re: Separate memories for heap and stack?

v,

 

Did you see that this question was already asked, and answered?

 

http://forums.xilinx.com/t5/EDK-and-Platform-Studio/Seperate-BSS-Stack-and-Heap/td-p/55691

Austin Lesea
Principal Engineer
Xilinx San Jose
Contributor
schneemann79
Posts: 36
Registered: ‎05-02-2009
0

Re: Separate memories for heap and stack?

Hi vbmazter,

 

you are right I had the same problem a while ago. Stack and heap can only be located together in the same memory region. Most probably the reason for this is the implementation of the run-time libraries (libxil.a, libc.a). These libs were developed for computer systems were heap and stack always go together in "external" DRAM. Libxil might be a more specific library for Xilinx purposes than libc, but the heap and stack management principles might rather be the same.

Visitor
vbmazter
Posts: 17
Registered: ‎04-18-2012
0

Re: Separate memories for heap and stack?

@Mr. Lesea,

I read that thread several times, but I don't feel that it gives the answer to my question. They were talking about the bss segment...not sure why they mention heap there though. Sure, your colleague is saying there that the linker script can do any assignment I like, but that's not the case as I mentioned above.

 

@schneemann:

I second that. There seems no way around co-locating heap and stack unfortunately.

 

Thanks for your answers!

Visitor
roketroket
Posts: 17
Registered: ‎05-28-2012
0

Re: Separate memories for heap and stack?

Hi,

Can you provide me a Xilinx ISE project which has a Microblaze and a DDR3 controller for Micron MT41J64M16LA device?

Spartan 6 XC6SLX45T is what i m using.

(My board is a custom board http://www.enterpoint.co.uk/raggedstone/RaggedStone_User_Manual_Issue_1_02.pdf and i face some problems with executing code from DDR3)

Thanks
Visitor
roketroket
Posts: 17
Registered: ‎05-28-2012
0

Re: Separate memories for heap and stack?

Hi,

 

Can you provide me a Xilinx ISE project which has a Microblaze and a DDR3 controller for Micron MT41J64M16LA device?

 

Spartan 6 XC6SLX45T is what i m using.

 

(My board is a custom board http://www.enterpoint.co.uk/raggedstone/RaggedStone_User_Manual_Issue_1_02.pdf and i face some problems with executing code from DDR3)

 

Thanks

 

metinburak@gmail.com