[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Parallella Community • View topic - What's E_DMA_MSGMODE meaning?

What's E_DMA_MSGMODE meaning?

Discussion about Parallella (and Epiphany) Software Development

Moderators: amylaar, jeremybennett, simoncook

What's E_DMA_MSGMODE meaning?

Postby eliecer » Fri Nov 28, 2014 5:41 pm

Attachments
dma_start_master.zip
It has comments in Spanish
(16.67 KiB) Downloaded 818 times
Last edited by eliecer on Sat Nov 29, 2014 4:49 pm, edited 1 time in total.
User avatar
eliecer
 
Posts: 25
Joined: Fri Sep 26, 2014 1:20 am
Location: Málaga, Spain

Re: What's E_DMA_MSGMODE meaning?

Postby notzed » Sat Nov 29, 2014 5:34 am

This behaviour is described in Table 39 (DMACONFIG register) of the arch reference manual. Its one of the "experimental" features so not well documented I guess.

It changes when the dma is considered 'finished'. Normally the dma is marked finished when the last transaction is started since the dma engine has nothing left to do, and could start new transfers straight away (e.g. chained). But if you're writing to local memory (the only place where msgmode works) then this isn't very useful - because one or more of the DMA transfers will still be in-flight (somewhere out on the mesh network, making their way to completion).

Message mode amounts to adding another step (or annotating the last one) which amounts to tracking the last write, and when that is done the dma is marked as done. It's only valid when the target is local (16-bit address).

The fact the example only works with it own is demonstrating why it is needed - otherwise there wouldn't be any point.

PS afaict this bit has nothing to do with the MESSAGE interrupt; dma interrupts are as normal even with msgmode set (i.e. when the dma channel switches to idle). But I can't find anything in the manual at all about the message interrupt, it may just be reserved for software use.
notzed
 
Posts: 331
Joined: Mon Dec 17, 2012 12:28 am
Location: Australia

Re: What's E_DMA_MSGMODE meaning?

Postby eliecer » Sat Nov 29, 2014 5:20 pm

Thank you notzed.

In the example the host writes 10 numbers in external memory. A core uses DMA for to copy this numbers in its local memory.

What do you think if I write in my documentation... "If you use DMA for to copy to local memory you need to use MSGMODE option"?

I have more questions about DMA, but this is the first.

Thank you.
User avatar
eliecer
 
Posts: 25
Joined: Fri Sep 26, 2014 1:20 am
Location: Málaga, Spain

Re: What's E_DMA_MSGMODE meaning?

Postby notzed » Sun Nov 30, 2014 12:18 am

Well you don't have to use message mode, you just usually need a reliable way to determine if the dma is complete. You could use a sentinal value as the last word/byte, or even use a chained dma to write a status value separately. Something like this is required for external dma for example. And you wouldn't use message mode if you had multiple dma's chained. But for off-core (external or another core) to local transfers, it's a convenient way to use the dma idle status to reliably.

I guess it's up to you do decide what fits in the type of documentation you're writing. Hardware registers usually fall into "advanced" reference manual material typically.
notzed
 
Posts: 331
Joined: Mon Dec 17, 2012 12:28 am
Location: Australia


Return to Programming Q & A

Who is online

Users browsing this forum: No registered users and 18 guests

cron