How to allocate the SDRAM

Any technical questions about the Epiphany chip and Parallella HW Platform.

Moderator: aolofsson

How to allocate the SDRAM

Postby Richardye » Sat Dec 19, 2015 11:46 pm

Hi guys,

I have got one question regarding allocating the SDRAM. I have read several related posts in the forum, and I saw that when allocating the SDRAM, I should start with the offset 0x100000 which is 16 mb like this

Code: Select all
e_alloc(pDRAM,0x01000000,msize)


However, in the example of fft2d and matmul-16, the allocation instruction used the offset 0 not 0x01000000. Does anybody know why ? It is a little bit confusing...

Code: Select all
e_alloc(pDRAM,0x00000000,msize)


Best Regards,
Richard
Richardye
 
Posts: 8
Joined: Mon Sep 07, 2015 6:30 pm

Re: How to allocate the SDRAM

Postby sebraa » Tue Jan 12, 2016 3:09 pm

If you check the original linker scripts, you will notice that the shared memory area is 32 MB in size and divided in two parts. The first part is reserved for the C library and other stuff, the second part is reserved for the heap.

If you do not use the heap on the Epiphany cores, you can use the upper half of shared memory freely (offset 0x00100000).
If you do not use functions from the C library on the Epiphany cores, you can use the lower half of shared memory freely (offset 0).
sebraa
 
Posts: 495
Joined: Mon Jul 21, 2014 7:54 pm


Return to Epiphany and Parallella Q & A

Who is online

Users browsing this forum: No registered users and 11 guests

cron