01.08.2013 Views

Chapter 10 Memory Subsystem.pdf

Chapter 10 Memory Subsystem.pdf

Chapter 10 Memory Subsystem.pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Public Version<br />

www.ti.com General-Purpose <strong>Memory</strong> Controller<br />

• When the calculated ECC is replaced by dummy accesses, it must be written to the cache in a<br />

second, separate phase. The ECC module is disabled during that time.<br />

• NAND writes its cache line (page) to the array.<br />

Typical page read sequence:<br />

• Sequential read of a page. ECC is calculated on-the-fly.<br />

• ECC module buffers status determines the presence of errors.<br />

2. Accesses to several memories may be interleaved by the GPMC, but only one of those memories can<br />

be a NAND using the BCH engine at a time; in other words, only one BCH calculation (for example, for<br />

a single page) can be on-going at any time. Note also that the sequential nature of NAND accesses<br />

guarantees that the data is always written / read out in the same order. BCH-relevant accesses are<br />

selected by the GPMCs chip-select.<br />

3. Each page may hold up to 4 Kbytes of data, spare bytes not included. This means up to 8 * 512-byte<br />

BCH messages. Since all the data is written / read out first, followed by the BCH ECC, this means that<br />

the BCH engine must be able to hold 8 <strong>10</strong>4-bit remainders or syndromes (or smaller, 52-bit ones) at<br />

the same time.<br />

The BCH module has the capacity to store all remainders internally. After the page start, an internal<br />

counter is used to detect the 512-byte sector boundaries. On those boundaries, the current remainder<br />

is stored and the divider reset for the next calculation. At the end of the page, the BCH module<br />

contains all remainders.<br />

4. NAND access cycles hold 8 or 16 bits of data each (1 or 2 bytes); Each NAND cycle takes at least 4<br />

cycles of the GPMCs internal clock. This means the NAND flash timing parameters must define a<br />

RDCYCLETIME and a WRCYCLETIME of at least 4 clock cycles after optimization when using the<br />

BCH calculator.<br />

5. The spare area is assumed to be large enough to hold the BCH ECC, that is, to have at least a<br />

message of 13 bytes available per 512-byte sector of data. The zone of unused spare area by the<br />

ECC may or may not be protected by the same ECC scheme, by extending the BCH message beyond<br />

512 bytes (maximum codeword is <strong>10</strong>23-byte long, ECC included, which leaves a lot of space to cover<br />

some spares bytes).<br />

<strong>10</strong>.1.5.14.3.2.2 <strong>Memory</strong>-Mapping of the BCH Codeword<br />

BCH encoding considers a block of data to protect as a polynomial message M(x). In our standard case,<br />

512 bytes of data (that is, 2 12 bits = 4096 bits) are seen as a polynomial of degree 2 12 - 1 = 4095, with<br />

parameters ranging from M0 to M4095. For 512 bytes of data, 52 bits are required for 4-bit error<br />

correction, and <strong>10</strong>4 bits are required for 8-bit error correction. The ECC is a remainder polynomial R(x) of<br />

degree <strong>10</strong>3 (or 51, depending on the selected mode). The complete codeword C(x) is the concatenation of<br />

M(x) and R(x) as shown in Table <strong>10</strong>-6.<br />

Table <strong>10</strong>-6. Flattened BCH Codeword Mapping (512 Bytes + <strong>10</strong>4 Bits)<br />

Message M(x) ECC R(x)<br />

Bit number M4095 ... M0 R<strong>10</strong>3 ... R0<br />

If the message is extended by the addition of spare bytes to be protected by the same ECC, the principle<br />

is still valid. For example, a 3-byte extension of the message gives a polynomial message M(x) of degree<br />

((512 + 3) * 8) - 1 = 4119, for a total of 3+13 = 16 spare bytes of spare, all protected as part of the same<br />

codeword.<br />

The message and the ECC bits are manipulated and mapped in the GPMC byte-oriented system. The<br />

ECC bits are stored in GPMC_BCH_RESULT0_i, GPMC_BCH_RESULT1_i, GPMC_BCH_RESULT2_i,<br />

and GPMC_BCH_RESULT3_i (where i = 0 to 7).<br />

<strong>10</strong>.1.5.14.3.2.2.1 <strong>Memory</strong>-Mapping of the Data Message<br />

The data message mapping shall follow the following rules:<br />

• Bit endianness within a byte is little-endian, that is, the bytes LS bit is also the lowest-degree<br />

polynomial parameter: a byte b7-b0 (with b0 the LS bit) represents a segment of polynomial b7 * x (7+i) +<br />

b6 * x (6+i) + ... + b0 * x i<br />

SPRUGN4L–May 20<strong>10</strong>–Revised June 2011 <strong>Memory</strong> <strong>Subsystem</strong><br />

Copyright © 20<strong>10</strong>–2011, Texas Instruments Incorporated<br />

2151

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!