Parallel messaging with the Epiphany without blocking

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

Moderator: aolofsson

Parallel messaging with the Epiphany without blocking

Postby DJW » Fri Aug 26, 2016 4:13 pm

Hello dudes,

I've read and understand the following blog post:

https://www.parallella.org/2016/06/09/p ... -epiphany/

Is there any way for communication between the cores without blocking the whole core?
Or waiting for input to arrive without blocking the waiting core?

Any information about this would be very helpful.

Greetings from Germany
DJW
DJW
 
Posts: 9
Joined: Fri Aug 26, 2016 12:29 am

Re: Parallel messaging with the Epiphany without blocking

Postby polas » Fri Aug 26, 2016 5:34 pm

You are asking about ePython here, at the end of the day it is just shared memory and the messaging is an abstraction which is implemented on top of this. Currently there are no non-blocking calls in ePython, but these could be added fairly easily - however each core only has 32K of memory (there is a larger 32MB by default shared area but this is much slower) so we need to be careful how many features are added as obviously this means less space for user code and data in "fast" core memory (these will transparently flow over to shared memory in ePython but as I say you pay a performance penalty in doing this.) If you use another technology (such as C) then you just copy memory across and obviously this is non-blocking - but you need to be careful wrt consistency
polas
 
Posts: 46
Joined: Thu Mar 05, 2015 9:41 pm

Re: Parallel messaging with the Epiphany without blocking

Postby jar » Fri Aug 26, 2016 9:17 pm

Yes, there is. I did this for the OpenSHMEM implementation (which I'm still trying to get released with my organization). Until that's released, you can read about some of the details in the related paper. See section 3.4 in http://arxiv.org/pdf/1608.03545v1.pdf

If you are short on time, you can look at the e_dmacopy routine works. https://github.com/adapteva/epiphany-li ... dma_copy.c

If you don't want to block, you would remove line #76: while (e_dma_busy(chan));

Eventually, you typically need some kind of synchronization. Line #76 guarantees that the DMA is no longer moving data, but not that the data has arrived. If you need to guarantee the data has arrived on the receiving core, you need additional synchronization. Typically, this is done by writing a value to the last word on the transaction and waiting until it is different. But there are other ways.
User avatar
jar
 
Posts: 295
Joined: Mon Dec 17, 2012 3:27 am


Return to Epiphany and Parallella Q & A

Who is online

Users browsing this forum: No registered users and 2 guests

cron