A method of storing data in and recovering data from a persistent memory device, comprising:
- storing data elements in memory comprising a plurality of banks of nonvolatile memory cells, each bank comprising one or more die, each die comprising a memory array having a plurality of memory blocks including even blocks and odd blocks, each memory block having a plurality of pages, including even pages and odd pages;
- wherein the one or more die of each bank are distinct from the one or more die of every other bank of the plurality of banks;
- wherein, the memory is logically divided into a set of quadrants, each quadrant including, for every bank in the plurality of banks, one or more even blocks and one or more odd blocks, and for each block in the quadrant, one or more even pages and one or more odd pages;
- storing in each quadrant a set of row check words and a set of diagonal check words;
- each row check word in the quadrant comprising a value encoded with a result of a mathematical operation performed on a respective row set comprising a set of data elements corresponding to the row check word;
- each diagonal check word in the quadrant comprising a value encoded with a result of a mathematical operation performed on a respective diagonal set comprising a set of data elements corresponding to the diagonal check word;
- reading a respective data element from a respective quadrant of the memory, and
- in accordance with a determination that the respective data element is not recoverable using a first level data correction methodology, recovering the respective data element using a respective check word, comprising a row check word of the set of row check words stored in the respective quadrant of the memory or a diagonal check word of the set of diagonal check words stored in the respective quadrant of the memory, by performing a complementary mathematical operation on the respective check word with all data elements, excluding the respective data element, of a set of data elements corresponding to the respective check word;
- wherein:
- no more than two data elements in the row set for a respective row check word are stored in the same bank of the plurality of banks;
- a first portion of the data elements in the row set are stored in a first set of blocks, the first set of blocks comprising entirely even or entirely odd blocks;
- a first complementary portion of the data elements in the row set are stored in a second set of blocks, the second set of blocks comprising a set of blocks complementary to the first set of blocks and comprising entirely odd blocks or entirely even blocks, wherein:
- a second portion of the data elements in the row set are stored in a first set of pages, the first set of pages comprising entirely even pages or entirely odd pages;
- a second complementary portion of the data elements in the row set are stored in a second set of pages, the second set of pages comprising a set of pages complementary to the first set of pages and comprising entirely odd pages or entirely even pages;
- no more than two data elements in the diagonal set for a respective diagonal check word are stored in the same bank of the plurality of banks;
- a first portion of the data elements in the diagonal set are stored in the first set of blocks;
- a first complementary portion of the data elements in the diagonal set are stored in the second set of blocks;
- and
- all the data elements in the diagonal set are stored in a single set of pages, the single set of pages comprising only pages in the first set of pages or only pages in the second set of pages.