Meaning
Memory mapping methods allow software to perform atomic single-bit writes to specific register addresses by projecting each individual bit of a target region into its own unique, byte-aligned address space. With bit-banding, a processor accesses a single bit using a standard read or write instruction to a designated alias address, which the bus matrix translates into a read-modify-write cycle at the hardware level. This approach eliminates the software overhead of masking operations.
Address Mapping
Translation between the alias region and the bit-band region follows a fixed mathematical formula implemented in the silicon bus fabric. On processors that support this feature, a single peripheral register bit maps to a distinct thirty-two-bit word in the alias memory space. Writing a one or a zero to this alias word directly modifies the corresponding bit in the peripheral register.
Software Execution
Utilizing alias addresses removes the need for interrupt disabling to protect shared registers. When a peripheral driver modifies a control register without bit-banding, an interrupt occurring during the read-modify-write sequence can cause data corruption if the interrupt handler also modifies the same register. Moving the complexity of bit manipulation to the hardware bus matrix ensures that the operation completes without interruption, which simplifies software development and decreases the instruction count in driver code.
Hardware Cost
Silicon area must expand to accommodate the extra decoding logic required for address translation. It requires dedicated routing lines within the bus matrix.