[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/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/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 - DMA crash ?

DMA crash ?

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

Moderator: aolofsson

DMA crash ?

Postby tnt » Sun Mar 24, 2013 5:36 pm

tnt
 
Posts: 408
Joined: Mon Dec 17, 2012 3:21 am

Re: DMA crash ?

Postby ysapir » Sun Mar 24, 2013 7:15 pm

@sylvain,

Can you please specify what board you are using and what HAL revision?

It will also be useful if you could quote the compilation command line you used and/or attach the SREC.
User avatar
ysapir
 
Posts: 393
Joined: Tue Dec 11, 2012 7:05 pm

Re: DMA crash ?

Postby tnt » Sun Mar 24, 2013 7:36 pm

I'm using epiphany-libs at commit 2ae10592a1a0cf7862ce714ba4b477d1bae6dbcd from 22 Feb.

All the files and their compiled version is attached.

The board I'm using is a zedboard with a E16G3 FMC daugthercard. And when I referred to the "patched up" nature of it is because the zedboard had some power rail failure that I had to fix.
Attachments
test_dma.tar.bz2
Test code
(15.21 KiB) Downloaded 946 times
tnt
 
Posts: 408
Joined: Mon Dec 17, 2012 3:21 am

Re: DMA crash ?

Postby ysapir » Sun Mar 24, 2013 9:53 pm

Could you please add a pause between the runs (in the while true loop) and see if it changes the result?

The reset on that revision was a soft core reset. There is a slight chance for things messed up if DMA transactions are still on the way. Basically, the "busy" loop blocks the flow until the last read transaction leaves. It is possible that you restart the program before the writeback completes (I think it is very unlikely, but the chance is there).
User avatar
ysapir
 
Posts: 393
Joined: Tue Dec 11, 2012 7:05 pm

Re: DMA crash ?

Postby tnt » Sun Mar 24, 2013 11:35 pm

I just tried added various delays:

- Between calls to main_host in the "while true" bash loop, I tried a "sleep 1;"
- I added delay at the epiphany program main() start
- I added delays inside the while(1) epiphany loop and those delays were actually longer than the DMA complete time, so it doesn't even attempt to start a new DMA before the old is complete
- I changed the epiphany program so that when main_host exists, it disables the "while (1)" loop using a mailbox

And no changes ... Depending on the delay length , I can make it happen a bit less often, but that's most likely because it just executes less loops. In anycase, in less than 1 min of run, I can get either a full crash, or have the epiphany core not execute anything anymore.
tnt
 
Posts: 408
Joined: Mon Dec 17, 2012 3:21 am

Re: DMA crash ?

Postby tnt » Sun Mar 24, 2013 11:35 pm

I should add that using the same code but copying from SRAM to DRAM seem to work just fine.
tnt
 
Posts: 408
Joined: Mon Dec 17, 2012 3:21 am

Re: DMA crash ?

Postby aolofsson » Mon Mar 25, 2013 12:21 pm

I am guessing that this wasn't clear in our documentation, but the default behavior is for the DMA status register to indicate "done" when the last read transaction leaves the core (not when the last read transaction data returns!). I believe this may be the reasons for the erratic behavior. In the matmul example, Yaniv has some code to check that the last data transaction returned.

Doh! Realized that Yaniv already answered this..

Andreas
User avatar
aolofsson
 
Posts: 1005
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Re: DMA crash ?

Postby tnt » Mon Mar 25, 2013 7:37 pm

tnt
 
Posts: 408
Joined: Mon Dec 17, 2012 3:21 am

Re: DMA crash ?

Postby tnt » Mon Mar 25, 2013 9:32 pm

I just tried updating the epiphany libs from the git (had to adapt a bit to make it work for the E16, also had to adapt the host software to add e_init).

But exactly same results. SRAM->DRAM works fine. DRAM->SRAM has very weird behaviors.
tnt
 
Posts: 408
Joined: Mon Dec 17, 2012 3:21 am

Re: DMA crash ?

Postby ysapir » Tue Mar 26, 2013 2:20 am

User avatar
ysapir
 
Posts: 393
Joined: Tue Dec 11, 2012 7:05 pm

Next

Return to Epiphany and Parallella Q & A

Who is online

Users browsing this forum: No registered users and 8 guests

cron