Multi-Channel Flash Module with Plane-Interleaved Sequential ECC Writes and Background Recycling to Restricted-Write Flash Chips
First Claim
1. A restorable plane-interleaved flash-memory system comprising:
- flash memory arranged as blocks of multiple pages, wherein pages are written and blocks are erased, wherein individual pages are not individually erasable except by erasing all pages in a physical block;
wherein the flash memory is further arranged into a first plane, a second plane, a third plane, and a fourth plane that are plane-interleaved and accessible in parallel;
a volatile logical-physical mapping table storing mapping entries, wherein a mapping entry stores a logical address of data from a host and a physical block address (PBA) indicating a location of the data within the flash memory;
wherein the mapping entry further comprises a plane number and a page number;
a binary counter having a least-significant bit (LSB), a second LSB having a higher significance than the LSB, and middle bits having a higher significance than the second LSB;
a physical sequential address register, coupled to the binary counter, for storing a generated block number, wherein the middle bits have a higher significance than the second LSB in the generated block number, the second LSB being shifted to a higher bit position in the generated block number;
a page counter indicating the page number in the physical block in the flash memory;
an interleave incrementer for incrementing the LSB and the second LSB and not incrementing the middle bits when host data is to be written to a new page and all pages in a physical block of the fourth plane have not been yet filled;
a page incrementer for incrementing a page count when host data is to be written to a new page and when the LSB and the second LSB indicate the fourth plane and when empty pages are available in the physical block; and
a block incrementer for incrementing the middle bits when the LSB and the second LSB indicate the fourth plane and no empty pages are available in the physical block;
wherein the LSB and the second LSB are written to the mapping entry as the plane number, and the page count is written to the mapping entry as the page number when host data is written to the physical block corresponding to the mapping entry;
wherein the generated block number is written to the mapping entry as the physical block address, the generated block number having the second LSB shifted to a most-significant bit (MSB) of the physical block address;
a table restorer, coupled to the physical sequential address counter, for restoring mapping entries in the volatile logical-physical mapping table by accessing blocks of the flash memory in a plane-interleaved order determined by the physical sequential address counter, whereby the volatile logical-physical mapping table is restored from flash memory in the plane-interleaved order using the second LSB as a most-significant bit (MSB) of the physical block address.
2 Assignments
0 Petitions
Accused Products
Abstract
A RAM mapping table is restored from flash memory using plane, block, and page addresses generated by a physical sequential address counter. The RAM mapping table is restored following a plane-interleaved sequence generated by the physical sequential address counter using interleaved bits extracted from the lowest bits of the logical block index. These plane-interleave bits are split into a LSB and a MSB, with middle physical block bits between the LSB and MSB. The physical sequential address counter generates a physical block number by incrementing the plane-interleave bits before the middle physical block bits, and then relocating the MSB to above the middle physical block bits. This causes blocks to be accessed in a low-high sequence of 0, 1, 4096, 4097, 2, 3, 4098, 4099, etc. in the four planes of flash memory. Background recycling and ECC writes are also performed.
144 Citations
20 Claims
-
1. A restorable plane-interleaved flash-memory system comprising:
-
flash memory arranged as blocks of multiple pages, wherein pages are written and blocks are erased, wherein individual pages are not individually erasable except by erasing all pages in a physical block;
wherein the flash memory is further arranged into a first plane, a second plane, a third plane, and a fourth plane that are plane-interleaved and accessible in parallel;
a volatile logical-physical mapping table storing mapping entries, wherein a mapping entry stores a logical address of data from a host and a physical block address (PBA) indicating a location of the data within the flash memory;
wherein the mapping entry further comprises a plane number and a page number;
a binary counter having a least-significant bit (LSB), a second LSB having a higher significance than the LSB, and middle bits having a higher significance than the second LSB;
a physical sequential address register, coupled to the binary counter, for storing a generated block number, wherein the middle bits have a higher significance than the second LSB in the generated block number, the second LSB being shifted to a higher bit position in the generated block number;
a page counter indicating the page number in the physical block in the flash memory;
an interleave incrementer for incrementing the LSB and the second LSB and not incrementing the middle bits when host data is to be written to a new page and all pages in a physical block of the fourth plane have not been yet filled;
a page incrementer for incrementing a page count when host data is to be written to a new page and when the LSB and the second LSB indicate the fourth plane and when empty pages are available in the physical block; and
a block incrementer for incrementing the middle bits when the LSB and the second LSB indicate the fourth plane and no empty pages are available in the physical block;
wherein the LSB and the second LSB are written to the mapping entry as the plane number, and the page count is written to the mapping entry as the page number when host data is written to the physical block corresponding to the mapping entry;
wherein the generated block number is written to the mapping entry as the physical block address, the generated block number having the second LSB shifted to a most-significant bit (MSB) of the physical block address;
a table restorer, coupled to the physical sequential address counter, for restoring mapping entries in the volatile logical-physical mapping table by accessing blocks of the flash memory in a plane-interleaved order determined by the physical sequential address counter, whereby the volatile logical-physical mapping table is restored from flash memory in the plane-interleaved order using the second LSB as a most-significant bit (MSB) of the physical block address. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A method for restoring a mapping table in a plane-interleaved order of a flash memory comprising:
-
incrementing a binary counter for each physical block in the flash memory read to generate a binary count value;
(a) relocating a penultimate least-significant bit (LSB) having a next-higher significance than a LSB of the binary count value from the binary counter to a most-significant bit (MSB) position to form a split-interleave count value having a LSB interleave bit that is a LSB of the split-interleave count value and a MSB interleave bit that is a MSB of the split-interleave count value;
using the MSB interleave bit and the LSB interleave bit to form plane-interleave bits that identify a plane of the flash memory for access;
using the split-interleave count value as a physical block number to identify a physical block of the flash memory for access;
reading a logical address from a spare area of the physical block of flash memory for a page within the physical block of the flash memory identified by a page counter and the physical block number in a plane selected by the plane-interleave bits;
locating a matching mapping entry in the mapping table using the logical address;
writing the split-interleave count value as a physical block number to the matching mapping entry;
when additional physical blocks in the flash memory have not yet been accessed during restoring of the mapping table;
incrementing only the LSB and the penultimate LSB of the binary counter and incrementing the page counter when all pages in a physical block of a last plane have not yet been read;
incrementing the binary counter and resetting the page counter when all pages in a physical block of the last plane have been read; and
repeating from (a), whereby the split-interleave count value formed by re-arranging the penultimate LSB is written to the matching mapping entry in a sequence of plane-interleaved physical block numbers. - View Dependent Claims (12)
-
-
13. The method of claim 13 further comprising:
-
clearing sector valid bits in a physical page valid table that has valid bits for pages in blocks in the flash memory for sectors that are not valid in the physical block; and
setting sector valid bits in the physical page valid table for sectors that are valid in the physical block.
-
-
14. A flash-memory controller comprising:
-
multi-level-cell (MLC) flash memory means for storing multiple bits of data per physical flash-memory cell, arranged as blocks of multiple pages, wherein pages are written and blocks are erased, wherein individual pages are not individually erasable except by erasing all pages in a block;
volatile logical-physical mapping table means for storing mapping entries, wherein a mapping entry stores a logical address of data from a host and a physical block address (PBA) indicating a location of the data within the MLC flash memory means and a page number of a page within the physical block;
volatile usage table means for storing valid bits for pages in the MLC flash memory means, wherein a valid bit for a page in the MLC flash memory means indicates a valid state when the page contains valid data, a stale state when the page contains data that has been replaced by newer data stored in a different page in the MLC flash memory means, and an erased state when the page has been erased and not yet written with data from the host;
physical sequential address counter means for generating physical block addresses in a high-low plane-interleaved sequence wherein a low interleave bit is toggled twice as frequently as a high interleave bit, wherein the PBA is formed from the high interleave bit, middle bits, and the low interleave bit, wherein the high interleave bit has a higher significance than the middle bits, and the middle bits have higher significance than the low interleave bit in the PBA;
middle increment means for incrementing the middle bits only when all pages in a block have been written;
low plane increment means for incrementing the low interleave bit for each new page of data written to the MLC flash memory means;
high plane increment means for incrementing the high interleave bit for every second new page of data written to the MLC flash memory means; and
table restore means, coupled to the physical sequential address counter means, for restoring mapping entries in the volatile logical-physical mapping table means by accessing blocks of the MLC flash memory means in a plane-interleaved order determined by the physical sequential address counter means. - View Dependent Claims (15, 16, 17, 18, 19, 20)
-
Specification