increase shared memory

Discussion about Parallella (and Epiphany) Software Development

Moderators: amylaar, jeremybennett, simoncook

increase shared memory

Postby schmurfy » Fri May 16, 2014 12:57 pm

Hi,
I have read a lot of posts and saw some mentions of it but I have to yet to find any real answers to:
- can I increase the shared memory space between the epiphany and the arm processor ?
- if yes is there a limit on how much memory can be shared ? (I don't need most of the 1GB for linux so I would rather be able to use it as shared memory)

And the last one is obviously: how to change the default 32MB ?
While I am sure some might disagree having a board with 1GB and only 32MB shared with the epiphany by default is a little sad.
schmurfy
 
Posts: 12
Joined: Mon Dec 17, 2012 3:22 am

Re: increase shared memory

Postby Gravis » Fri May 16, 2014 3:00 pm

this is the thread you are looking for: viewtopic.php?t=1101&p=6938
User avatar
Gravis
 
Posts: 445
Joined: Mon Dec 17, 2012 3:27 am
Location: East coast USA.

Re: increase shared memory

Postby schmurfy » Fri May 16, 2014 5:36 pm

I already read this thread...

The only useful part is:

To change this amount, you first need to change the Linux configuration files (unfortunately, at this time I cannot help with that, but IIRC, it was already discussed in the forums). Then, you need to make the eHAL and eLIB aware of these changes. This is done using the *.hdf configuration file used by e_init().


And that's not that useful honestly, what do you think ?
schmurfy
 
Posts: 12
Joined: Mon Dec 17, 2012 3:22 am

Re: increase shared memory

Postby Gravis » Sat May 17, 2014 1:18 am

schmurfy wrote:I already read this thread...

The only useful part is:

To change this amount, you first need to change the Linux configuration files (unfortunately, at this time I cannot help with that, but IIRC, it was already discussed in the forums). Then, you need to make the eHAL and eLIB aware of these changes. This is done using the *.hdf configuration file used by e_init().


And that's not that useful honestly, what do you think ?

i just used their hints and grep.

change the Linux configuration then compile it.

file in the kernel: arch/arm/boot/dts/parallella.dts

change "0x3e000000" to whatever size you want then recompile the kernel. 0x3e000000 is 1024 - 32 megabytes.

Code: Select all
        ps7_ddr_0: memory@0 {
                device_type = "memory";
                reg = <0x000000000 0x3e000000>;
        } ;

make the eHAL and eLIB aware of these changes and modify files bsps/parallella_E16G3_1GB/parallella_E16G3_1GB.hdf and maybe bsps/parallella_E16G3_1GB/parallella_E16G3_1GB.xml to reflect the change to the kernel configuration and then recompile them.
User avatar
Gravis
 
Posts: 445
Joined: Mon Dec 17, 2012 3:27 am
Location: East coast USA.

Re: increase shared memory

Postby schmurfy » Sat May 17, 2014 9:23 am

thanks :)
schmurfy
 
Posts: 12
Joined: Mon Dec 17, 2012 3:22 am

Re: increase shared memory

Postby greytery » Sat May 17, 2014 9:17 pm

Gravis,

You make it sound very tempting, and it's just what I've been exploring in theory - while I while away the time waiting for my boards ...
But the thread you refered to includes a point from shodruck:
shodruk wrote:so the Epiphany can only access its east address (0-63, 12-63).
....
So we can get up to 52MB contiguous memory space. (with E16 Parallella)

aolofsson wrote:Shodruky, That is correct.


How far did you push the memory limit to?

I don't exactly have a good record in that thread - :oops: - so I may have got this wrong (again).

tery
tery
User avatar
greytery
 
Posts: 205
Joined: Sat Dec 07, 2013 12:19 pm
Location: ^Wycombe, UK

Re: increase shared memory

Postby Gravis » Sat May 17, 2014 10:26 pm

greytery wrote:Gravis,

You make it sound very tempting, and it's just what I've been exploring in theory - while I while away the time waiting for my boards ...
But the thread you refered to includes a point from shodruck:
shodruk wrote:so the Epiphany can only access its east address (0-63, 12-63).
....
So we can get up to 52MB contiguous memory space. (with E16 Parallella)

aolofsson wrote:Shodruky, That is correct.


How far did you push the memory limit to?

I don't exactly have a good record in that thread - :oops: - so I may have got this wrong (again).

tery

Excellent point! The key to that is contiguous memory.

Now I'm not 100% on this but i'm pretty sure the following text is right.

As far as the Epiphany is concerned you can use more memory but there will be a hole in the memory map. If i'm remembering this correctly, core 0 on the epiphany is core [32, 32] on the global memory grid (see figure 6 in the epiphany arch reference). Since you can only access the parts of the memory grid to the east, you can only access [32, 32] to [35, 35] (local cores) and [0, 0] to [31, 35] (cores to the east and south(?)).

However, I'm pretty sure that the Zynq rearranges some stuff so I have no idea how the addressing would work on the host side. It's possible it's all been rearranged so that it's sequential in the host memory map or is completely unmapped altogether, I really dont know. I'm certain ysapir would know all about this.
User avatar
Gravis
 
Posts: 445
Joined: Mon Dec 17, 2012 3:27 am
Location: East coast USA.

Re: increase shared memory

Postby greytery » Sun May 18, 2014 1:50 am

Let's push those limits!! Those 'reserved' mem holes are very large indeed - and I hope we can find a way of filling them.

(As proven, I do not know what I'm talking about - but) ...
If an E16 is 4x4 and an E64 is 8x8, and if only east addressing works on the Parallella, then we're looking at access to 2x52=104MB external memory for Epiphany IV / Parallela?
Most disk caches are less than that and the IT world does not quibble, but...

If there IS a demand for increased shared memory, then we also need a way of increasing bandwidth, which means utilising one or more of the N/S/W elink channels. Some of these may/may not be visible to the Zynq.

AFAIK, ysapir is no longer directly involved (he listens).
This sounds like FPGA / MMU territory, so Fred may like to comment.

tery
tery
User avatar
greytery
 
Posts: 205
Joined: Sat Dec 07, 2013 12:19 pm
Location: ^Wycombe, UK

Re: increase shared memory

Postby shodruk » Sun May 18, 2014 2:26 am

greytery wrote:If an E16 is 4x4 and an E64 is 8x8, and if only east addressing works on the Parallella, then we're looking at access to 2x52=104MB external memory for Epiphany IV / Parallela?


Unfortunately, no.
I think it gets worse on E64.

greytery wrote:This sounds like FPGA / MMU territory, so Fred may like to comment.


I want to ask him too.
Is it possible to implement memory hole remapping on FPGA?

Or, can we manually configure the page table so that we can get contiguous shared memory?

From the Epiphany side, it is still noncontiguous, but it makes the data handling a bit easier.
Shodruky
shodruk
 
Posts: 464
Joined: Mon Apr 08, 2013 7:03 pm

Re: increase shared memory

Postby Gravis » Sun May 18, 2014 7:45 am

schmurfy,
is there any particular reason that you need more than 32MB of shared memory? sure, having more is great and all but accessing shared memory from the Epiphany is slow. if you have large amounts of data then you are probably processing a data stream and should cycle the data to and from the epiphany and host, only using the shared memory as a simple buffer (until an Epiphany DMA Engine is implemented in HDL).
User avatar
Gravis
 
Posts: 445
Joined: Mon Dec 17, 2012 3:27 am
Location: East coast USA.

Next

Return to Programming Q & A

Who is online

Users browsing this forum: No registered users and 3 guests

cron