Two-level RAM lookup table for block and page allocation and wear-leveling in limited-write flash-memories
First Claim
1. A flash-memory sub-system comprising:
- a flash-memory array of physical blocks of flash memory identified by a physical-block address (PBA), a physical block in the flash-memory array of physical blocks having a plurality of pages, a page in the plurality of pages having a data sector that can be written with arbitrary data only once before requiring an erase of the physical block;
wherein the data sector is block-addressable and not randomly-addressable, wherein all bytes of the data sector are accessible together as a block and not accessible as individual bytes;
a data area formed from physical blocks of flash memory in the flash-memory array;
wherein each page in the plurality of pages in the physical blocks stores host data from a host in the data sector for the page;
a logical-sector address (LSA) received from the host, the LSA from the host being a host address for the host data from the host;
a first-level volatile lookup table having a plurality of mapping entries, wherein each mapping entry in the plurality of mapping entries is for storing a PBA mapping to a physical block in the flash-memory array of physical blocks for a logical block address (LBA);
a second-level volatile lookup table having a plurality of rows, wherein each row in the plurality of entries is for storing a plurality of page-valid bits that indicate when pages in the plurality of pages in a physical block in the flash-memory array of physical blocks contain valid host data; and
a modulo generator, receiving the LSA from the host, for performing a modulo operation on the LSA to generate a modulo remainder that identifies a selected page-valid bit in a selected row of the second-level volatile lookup table, the modulo generator also generating a quotient that is the LBA that is applied to the first-level volatile lookup table to select a selected mapping entry;
the selected mapping entry for storing a PBA mapping indicating a selected physical block in the flash-memory array of physical blocks for storing host data identified by the LSA;
wherein the PBA mapping from the selected mapping entry of the first-level volatile lookup table is applied to the second-level volatile lookup table to select the selected row in the plurality of rows;
wherein the flash-memory array is restrictive, allowing writes to pages in the plurality of pages in an ascending page order within a physical block in the flash-memory array of physical blocks, wherein regressive page-writes to a page in the plurality of pages in a descending order is prohibited;
regressive page-write detector means, receiving a subset of the page-valid bits from the selected row, the subset comprising page-valid bits that are for pages in the plurality of pages after a page in the plurality of pages for the selected page-valid bit, for signaling a regressive page-write when any page-valid bit in the subset of the page-valid bits indicates valid host data;
whereby regressive page-writes are detected from the page-valid bits from the second-level volatile lookup table and whereby the first-level volatile lookup table stores the PBA mapping that selects a row of the page-valid bits in the second-level volatile lookup table.
2 Assignments
0 Petitions
Accused Products
Abstract
A restrictive multi-level-cell (MLC) flash memory prohibits regressive page-writes. When a regressive page-write is requested, an empty block having a low wear-level count is found, and data from the regressive page-write and data from pages stored in the old block are written to the empty block in page order. The old block is erased and recycled. A two-level look-up table is stored in volatile random-access memory (RAM). A logical page address from a host is divided by a modulo divider to generate a quotient and a remainder. The quotient is a logical block address that indexes a first-level look-up table to find a mapping entry with a physical block address that selects a row in a second-level look-up table. The remainder locates a column in the row in the second-level look-up table. If any page-valid bits above the column pointed to by the remainder are set, the write is regressive.
-
Citations
18 Claims
-
1. A flash-memory sub-system comprising:
-
a flash-memory array of physical blocks of flash memory identified by a physical-block address (PBA), a physical block in the flash-memory array of physical blocks having a plurality of pages, a page in the plurality of pages having a data sector that can be written with arbitrary data only once before requiring an erase of the physical block; wherein the data sector is block-addressable and not randomly-addressable, wherein all bytes of the data sector are accessible together as a block and not accessible as individual bytes; a data area formed from physical blocks of flash memory in the flash-memory array; wherein each page in the plurality of pages in the physical blocks stores host data from a host in the data sector for the page; a logical-sector address (LSA) received from the host, the LSA from the host being a host address for the host data from the host; a first-level volatile lookup table having a plurality of mapping entries, wherein each mapping entry in the plurality of mapping entries is for storing a PBA mapping to a physical block in the flash-memory array of physical blocks for a logical block address (LBA); a second-level volatile lookup table having a plurality of rows, wherein each row in the plurality of entries is for storing a plurality of page-valid bits that indicate when pages in the plurality of pages in a physical block in the flash-memory array of physical blocks contain valid host data; and a modulo generator, receiving the LSA from the host, for performing a modulo operation on the LSA to generate a modulo remainder that identifies a selected page-valid bit in a selected row of the second-level volatile lookup table, the modulo generator also generating a quotient that is the LBA that is applied to the first-level volatile lookup table to select a selected mapping entry; the selected mapping entry for storing a PBA mapping indicating a selected physical block in the flash-memory array of physical blocks for storing host data identified by the LSA; wherein the PBA mapping from the selected mapping entry of the first-level volatile lookup table is applied to the second-level volatile lookup table to select the selected row in the plurality of rows; wherein the flash-memory array is restrictive, allowing writes to pages in the plurality of pages in an ascending page order within a physical block in the flash-memory array of physical blocks, wherein regressive page-writes to a page in the plurality of pages in a descending order is prohibited; regressive page-write detector means, receiving a subset of the page-valid bits from the selected row, the subset comprising page-valid bits that are for pages in the plurality of pages after a page in the plurality of pages for the selected page-valid bit, for signaling a regressive page-write when any page-valid bit in the subset of the page-valid bits indicates valid host data; whereby regressive page-writes are detected from the page-valid bits from the second-level volatile lookup table and whereby the first-level volatile lookup table stores the PBA mapping that selects a row of the page-valid bits in the second-level volatile lookup table. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A method for writing pages of data to a restrictive flash memory that does not allow regressive page writes comprising:
-
receiving a logical page number (LPN) from a host computer; dividing the LPN by a number of pages per block to generate a quotient and a remainder; using the quotient as an index into a first-level look-up table to locate a mapping entry; reading a physical-block address (PBA) from the mapping entry in the first-level look-up table; using the PBA read from the mapping entry of the first-level look-up table as an index into a second-level look-up table to locate a selected row for the PBA; reading page-valid bits from the selected row of the second-level look-up table; determining when the host computer is requesting a regressive page-write; when the host computer is not requesting the regressive page-write, writing page data from the host computer to a selected page in a selected block of the restrictive flash memory, wherein the selected block is identified by the PBA, and wherein the selected page in the selected block is identified by the remainder, and setting a selected page-valid bit in the selected row of the second-level look-up table, wherein the selected page-valid bit is located within the selected row by the remainder; when the host computer is requesting the regressive page-write, identifying a new block that is empty of valid data; copying valid pages of data from an old block identified by the PBA to the new block; writing the page data from the host computer to a selected page in the new block, wherein the selected page in the new block is identified by the remainder; wherein copying the valid pages of data from the old block and writing the page data from the host computer are performed together in ascending page order wherein regressive page-writes are prohibited; over-writing the PBA in the mapping entry with a new PBA that identifies the new block; copying the page-valid bits read from the selected row to a new selected row in the second-level look-up table, wherein the new selected row is located by the new PBA; and setting a selected page-valid bit in the new selected row of the second-level look-up table, wherein the selected page-valid bit is located within the new selected row by the remainder, whereby the regressive page-write forces copying of the valid pages of page-data from the old block to the new block. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18)
-
Specification