The data message mapping must follow the following rules:
- Bit endianness within a byte is little-endian; that is, the bytes LSB is also the lowest-degree polynomial parameter: a byte b7-b0 (with b0 the LSB) represents a segment of polynomial b7 * x(7+i) + b6 * x(6+i) + ... + b0 * xi
- The message is mapped in the NAND starting with the highest-order parameters, that is, in the lowest addresses of a NAND page.
- Byte endianness within the 16-bit words in the NAND is big-endian (that is, the same message mapped in 8- and 16-bit memories has the same content at the same byte address).
Note: The BCH module has no visibility over actual addresses. The most important point is the sequence of data words the BCH sees. However, the NAND page is always scanned incrementally in read and write accesses, which produces the mapping patterns described in the following.
Table 12-3231 and Table 12-3232 describe the mapping of the same 512-byte vector (typically, a BCH message) in the NAND memory space. The byte address is only an offset module 512 (0x200), because the same page may contain several contiguous 512-byte sectors (BCH blocks). The LSB and MSB are, respectively, the bits M0 and M(212–1) of the codeword mapping discussed previously. In both cases the data vectors are aligned; that is, their boundaries coincide with the RAM data word boundaries.
Table 12-3231 Aligned Message Byte Mapping in 8-Bit NANDByte Offset | 8-Bit Word |
---|
0x000 | (MSB) Byte 511 (0x1FF) |
0x001 | Byte 510 (0x1FE) |
... | ... |
0x1FF | Byte 0 (0x0) (LSB) |
Table 12-3232 Aligned Message Byte Mapping in 16-Bit NANDByte Offset | 16-Bit Word MSB | 16-Bit Word LSB |
---|
0x000 | Byte 510 (0x1FE) | (MSB) Byte 511 (0x1FF) |
0x002 | Byte 508 (0x1FC) | Byte 509 (0x1FD) |
... | ... | ... |
0x1FE | Byte 0 (0x0) | (LSB) Byte 1 (0x1) |
Table 12-3233 through Table 12-3238 list the mapping in memory of arbitrarily-sized messages, starting on access (byte or 16-bit word) boundaries for more clarity. Note that message may actually start and stop on arbitrary nibbles. A nibble is a 4-bit entity. The unused nibbles are not discarded, and they can still be used by the BCH module, but as part of the next message section (for example, on the ECC of another sector).
Table 12-3233 Aligned Nibble Mapping of Message in 8-Bit NANDByte Offset | 8-Bit Word |
---|
| 4-Bit Most Significant Nibble | 4-Bit Least Significant Nibble |
1 | (MSB) Nibble S-1 | Nibble S-2 |
2 | Nibble S-3 | Nibble S-4 |
... | ... | ... |
S/2 – 2 | Nibble 3 | Nibble 2 |
S/2 – 1 | Nibble 1 | Nibble 0 (LSB) |
Table 12-3234 Misaligned Nibble Mapping of Message in 8-Bit NANDByte Offset | 8-Bit Word |
---|
| 4-Bit Most Significant Nibble | 4-Bit Least Significant Nibble |
1 | (MSB) Nibble S-1 | Nibble S-2 |
2 | Nibble S-3 | Nibble S-4 |
... | ... | ... |
(S + 1) / 2 – 2 | Nibble 2 | Nibble 1 |
(S + 1) / 2 – 1 | Nibble 0 (LSB) | |
Table 12-3235 Aligned Nibble Mapping of Message in 16-Bit NANDByte Offset | 16-Bit Word |
---|
| 4-Bit Most Significant Nibble | 4-Bit Least Significant Nibble |
0 | Nibble S-3 | Nibble S-4 | (MSB) Nibble S-1 | Nibble S-2 |
2 | Nibble S-7 | Nibble S-8 | Nibble S-5 | Nibble S-6 |
... | ... | ... |
S/2 – 4 | Nibble 5 | Nibble 4 | Nibble 7 | Nibble 6 |
S/2 – 2 | Nibble 1 | Nibble 0 (LSB) | Nibble 3 | Nibble 2 |
Table 12-3236 Misaligned Nibble Mapping of Message in 16-Bit NAND (1 Unused Nibble)Byte Offset | 16-Bit Word |
---|
| 4-Bit Most Significant Nibble | 4-Bit Least Significant Nibble |
0 | Nibble S-3 | Nibble S-4 | (MSB) Nibble S-1 | Nibble S-2 |
2 | Nibble S-7 | Nibble S-8 | Nibble S-5 | Nibble S-6 |
... | ... | ... |
(S + 1) / 2 – 4 | Nibble 4 | Nibble 3 | Nibble 6 | Nibble 5 |
(S + 1) / 2 – 2 | Nibble 0 (LSB) | | Nibble 2 | Nibble 1 |
Table 12-3237 Misaligned Nibble Mapping of Message in 16-Bit NAND (2 Unused Nibbles)Byte Offset | 16-Bit Word |
---|
| 4-Bit Most Significant Nibble | 4-Bit Least Significant Nibble |
0 | Nibble S-3 | Nibble S-4 | (MSB) Nibble S-1 | Nibble S-2 |
2 | Nibble S-7 | Nibble S-8 | Nibble S-5 | Nibble S-6 |
... | ... | ... |
(S + 2) / 2 – 4 | Nibble 3 | Nibble 2 | Nibble 5 | Nibble 4 |
(S + 2) / 2 – 2 | | | Nibble 1 | Nibble 0 (LSB) |
Table 12-3238 Misaligned Nibble Mapping of Message in 16-Bit NAND (3 Unused Nibbles)Byte Offset | 16-Bit Word |
---|
| 4-Bit Most Significant Nibble | 4-Bit Least Significant Nibble |
0 | Nibble S-3 | Nibble S-4 | (MSB) Nibble S-1 | Nibble S-2 |
2 | Nibble S-7 | Nibble S-8 | Nibble S-5 | Nibble S-6 |
... | ... | ... |
(S + 3) / 2 – 4 | Nibble 2 | Nibble 1 | Nibble 4 | Nibble 3 |
(S + 3) / 2 – 2 | | | Nibble 0 (LSB) | |
Many other cases exist than those given in the previous tables; for example, where the message does not start on a word boundary.