by cmcconnell » Fri Jun 12, 2015 10:16 am
I think you should take a step back and read the documentation more carefully. Look at the descriptions of the e_read and e_write functions, and look at the way memory is organised.
You can either implement your 16 flags in external (DRAM) memory, where each flag will have a separate address (e.g., be one of 16 elements in a contiguous array), OR you can implement the flags in the Epiphany cores' own memory, in which case the address of each individual flag will be the same on each core, and from the ARM side you access the one you want using the row and col parameters to e_read.
You first of all need to decide which of these two things you are trying to do.
Either way, if you want the host code to wait for all 16 cores to finish, then you must somewhere have code which is looping until all 16 flags have changed state. [That's if the cores are running in parallel. I just noticed that the structure of the main program in your first post implies that only one core will run at a time. I don't know if that is as you intended it; I presume not.]
Colin.