FIGURE 1
flash is placed into that will primarily
define the product lifetime.
What is Wear-Leveling?
Wear-leveling is a process to ensure
that an entire flash memory device
or an array of devices is used in a
uniform fashion in order to extend the
overall lifetime of the flash.
For a simplistic example of wear-
leveling, let’s look at a data recorder
with these characteristics:
• Application: The device collects and
stores the past 24 hours of field data
by simply writing and rewriting the
data to the same location on the flash.
• File size of data to be recorded:
128KB
• Erase block size (of the flash): 128KB
• Flash memory endurance: 1,000
cycles With one spare erase block, the
device is assumed to use one cycle
per day each year:
(1,000 cycles ÷ 365 days) * 1 spare
erase blocks = 2.74 years
In this example, it would take about
2.74 years to cycle that one erase
sector 1,000 times.
For the data recorder device to
accommodate the write erase rules
of flash memory, it would have to
complete an erase operation to start
writing the next day’s set of data. To
make the data recorder more robust -
to ensure that it doesn’t lose a whole
day’s worth of data - we can set aside
a second erase block, and erase the
first block only after the second set of
data was recorded. The resulting side
effect is the introduction of a simple
wear-leveling scheme.
With two spare erase blocks, the
device is assumed one cycle every
two days each year:
(1,000 cycles ÷ 365 days) * 2 spare
erase blocks = 5.48 years
With these parameters, the period of
time prior to cycling the flash to its
lifetime has just been increased to
almost 5.5 years!
This simple example shows how
distributing a fixed set of writes across
more flash sectors can increase the
period of time prior to cycling the flash
to its specified limits. The following
sections describe how to account for
the important variables associated
with wear-leveling techniques, and
determine the expected lifetime of the
flash in any application.
The figures on the next page depict
the concept of wear-leveling. The
flash disk in this example has a
maximum endurance of 100,000
cycles. Figure 1 represents a disk that
does not employ any wear-leveling
software, while Figure 2 shows a disk
that is managed with wear-leveling
schemes. Note that the sectors that
have exceeded the 100,000 cycles in
Figure 1 are no longer able to store
data, and have corrupted the data
that they were storing. These sectors
represent the high-use areas of the
disk. On a FAT disk for example, this
may be where the FAT table is stored
and corruption here would render
the entire file system unreadable.
Lower use areas of the disk, which
may include application and operating
For this paper, we measured
NAND flash configured
for SLC, or Single-Level
Cell.
Another
common
configuration is Multi-Level
Cell (MLC) which stores
multiple bits per flash cell.
This technique results in
considerably less endurance,
ranging from 10,000 down
to 300 for the smallest
densities. It also consumes
higher power and has lower
write speeds, though the
flash media is often less
expensive. With P/E cycles
in the hundreds, it is even
more critical that effective
wear-leveling is used to
make MLC an acceptable
choice for industrial and
commercial uses.
Wear-Leveling critical for
MLC flash media
46 l New-Tech Magazine Europe