Looping the Lena Example

Looping the Lena Example

Postby stevenc » Fri Aug 29, 2014 4:56 pm

Hi, I am trying to make the lena example (https://github.com/parallella/parallella-examples/tree/master/lena) process several images in a row, but it is hanging on the second image. I put a loop in the code right after the `init_coreID` function that ends right before the `e_close(pEpiphany)` call so it will just get a new image, process it, then save it. It works perfectly the first time through, and the image is processed, but on the second iteration, the program hangs in the `ftt2d_go` function at the part where it waits for the cores to finish their calculation.

What could be causing it to never finish? Thanks
stevenc
 
Posts: 13
Joined: Fri Aug 29, 2014 4:44 pm

Re: Looping the Lena Example

Postby aolofsson » Fri Aug 29, 2014 10:12 pm

If you try to send another "go" meaning a write to the sync bit of the ILAT, then you must make sure the IPEND register is clear and in an RTI has been executed. In this case probably the first kernel finished with an exit..which ends up in a trap. Try putting an idle statement in place of return status. This will be fixed in next SDK release..
Andreas
User avatar
aolofsson
 
Posts: 1005
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Re: Looping the Lena Example

Postby stevenc » Tue Sep 02, 2014 6:56 pm

aolofsson wrote:If you try to send another "go" meaning a write to the sync bit of the ILAT, then you must make sure the IPEND register is clear and in an RTI has been executed.


I'm not sure how I would do this, could you point me to some documentation?

aolofsson wrote:Try putting an idle statement in place of return status.


Do you mean this line? https://github.com/parallella/parallella-examples/blob/master/lena/device/src/fft2d_main.c#L154

I removed that line and it didn't help. I tried "return 0;" and "return 1;" and neither of them worked, it still hangs.
stevenc
 
Posts: 13
Joined: Fri Aug 29, 2014 4:44 pm

Re: Looping the Lena Example

Postby stevenc » Tue Sep 02, 2014 7:53 pm

If it helps, the code for my attempt at this is here: https://github.com/sclukey/parallella-ip-test

Thanks again
stevenc
 
Posts: 13
Joined: Fri Aug 29, 2014 4:44 pm

Re: Looping the Lena Example

Postby aolofsson » Tue Sep 02, 2014 11:07 pm

You need the following line before return statement.
__asm__ __volatile__("idle");

Please see "erm" example in epiphany-examples
User avatar
aolofsson
 
Posts: 1005
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Re: Looping the Lena Example

Postby stevenc » Wed Sep 03, 2014 5:00 pm

Adding that line doesn't help either, it still hangs. I think I'm just going to ignore this example and start over. Thanks for the help though.
stevenc
 
Posts: 13
Joined: Fri Aug 29, 2014 4:44 pm


Return to Image and Video Processing

Who is online

Users browsing this forum: No registered users and 1 guest