Home > Chip + Interface IP Glossary > Read-Modify-Write (RMW)
Table of Contents
Read-Modify-Write (RMW) is a memory operation commonly used in computing systems where a processor or controller reads a data value from memory, modifies it, and writes the updated value back—all as a single atomic transaction. This technique is essential in multi-threaded and multi-core environments to ensure data consistency and prevent race conditions during concurrent access to shared memory.
The RMW cycle begins with a read of the target memory location. The processor then performs a modification—such as incrementing a counter, toggling a bit, or applying a mask—and finally writes the result back to the same location. Crucially, the entire sequence is treated as atomic, meaning no other thread or device can access or alter the data in between the read and write steps. This is typically enforced using hardware-level locking or cache coherency protocols.
In memory controllers, RMW is often used when updating partial data in a memory word, especially in systems with ECC (Error Correction Code). For example, modifying a single byte in a 64-bit word requires reading the full word, updating the byte, recalculating ECC, and writing the entire word back.
RMW operations are foundational in:
Rambus offers Interface IP solutions that support Read-Modify-Write add-on cores with our GDDR and LPDDR solutions. To learn more about the add-on core, click here.
