Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12437 Discussions

multiprocessor and mutex question

Altera_Forum
Honored Contributor II
1,151 Views

Hi,  

 

My design contain two CPU's. Each have his own on-chip-RAM. 

 

My question is: 

If I want that CPU1 could read the CPU2's RAM, do I need to use mutex? 

 

Thanks.
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
87 Views

It depends on the application. If you only need to read one word (32 bits) then you don't need a mutex. If you need to read a whole block made of several words, and need that block to be consistent, then you need a mutex. Without the mutex, if CPU1 is writing the block while CPU2 is reading it, then the CPU2 will get a mix of the old and the new block, which may have some undesirable consequences.

Altera_Forum
Honored Contributor II
87 Views

Thanks for the answer...

Reply