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 />

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

Many cases exist other than the ones previously given; for example, where the message does not start on<br />

a word boundary.<br />

<strong>10</strong>.1.5.14.3.2.2.2 <strong>Memory</strong>-Mapping of the ECC<br />

The ECC (or remainder) is presented by the BCH module as a single <strong>10</strong>4-bit (or 52-bit), little-endian<br />

vector. It is up to the software to fetch those 13 bytes (or 6 bytes) from the modules interface, and then<br />

store them to the NAND spare area (page write) or to an intermediate buffer for comparison with the<br />

stored ECC (page read). There are no constraints on the ECC mapping inside the spare area: it is<br />

software-controlled.<br />

However, it is advised to maintain a coherence in the respective formats of the message or the ECC<br />

remainder once they have been read out of the NAND. The error correction algorithm works from the<br />

complete codeword (concatenated message and remainder) once an error as been detected. The creation<br />

of this codeword must be made as straightforward as possible.<br />

There are cases where the same NAND access contains both data and the ECC protecting that data. This<br />

is the case when the data/ECC boundary (which can be on any nibble) does not coincide with an access<br />

boundary. The ECC is calculated on-the-fly following the write. In that case, the write must also contain<br />

part of the ECC because it is impossible to insert the ECC on-the-fly. Instead:<br />

• During the initial page write (BCH encoding), the ECC is replaced by dummy bits. The BCH encoder is<br />

by definition turned OFF during the ECC section, so the BCH result is unmodified.<br />

• During a second phase, the ECC is written to the correct location, next to the actual data.<br />

• The completed line buffer is then written to the NAND array.<br />

<strong>10</strong>.1.5.14.3.2.2.3 Wrapping Modes<br />

For a given wrapping mode, the module automatically goes through a specific number of sections, as data<br />

is being fed into the module. For each section, the BCH core can be enabled (in which case the data is<br />

fed to the BCH divider) or not (in which case the BCH simply counts to the end of the section). When<br />

enabled, the data is added to the ongoing calculation for a given sector number (for example, number 0).<br />

Wrapping modes are described below. To get a better understanding and see the real-life read and write<br />

sequences implemented with each mode, see Section <strong>10</strong>.1.5.14.3.2.3.<br />

For each mode:<br />

• A sequence describes the mode in pseudo-language, with the size and the buffer used for ECC<br />

processing (if ON) for each section. The programmable lengths are size, size0, and size1.<br />

• A checksum condition is given. If the checksum condition is not respected for a given mode, the<br />

module behavior is unpredictable. S is the number of sectors in the page; size0 and size1 are the<br />

section sizes programmed for the mode, in nibbles.<br />

Wrapping modes 8, 9, <strong>10</strong>, and 11 insert a 1-nibble padding where the BCH processing is OFF. This is<br />

intended for t = 4 ECC, where ECC is 6 bytes long and the ECC area is expected to include (at least) one<br />

unused nibble to remain byte-aligned.<br />

<strong>10</strong>.1.5.14.3.2.2.4 Manual Mode (0x0)<br />

This mode is intended for short sequences, added manually to a given buffer through the software data<br />

port input. A complete page may be built out of several such sequences.<br />

To process an arbitrary sequence of 4-bit nibbles, accesses to the software data port shall be made,<br />

containing the appropriate data. If the sequence end does not coincide with an access boundary (for<br />

example, to process 5 nibbles = 20 bits in 16-bit access mode) and those nibbles need to be skipped, a<br />

number of unused nibbles shall be programmed in size1 (in the same example: 5 nibbles to process + 3 to<br />

discard = 8 nibbles = exactly 2 x 16-bit accesses: we must program size0 = 5, size1 = 3).<br />

NOTE: In the following figures size and size0 are the same parameter.<br />

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

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

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

Saved successfully!

Ooh no, something went wrong!