Forum Discussion
Altera_Forum
Honored Contributor
20 years agoHi,
For handling this kind of mutual exclusion problems another approach would be to use a single mutex peripheral, and then use a software handling of the mutual exclusion that exports an abstraction of "shared resource" that is independent on the partitioning scheme you are using in your multiprocessor. In other words, each shared resource should have a "Resource" (kind of a binary semaphore), and the system should automatically take care of handling the mutual exclusion in the best way, resolving it on the same processor if all the tasks using the resource are assigned to the same CPU, or implicitly using an hardware mechanism such as the Altera Mutex if the resources are used by tasks allocated to different processors. If the resource you are sharing are data structures shared in memory, you should also take care of disabling the cache when accessing the resource. Again, the system should take care of that automatically for you. If you want, take a look at http://www.evidence.eu.com/nios2 (http://www.evidence.eu.com/nios2), you can find some on-line documentation and demos about the topic... bye Paolo