Minimizing Update Bits of NVM-Based Main Memory Using Bit Flipping and Cyclic Shifting
Non-Volatile Memory (NVM) has many advantages, such as non-volatility, high density, shock-resistivity, and low leakage power, and disadvantages, such as the relatively high write energy and limited write endurance. It also has the feature of writing more slowly than reading. We design a read-modify-write strategy called MinFS for NVM-based main memory to reduce the number of update bits and prolong NVM lifetime. The MinFS sets one flip bit and multiple shift bits for one word to re-encode the word. The flip bit indicates whether the word has been flipped or not, while the shift bits show how many bits the word has been circularly shifted. For a write request, the MinFS first computes all possible encoded data of new data with different flip or shift values and reads out old data. Then it calculates hamming distances between old data and each encoded data. The encoded data with the minimal distance is found and written into NVM. In order to reduce the overhead, we design a hardware unit to support parallel computation of multiple hamming distances. Experimental results show that the MinFS scheme can reduce the number of update bits by 16.9% and 14.6% compared with Flip-N-Write and Min-Shift on average under real benchmarks, respectively.