Page 1 of 1
Looping the Lena Example
Posted:
Fri Aug 29, 2014 4:56 pm
by stevenc
Hi, I am trying to make the lena example () 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
Re: Looping the Lena Example
Posted:
Fri Aug 29, 2014 10:12 pm
by aolofsson
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
Re: Looping the Lena Example
Posted:
Tue Sep 02, 2014 6:56 pm
by stevenc
Re: Looping the Lena Example
Posted:
Tue Sep 02, 2014 7:53 pm
by stevenc
If it helps, the code for my attempt at this is here:
Thanks again
Re: Looping the Lena Example
Posted:
Tue Sep 02, 2014 11:07 pm
by aolofsson
You need the following line before return statement.
__asm__ __volatile__("idle");
Please see "erm" example in epiphany-examples
Re: Looping the Lena Example
Posted:
Wed Sep 03, 2014 5:00 pm
by stevenc
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.