## 2 Data Modulation in NAND Flash  
Data modulation refers to how to map the bit codes to a voltage level programmed into a NAND flash cell. The distribution of bit errors in the NAND flash highly depends on the pattern of data modulation. The currently widely used data mapping method is 1/2 division gray coding, or 1/2 gray coding for short. The term \"1/2 division\" means that the first line of the mapping table is divided by \"1\" and \"0\" in half, and each line half-divides the previous line by \"1\" and \"0\" again, as shown in Figure 1a. Another pattern is balanced gray coding, which is mentioned in [19] as an alternative for QLC data modulation. The term \"balanced\" means that each line of the mapping table has almost the same times of toggling between \"1\" and \"0\". Since the errors in the flash is mainly due to the \(V_{th}\) in the cell being shifted to the neighbouring levels by the noise interference, using gray coding can minimize the number of bit errors caused by the shift. Data are programmed or erased in the NAND flash cells through the Fowler-Nordheim (FN) tunnelling effect [20]. The level of the program voltage can be controlled by how much charge the cell stores since the program voltage is proportional to the tunnelling charge density in the cell. When the 1/2 gray coding data modulation is used, the data are stored via ISPP, which increases the threshold voltage \(V_{th}\) step by step to charge a cell to a certain program voltage level. The tunnelling electrons of the cell are gradually stored and accumulated to a certain level as required. When the balanced gray coding method is used, the data are stored in a cache first, and the cells are then charged to the voltage levels by incremental steps or in one pass. Data are read from cells by comparing \(V_{th}\) with \(V_{r}\)s on each page to demodulate them to corresponding codes, as shown in Figure 1a,b. However, the widths of discriminant intervals are different on pages and wider interval has a higher tolerance to errors caused by the shift of \(V_{th}\). Therefore, the frames from the upper page have higher frame error rates (FER) than the lower page. The experimental data of MLC in [21] shows that the error rate on the upper page has already been slightly higher than the lower page. Although the difference is not much problematic in MLC because of its low storage density, it will be in QLC and PLC as the storage density goes higher and FER of the most upper page can become huge, as shown in Figures 2 and 3. The unbalanced page error rates (PER) will cause inaccuracy in RBER estimation. The balanced gray coding modulation has less unbalanced PER, but there is still at least one page having higher PER than the others. We use PLC to illustrate the situation because it is the flash of the highest storage density currently known, so the situation is more obvious on it. As shown in Figure 2, the PERs are hugely unbalanced when 1/2 gray coding modulation is used, and frames from page 4 have FERs about 2.5 times as high as the RBER of the NAND flash. Meanwhile, the errors grow much faster on upper pages that the slope of page 4 is 9.7 times of page 0. Consequently, a very large FER will appear on page 4, causing inaccurate estimation as the sample frames are from different pages. When the balanced modulation is used, in Figure 3, the PERs are still not completely balanced that the frames from page 4 still have FERs about 1.5 times of the RBER, which will also affect the accuracy. The accuracy of RBER estimation will be affected by whether every frame sampled for the RBER estimator having similar FER. Since both types of modulation are possibly used in HSD flash, it is important that the RBER estimation method can be compatible with them both to balance the errors. To meet this requirement, an interleaving module is applied to alleviate the effect of the data modulations and making FERs of each frame as equally as possible, in order to achieve more accurate estimation.