Forum Discussion
Altera_Forum
Honored Contributor
8 years agoYou wrote "all the processors are executing a same set of instructions simultaneously", by it I assume you mean the program, therefore all cores run the same program.
That also implies the same variables. This is called Symmetrical Multi-processing (SMP) vs. each core running its own program (AMP: Asymmetrical Multi-Processing). As they run the same program and share the same data, the program itself must have provision to use the core ID (or number) to select core-specific operations / memory accesses. In your specific requirement about splitting the array, use the core ID# as an offset: 1 - Declare your array as a 1024 one, e.g. int Array[1024]; 2 - The slave cores (#1->#4) access their area using this point: MyPtr = &Array[(CoreID-1)*256]; Same program, same array, but different accesses by the individual cores If your application needs synchronization, messages, queues, parallel processing, shared resources access, etc. you should seriously look at using a SMP RTOS. Regards