Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

NIOS II Multiprocessor system and mutex

Hello,

i am writing soft- and hardware for a SOPC-System which includes three processors sharing on pheripherial.

I am not really understanding the use of a mutex. Do i need a mutex for every processor, or is it enough to have only one mutex for one peripherial?

My peripherial is a avalon memory mapped slave written in vhdl.

If i have only one mutex, does the avalon bus automatically ensure, that the processors can access the mutex one after the other, or could it happen, that one processor never gets the mutex if the others aquire and relase it in a loop?

What happens, if a processor writes ist id to the mutex while another one is reading? Corrupted data?

Paddy
No RepliesBe the first to reply