Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
The idea behind a read-modify-write command is it's atomic (meaning it can't be interrupted). In some multi-processor designs I've seen this type of command is used to update semaphores so one process can't interrupt a second process while it's updating the semaphore.
Semaphores are typically used when there is a shared resource like memory that needs to be accessed by two masters the semaphore is used to lock out the second device while it's being updated by the first, therefore to set/clear the semaphore you need to have an atomic access so only one of the devices can set/clear at a time.
I've seen it done both ways. Depends on the hardware (uP) that's used. If the uP doesn't support it but it's still needed for the system to operate external HW has to support it.
BTW. Things might have changed since the time I worked on processor based designs. >10 years ago. Not sure what all the new processors features are for this type of application. Some of the DSP processors I worked with had special read-modify-write semaphore reading/setting instructions. So you could share memory between processors.
Why is it so important to hold an access to the memory while modifying one of its entry (in case of the read-modify-write command)?
What would happen if a programmer would use the regular read and write commands instead of an atomic read-modify-write one? Could you provide a scenario when this would not work?
Why is it so important to hold an access to the memory while modifying one of its entry (in case of the read-modify-write command)?
What would happen if a programmer would use the regular read and write commands instead of an atomic read-modify-write one? Could you provide a scenario when this would not work?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.