Increase Memory Resource in SDRAM.

Hi, I have a project with a big requeriment of memory. So I have decided to generate a linker script with every section to SDRAM. The problem is that I don't know how can I increase the "default memory area" for my app. The reason is that I do "xil_calloc", but when I put a big number I receive an error and I think I could do it in a Sdram with 32Mb. How can I increase the resources of my Sdram?. What is the section in "Linker Script" for doing it possible?.

Thanks

Reply to
Pablo
Loading thread data ...

Erm, increase the heap size?

-Ben-

Reply to
Ben Jones

I have incresed heap_size, but it seems like sdram cannot use more than 60 kbytes.

Reply to
Pablo

Pablo schrieb:

That's no SDRAM problem. As the Xilinx EDK documentation states:

"The xil_* functions operate on a 64 kilobyte buffer, and allocate memory from that. The size of this buffer is fixed and cannot be changed currently. This is a limitation of the xil_* dynamic memory allocation routines." [oslib_rm.pdf/EDK 8.1]

I don't know if this has changed in subsequent EDK versions. The PPC405 malloc/calloc does not suffer from this limitation.

Best regards, Andreas

Reply to
Andreas Hofmann

Thanks. I think so. Any idea?

Reply to
Pablo

Maybe. It depends on your application and the FPGA you use. There are a lot of details that are missing in your posts:

  1. What CPU do you use, PPC405 or MicroBlaze?
  2. Can you switch to PPC if you use MicroBlaze?
  3. Does your application require dynamic memory allocation?
  4. Can you use static memory allocation instead?
  5. Do you have to use xilkernel?
  6. Where do you store your application code?
  7. How much memory does your application need?
  8. How much is available?

Depending on the answers to these questions you can:

  1. Allocate your memory statically.
  2. Use PPC405 + external SDRAM + malloc.
  3. Implement a malloc which handles more than 64 KB. It's not complicated but memory fragmentation can become an issue on MicroBlaze as there's no MMU.
  4. Use an operating system like uClinux.
  5. Search for an C-based malloc library.

See

formatting link
for a discussion of possible malloc implementations on MMU-less systems.

Best regards, Andreas

Reply to
Andreas Hofmann

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.