Flash detection method and flash detection system

By performing erase, write, and multiple read operations on flash memory chips, and combining the statistics of the number of bit flips in multiple reads, multiple thresholds are set to solve the problem of missing bad blocks in flash memory detection, achieve more accurate bad block screening, and improve the read and write performance and quality of flash memory devices.

CN114283873BActive Publication Date: 2026-01-16HOSIN GLOBAL ELECTRONICS CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111342765.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-12
Publication Date
2026-01-16
Estimated Expiration
2041-11-12

AI Technical Summary

Technical Problem

Existing technologies for bad block detection of flash memory chips suffer from the problem of missed screening, which affects read and write performance and fails to completely screen out potential bad blocks.

Method used

By performing erase, write, and read operations on the test block, and combining multiple read data to count the number of bit flips, multiple preset thresholds are set to mark bad blocks, ensuring the accuracy and thoroughness of the screening.

Benefits of technology

It improves the accuracy of flash memory testing, reduces the omission of bad blocks, ensures the stability and quality of read and write performance of flash memory devices, and reduces testing time and costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114283873B_ABST
    Figure CN114283873B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data storage, and discloses a flash memory detection method and a flash memory detection system. The flash memory detection method comprises the following steps: selecting a to-be-tested block from a to-be-tested Die, and establishing a bad block table; executing an erase command on the to-be-tested block in units of blocks, and updating the mark of a block with an erase error in the bad block table to a first mark; executing a write-read operation on the to-be-tested block passing the erase test, and determining the first bit flip number of a current page; repeatedly reading the original data of the current page, determining the second bit flip number according to the reading result, if the first bit flip number of the page exceeds a first preset threshold; and updating the mark of the block where the current page is located in the bad block table to a second mark, if the second bit flip number exceeds a second preset threshold. The technical scheme provided by the application further excavates the blocks which are unstable in performance and are prone to errors in practice although the blocks pass the erase read-write once, can more accurately screen the bad blocks, and makes the flash memory detection more thorough.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of memory, in particular to a flash memory detection method and a flash memory detection system. BACKGROUND

[0002] Due to the physical characteristics of the flash memory particles, there are bad blocks in the flash memory particles by probability, and the bad blocks will seriously affect the read and write performance of the flash memory device. Therefore, quality detection and screening are needed before packaging the Die to prevent the use of particles with many bad blocks and poor quality as normal particles as much as possible, so as to affect the use experience.

[0003] At present, the detection of bad blocks in flash memory particles is usually combined with high-temperature test environment to perform erase, program and read operations on the blocks in the flash memory particles. The blocks that fail in these operation processes or the blocks whose number of bit flips exceeds the bit screening threshold are regarded as bad blocks. Since the bit flips of data in the flash memory particles exist by probability, the screening of bad blocks in the limited read operation test process may cause the situation of missing screening of bad blocks. SUMMARY

[0004] The main purpose of the present application is to provide a flash memory detection method and a flash memory detection system, which aims to solve the technical problems of missing detection of bad blocks and incomplete flash memory detection.

[0005] The first aspect of the present application provides a flash memory detection method, comprising:

[0006] selecting a to-be-tested block from a to-be-tested Die to establish a bad block table;

[0007] performing an erase command on the to-be-tested block in units of blocks to update the mark in the bad block table corresponding to the block that has an erase error to a first mark;

[0008] after erasing the to-be-tested block and updating the bad block table, performing a write-read operation on the to-be-tested block to determine the first number of bit flips of the current page in the to-be-tested block;

[0009] determining whether the first number of bit flips exceeds a first preset threshold;

[0010] if the first number of bit flips exceeds the first preset threshold, reading the original data of the current page multiple times to determine the second number of bit flips of the current page according to the multiple reading results;

[0011] determining whether the second number of bit flips exceeds a second preset threshold;

[0012] if the second number of bit flips exceeds the second preset threshold, updating the mark in the bad block table corresponding to the block where the current page is located to a second mark.

[0013] Optionally, in the first implementation of the first aspect of the present application, the Die comprises at least two Planes, and each Plane comprises a plurality of blocks, wherein the selecting the blocks to be tested from the Die to be tested and creating the bad block table comprises:

[0014] selecting the blocks to be tested from the Die to be tested uniformly, so that each Plane has the same number of selected blocks and the selected blocks are uniformly spaced from the unselected blocks;

[0015] creating a bad block table for recording the test results of the blocks to be tested, wherein each block to be tested in the bad block table corresponds to a mark for identifying the test result.

[0016] Optionally, in the second implementation of the first aspect of the present application, the sequentially executing the erase command on the blocks to be tested in units of blocks, and updating the mark corresponding to the block to be tested having the erase error in the bad block table to the first mark comprises:

[0017] traversing the blocks to be tested in units of blocks, and executing the erase operation on the currently traversed block to be tested;

[0018] determining whether the currently traversed block to be tested fails in the erase operation, and if so, updating the mark corresponding to the currently traversed block to be tested in the bad block table to the first mark;

[0019] determining whether the currently traversed block to be tested is the last block to be tested, and if so, ending the traversal.

[0020] Optionally, in the third implementation of the first aspect of the present application, the determining whether the currently traversed block to be tested fails in the erase operation comprises:

[0021] determining whether the threshold voltage of any memory cell of the block to be tested after the erase operation is greater than a preset threshold value;

[0022] if the threshold voltage of any memory cell of the block to be tested after the erase operation is greater than the preset threshold value, determining that the erase operation fails.

[0023] Optionally, in the fourth implementation of the first aspect of the present application, the executing the write-read operation on the block to be tested after erasing the block to be tested and updating the bad block table, and determining the first number of bit flips of the current page in the block to be tested comprises:

[0024] traversing the blocks to be tested in units of blocks, and checking the mark corresponding to the currently traversed block to be tested in the bad block table;

[0025] determining whether the mark corresponding to the currently traversed to-be-tested block in the bad block table is the first mark, and if not, writing preset test data into the currently traversed to-be-tested block;

[0026] determining whether the write operation of the currently traversed to-be-tested block fails, and if so, updating the mark corresponding to the currently traversed to-be-tested block in the bad block table to the third mark, and if not, traversing the currently traversed to-be-tested block in units of pages, and performing a read operation on a currently traversed page;

[0027] determining whether the read operation of the currently traversed page fails, and if so, updating the mark corresponding to the block in which the currently traversed page is located in the bad block table to the fourth mark, and if not, determining the first bit flip number of the currently traversed page.

[0028] Optionally, in a fifth implementation manner of the first aspect of the present application, the determining whether the read operation of the currently traversed page fails comprises:

[0029] performing the read operation on the currently traversed page, and determining that the read operation of the currently traversed page fails when the read data is partially different from the preset test data.

[0030] Optionally, in a sixth implementation manner of the first aspect of the present application, if the first bit flip number exceeds the first preset threshold, the original data of the currently traversed page is read multiple times, and a second bit flip number of the currently traversed page is determined according to the multiple read results, comprising:

[0031] if the first bit flip number exceeds the first preset threshold, the original data of the currently traversed page is read multiple times to obtain a first data set A={A1, A2, …, A i ,…,A n}, i=1, 2, …, n, A i represents the result of the ith read, and A

[0032] each first data in the first data set is subjected to an exclusive or operation with preset standard original data to obtain a second data set P={P1, P2, …, P i ,…,P n}, wherein P i is the ith second data, A i represents the ith data in the first data set, B0 represents the standard original data, and n represents the number of data in the first data set;

[0033] each second data in the second data set is subjected to an or operation to obtain third data R, wherein R=P1∨…∨P i ∨…∨P n , i=1, 2, 3, …, n;

[0034] counting the number of bit values of 1 in the third data to obtain a second number of bit flips.

[0035] The second aspect of the application provides a flash memory detection system;

[0036] The flash memory detection system comprises a flash memory device, a host, and a test board, the flash memory device comprises a plurality of dies, each die comprising a plurality of blocks; the host is coupled to the flash memory device; the host is in signal connection with the test board;

[0037] The host is configured to: select a to-be-tested block from a to-be-tested die, establish a bad block table and send an erase command to the test board, and update a mark in the bad block table corresponding to a block in which an erase error occurs to a first mark;

[0038] The test board is configured to: receive the erase command sent by the host, execute the erase command on the to-be-tested block in units of blocks in turn, and send an execution result to the host; receive a write-read operation command sent by the host, execute a write-read operation on the to-be-tested block, and send an execution result to the host; receive a read operation command sent by the host and execute the read operation command on a current page multiple times, and send multiple read results to the host;

[0039] The host is further configured to: after erasing the to-be-tested block and updating the bad block table, send a write-read operation command to the test board, determine a first number of bit flips of a current page in the to-be-tested block according to an execution result; determine whether the first number of bit flips exceeds a first preset threshold; if the first number of bit flips exceeds the first preset threshold, send a command for reading original data of the current page multiple times to the test board, determine a second number of bit flips of the current page according to multiple read results; determine whether the second number of bit flips exceeds a second preset threshold; and if the second number of bit flips exceeds the second preset threshold, update a mark in the bad block table corresponding to a block in which the current page is located to a second mark.

[0040] Optionally, in the first implementation manner of the second aspect of the application,

[0041] The host is further configured to: traverse the to-be-tested block in units of blocks, and check a mark corresponding to a currently traversed to-be-tested block in the bad block table; determine whether the mark corresponding to the currently traversed to-be-tested block in the bad block table is the first mark, and if not, send a write command to the test board;

[0042] The test board is further configured to: execute the write command sent by the host, write preset test data into the currently traversed to-be-tested block, and send a write command execution result to the host;

[0043] The host is also used to: determine whether the write operation of the currently traversed test block has failed; if so, update the mark corresponding to the currently traversed test block in the bad block table to the third mark; if not, traverse the currently traversed test block in units of pages and send a read command to the test board for the current page being traversed.

[0044] The test board is also used to: receive a read command for the current page sent by the host, perform a read operation on the current page, and send the read result to the host;

[0045] The host is also used to: determine whether the read operation of the current page has failed; if so, update the tag corresponding to the block where the current page is located in the bad block table to the fourth tag; if not, determine the number of first bit flips of the current page.

[0046] Optionally, in a second implementation of the second aspect of the present invention,

[0047] The host is also configured to: if the number of first bit flips exceeds the first preset threshold, send multiple commands to the test board to read the original data of the current page;

[0048] The test board is also used to: execute read commands multiple times on the current page to obtain a first data set A = {A1, A2, ..., Ai, ..., An}, i = 1, 2, ..., n, where Ai represents the result of the i-th read and is the i-th first data, and send the first data set to the host;

[0049] The host is further configured to: perform an XOR operation on each of the first data in the first data set with a preset standard original data to obtain a second data set P = {P1, P2, ..., P...} i ,…,P n}, where P i For the i-th second data, A i B0 represents the i-th data in the first data set, B0 represents the standard original data, and n represents the number of data in the first data set.

[0050] The host is further configured to: perform an OR operation on each of the second data in the second data set to obtain a third data R, where R = P1 ∨ … ∨ P i ∨…∨P n , i = 1, 2, 3, ..., n; count the number of bits with a value of 1 in the third data to obtain the number of second bit flips.

[0051] The technical scheme provided by the application has the advantages that the representative and uniform screening is performed on the several blocks in the to-be-tested Die, and the test efficiency is improved; in the read, write and read operation process of the selected to-be-tested block, in addition to the block with operation failure in the conventional test being marked as a bad block, the page with the first bit flip number exceeding the first preset threshold and without operation failure is further tested, the second bit flip number is determined according to the result of multiple read operations on the original data, the block in which the page with the second bit flip number exceeding the second preset threshold is located is also marked as a bad block, the block with unstable performance and prone to error although the read and write are successful at a certain time is further mined, the bad block is more accurately screened, and the flash memory detection is more thorough. BRIEF DESCRIPTION OF DRAWINGS

[0052] Figure 1 The first embodiment of the flash memory detection method in the embodiment of the application is shown in the figure.

[0053] Figure 2 The second embodiment of the flash memory detection method in the embodiment of the application is shown in the figure.

[0054] Figure 3 The third embodiment of the flash memory detection method in the embodiment of the application is shown in the figure.

[0055] Figure 4 The fourth embodiment of the flash memory detection method in the embodiment of the application is shown in the figure.

[0056] Figure 5 The embodiment of the flash memory detection system in the embodiment of the application is shown in the figure. DETAILED DESCRIPTION

[0057] The terms "first", "second", "third", "fourth" and the like (if any) in the description, claims and above drawings of the application are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" or "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product or device.

[0058] For the convenience of understanding, the specific flow of the embodiment of the application is described below, please refer to Figure 1 One embodiment of the flash memory detection method in the embodiment of the application includes:

[0059] 101. selecting the blocks to be tested from the Die to be tested, and establishing a bad block table;

[0060] It can be understood that the subject of the present application is a flash detection device.

[0061] Optionally, one Die contains at least two Planes, and one Plane includes a plurality of blocks. The selecting the blocks to be tested from the Die to be tested, and establishing a bad block table includes:

[0062] The blocks to be tested are selected evenly from the Die to be tested, so that the number of selected blocks in each Plane is the same and the interval between the selected blocks and the unselected blocks is uniform.

[0063] A bad block table is created for recording the test results of the blocks to be tested. Each block to be tested in the bad block table corresponds to a mark for identifying the test result.

[0064] For example, it is assumed that the Die to be tested contains two Planes, each Plane contains 6 rows and 3 columns, i.e. 18 blocks. The blocks are denoted as B ij , where i (i=1, 2, …, 6) represents the row number and j (j=1, 2, …, 6) represents the column number. The first three columns are the first Plane, and the fourth to sixth columns are the second Plane. The selected block set to be tested can be {B 12 , B 14 , B 16 , B 21 , B 23 , B 25 , B 32 , B 34 , B 36 , B 41 , B 43 , B 45 , B 52 , B 54 , B 56 , B 61 , B 63 , B 65}, so that 9 blocks are selected in each Plane, and the selected blocks are evenly distributed in the Plane.

[0065] In this embodiment, different marks are used to identify different test results and are recorded in the bad block table. The specific marking method is not limited, and for example, the numbers 0, 1, 2 and 3 can be used to mark four different test results, respectively.

[0066] 102. executing an erase command on the blocks to be tested in sequence in units of blocks, and updating the mark in the bad block table corresponding to the block in which an erase error occurs to a first mark;

[0067] 103、in the erasing the block to be tested and updating the bad block table, performing a write-read operation on the block to be tested, determining a first bit flip number of a current page in the block to be tested;

[0068] In this embodiment, the write-read operation refers to sequentially performing a write operation and a read operation on each page in the block to be tested. The write operation writes test data into the current page, and the read operation reads the current page. The first bit flip number refers to the number of bit flips in the read data, i.e., the number of error bits in the read data. When the number of error bits in the read data is within the range correctable by the error correction code of the block where the current page is located, the read operation is successful, and the error correction code corrects the error bits and returns the number of error bits, i.e., the first bit flip number.

[0069] 104、determining whether the first bit flip number exceeds a first preset threshold;

[0070] In this embodiment, the first preset threshold is a preset threshold, which can be dynamically set according to actual test requirements. The first preset threshold should be less than the maximum number of bit flips correctable by the error correction code.

[0071] 105、if the first bit flip number exceeds the first preset threshold, reading original data of the current page multiple times, and determining a second bit flip number of the current page according to the multiple reading results;

[0072] In this embodiment, the first preset threshold can be set to a value close to the maximum number of bit flips correctable by the error correction code. When the first bit flip number exceeds the first preset threshold but is less than the maximum number of bit flips correctable by the error correction code, the read operation of the current page can be successful, but the performance of the read operation of the current page is not stable enough, and the possibility of error in the next read operation is high. Therefore, the block where the current page is located can be a potential bad block, which can be regarded as a suspected bad block.

[0073] In this embodiment, further read operation testing is performed on the suspected bad block. If the first bit flip number of the current page exceeds the first threshold in a read operation of the current page, the original data of the current page is read multiple times. At this time, the read original data has not been corrected by the error correction code, and the error bits are retained. Multiple read operations can obtain multiple reading results that have not been corrected by the error correction code. According to these reading results, the second bit flip number of the current page can be further confirmed.

[0074] In this embodiment, the second bit flip number is the sum of the positions of the bit flip errors in the multiple reading processes of the current page. The same position bit is counted only once.

[0075] 106、determining whether the second bit flip number exceeds a second preset threshold;

[0076] In the embodiment, the second preset threshold is a preset threshold, which can be dynamically set according to actual needs, and the second preset threshold should be less than the maximum number of correctable bits of the error correction code.

[0077] 107、If the second number of bit flips exceeds the second preset threshold, the mark corresponding to the block where the current page is located in the bad block table is updated to a second mark.

[0078] In the embodiment, the second preset threshold can be set to a value close to or equal to the maximum number of error correction bits of the error correction code. When the second number of bit flips exceeds the second preset threshold, it indicates that the current page is extremely likely to fail in future read operations, further indicating that the block where the current page is located is a block with read-write performance close to a bad block, which can be regarded as a bad block.

[0079] In the embodiment of the application, a number of blocks in the Die to be tested are uniformly screened, which greatly reduces the number of blocks to be tested and improves the testing efficiency; in the process of the read-write-erase operation on the selected block to be tested, in addition to screening the blocks that fail in the conventional test, the suspected bad block where the page with the first number of bit flips exceeding the first preset threshold is further tested multiple times, further digging the blocks that are actually unstable in performance and extremely prone to errors although they succeed in the first read-write-erase operation, so that the bad blocks can be more accurately screened, the bad blocks are avoided to be missed, the flash memory detection is more thorough, and the quality and performance of the Die passing the test are ensured.

[0080] Please refer to Figure 2 The second embodiment of the flash memory detection method in the embodiment of the application includes:

[0081] 201. Selecting a block to be tested from a Die to be tested, and establishing a bad block table;

[0082] 202. Traversing the block to be tested in units of blocks, and performing an erase operation on the current block to be tested;

[0083] 203. Judging whether the erase operation on the current block to be tested fails;

[0084] If the erase operation on the current block to be tested fails, step 204 is performed, otherwise, step 205 is performed;

[0085] Further, if the threshold voltage of any storage cell after the erase operation on the current block to be tested is greater than a preset threshold value, the erase operation fails.

[0086] 204. Updating the mark corresponding to the current block to be tested in the bad block table to a first mark;

[0087] In the embodiment, the first mark indicates a block type of a failed erase operation.

[0088] 205, judging whether the current block to be tested is the last block to be tested;

[0089] If the current block to be tested is the last block to be tested, the iteration is completed, and step 207 is performed; otherwise, step 206 is performed.

[0090] 206, iterating the next block to be tested;

[0091] 207, performing a write-read operation on the block to be tested after erasing the block to be tested and updating the bad block table, and determining a first bit flip number of a current page in the block to be tested;

[0092] 208, judging whether the first bit flip number exceeds a first preset threshold;

[0093] 209, if the first bit flip number exceeds the first preset threshold, reading original data of the current page multiple times, and determining a second bit flip number of the current page according to the multiple reading results;

[0094] 210, judging whether the second bit flip number exceeds a second preset threshold;

[0095] 211, if the second bit flip number exceeds the second preset threshold, updating a mark in the bad block table corresponding to the block in which the current page is located to a second mark.

[0096] In the embodiment, it should be noted that steps 207 to 211 are similar to steps 103 to 107 in the first embodiment shown in FIG. 1, and details are not repeated here. Figure 1

[0097] In the embodiment, after selecting the blocks to be tested from the Die to be tested and establishing the bad block table, a complete erase operation is performed on all the blocks to be tested, and the mark of the test result in the bad block table of the block that fails in the erase operation is updated to the first mark. The test result mark in the bad block table can not only indicate whether it is a bad block, but also record different block types. The specific form of the first mark is not limited here, and for example, the number "0" can be used as the first mark to identify the bad block that fails in the erase operation. In the operations that can be performed on the flash memory, the erase operation must be performed in units of blocks, and the write-read operation is performed in units of pages in the block. The embodiment performs a complete erase test on the blocks to be tested, and then performs further write-read tests on the blocks that pass the erase test in units of pages. This not only conforms to the characteristics of the flash memory, but also avoids invalid tests on the bad blocks that fail in the erase operation by means of the record of the bad block table, thereby reducing the time cost of the flash memory detection. ​

[0098] Please refer to Figure 3 The third embodiment of the flash memory detection method in the embodiments of the present application comprises:

[0099] 301. Selecting a to-be-tested block from a to-be-tested Die, and establishing a bad block table;

[0100] 302. Executing an erase command on the to-be-tested block in units of blocks in sequence, and updating the mark in the bad block table corresponding to the block in which an erase error occurs to a first mark;

[0101] In this embodiment, it should be noted that steps 301 to 302 are similar to steps 101 to 102 in the first embodiment shown in Figure 1 and will not be described here in detail

[0102] 303. Traversing the to-be-tested block in units of blocks, and checking the mark corresponding to the currently traversed to-be-tested block in the bad block table;

[0103] In this embodiment, after the to-be-tested block is sequentially erased in step 302, the test result mark in the bad block table corresponding to the block in which the erase fails has been updated to the first mark, and in step 303, the test result in the bad block table is checked. For the block in which the erase has failed, i.e., the block in which the test result mark is the first mark, no write-read operation test is needed.

[0104] 304. Judging whether the mark corresponding to the currently traversed to-be-tested block in the bad block table is the first mark;

[0105] If yes, step 305 is executed, and if no, step 306 is executed.

[0106] In this embodiment, the block in which the bad block table is marked as the first mark is a bad block in which the erase operation fails, and no further test is needed.

[0107] 305. Traversing the next to-be-tested block;

[0108] 306. Writing preset test data into the currently traversed to-be-tested block;

[0109] In this embodiment, the write operation on the to-be-tested block refers to writing the test data into all the pages in the to-be-tested block. The test data written into different test blocks can be the same or different test data.

[0110] 307. Judging whether the write operation on the currently traversed to-be-tested block fails;

[0111] If yes, step 308 is executed, and if no, step 309 is executed.

[0112] In the embodiment, the write operation test is performed on all the pages in the to-be-tested block. If the write operation of any page fails, it means that the write operation of the current block fails.

[0113] 308、updating the mark corresponding to the to-be-tested block currently traversed in the bad block table as a third mark;

[0114] After step 308 is completed, step 305 is performed.

[0115] In the embodiment, the third mark indicates the block whose write operation fails. The specific form of the third mark is not limited, for example, the number "2" can be used as the third mark to indicate the bad block whose write operation fails.

[0116] 309、traversing the to-be-tested block currently traversed in a page unit, and performing the read operation on the current page traversed;

[0117] In the embodiment, the block tested by the write operation test is further tested by the read operation in a page unit.

[0118] 310、whether the read operation of the current page fails;

[0119] If yes, step 311 is performed, and if no, step 312 is performed.

[0120] In the embodiment, if the read data is partially different from the corresponding write test data, it means that the read operation fails. The read data is the data corrected by the error correction code. If the number of flipped bits of the current read data exceeds the maximum number of bits that can be corrected by the error correction code of the block where the current page is located, the read operation fails. In the flash memory detection, the read operation is performed in a page unit. The read operation test is performed on all the pages in the to-be-tested block. If the read operation of any page fails, it means that the read operation of the current block fails.

[0121] 311、updating the mark corresponding to the block where the current page is located in the bad block table as a fourth mark; after step 311 is completed, step 305 is performed.

[0122] In the embodiment, the fourth mark indicates the block whose read operation fails. The specific form of the fourth mark is not limited, for example, the number "3" can be used as the fourth mark to indicate the bad block whose read operation fails.

[0123] 312、determining the first number of flipped bits of the current page;

[0124] In the embodiment, the first number of flipped bits refers to the number of flipped bits in the data read by the read operation, which is returned by the error correction code of the block where the current page is located.

[0125] 313. determining whether the first bit flip number exceeds a first preset threshold;

[0126] 314. if the first bit flip number exceeds the first preset threshold, reading original data of the current page for multiple times, and determining a second bit flip number of the current page according to the multiple reading results;

[0127] 315. determining whether the second bit flip number exceeds a second preset threshold;

[0128] 316. if the second bit flip number exceeds the second preset threshold, updating a mark corresponding to the block in which the current page is located in a bad block table to a second mark;

[0129] After step 316 is completed, step 305 is executed.

[0130] In the embodiment, it is to be noted that steps 313 to 316 are similar to steps 104 to 107 in the first embodiment, and details are not repeated here.

[0131] In the embodiment, after the erase test on the to-be-tested block is completed, a write-read test is performed on each page of the to-be-tested block, the block in which the page on which a write operation fails is marked as a third mark, and the block in which the page on which a read operation fails is marked as a fourth mark, and the corresponding marks are updated in the bad block table. The block in which the page on which the read operation is successful but the first bit flip number exceeds the first preset threshold is regarded as a suspected bad block, and the page will be further read multiple times to determine the read performance of the block in which the page is located, which will be described in detail in the next embodiment.

[0132] Referring to Figure 4 The fourth embodiment of the flash memory detection method in the embodiment includes the following steps.

[0133] 401. selecting a to-be-tested block from a to-be-tested Die, and establishing a bad block table;

[0134] 402. executing an erase command on the to-be-tested block in units of blocks, and updating a mark corresponding to the block in which an erase error occurs in the bad block table to a first mark;

[0135] 403. after the to-be-tested block is erased and the bad block table is updated, performing a write-read operation on the to-be-tested block, and determining a first bit flip number of a current page in the to-be-tested block;

[0136] In the embodiment, it is to be noted that steps 401 to 403 are similar to steps 101 to 103 in the first embodiment, and details are not repeated here.

[0137] 404. determining whether the first bit flip number exceeds a first preset threshold value;

[0138] If yes, step 405 is performed, and if no, step 412 is performed.

[0139] In the embodiment, the first bit flip number of the current page exceeds the first preset threshold value, indicating that the current page can be normally read, but the number of read error bits is large, which represents that the performance of the block where the current page is located is unstable. The first preset threshold value can be dynamically set according to actual needs.

[0140] 405. If the first bit flip number exceeds the first preset threshold value, the original data of the current page is read multiple times to obtain a first data set.

[0141] In the embodiment, the page on which the read operation is successful but the first bit flip number exceeds the first preset threshold value is further tested by multiple read operations. At this time, the data read is not corrected by the error correction code, and the bit position of each actual error is retained. For example, assuming that 5 read operations are performed, the first data set A contains 5 data {A1, A2, A3, A4, A5} not corrected by the error correction code, which are all read results of the current page.

[0142] 406. Each first data in the first data set is subjected to an exclusive-OR operation with a preset standard original data to obtain a second data set.

[0143] In the embodiment, the standard original data is the actual data stored in the current page, that is, the preset test data. Ideally, the data read by the read operation has no error bit and is completely the same as the preset test data. The exclusive-OR operation is a logical operation. The exclusive-OR result of two values with the same value is 0, and the exclusive-OR result of two values with different values is 1. Assuming that binary numbers a = 1100 and b = 1001, the exclusive-OR result of a and b is 0101.

[0144] For example, the read operation in the embodiment is 5 times, the first data set A = {A1, A2, A3, A4, A5} is obtained, the standard original data is B0, and the second data set P = {P1, P2, P3, P4, P5} is obtained. P is obtained by performing an exclusive-OR operation on A and B0. i i , and P i is the exclusive-OR result. Its bit position records whether the bit value of A i is the same as that of B0. If each bit of P i is 0, it indicates that A i is completely the same as B0. The bit value of 1 in P i is actually the bit position of A i ​bit value different from B0, that is, A i error bit.

[0145] 407, performing an or operation on each second data in the second data set to obtain third data;

[0146] In this embodiment, the or operation is a logical operation, and the result of the or operation is 0 only when all values are 0, and the result is 1 in other cases. Assuming that binary numbers a = 1100 and b = 1001, the result of the or operation of a and b is 1101. The second data P i records the error bit in A i error bit in A, and the or operation of all second data in the second data set records the error bit in the multiple read operations.

[0147] For example, assuming that the standard original data B0 = 10101010, the first data set A obtained through 5 read operations is A = {00101010, 10101000, 10101000, 00101010, 00101010}, the first bit is error in the 1st, 4th and 5th read operations, and the 7th bit is error in the 2nd and 3rd read operations, so the second data set P obtained through step 406 is P = {10000000, 00000010, 00000010, 1000000, 1000000}, and the result R of the or operation of all data in P is 10000010. The 1st and 7th bits of R are 1, indicating that the 1st and 7th bits are error in the 5 read operations.

[0148] 408, counting the number of bits with a value of 1 in the third data to obtain a second bit flip number;

[0149] In this embodiment, the third data R records all error bits in the multiple read operations, so counting the number of bits with a value of 1 in the third data is actually counting the number of all error bits in the multiple read operations. A bit that is error multiple times is counted only once, and the final result is the second bit flip number. The higher the second bit flip number of the current page is, the more unstable the performance of the block where the current page is located is, and the greater the possibility of read operation failure in the future is.

[0150] 409, determining whether the second bit flip number exceeds a second preset threshold;

[0151] 410, if the second bit flip number exceeds the second preset threshold, updating the mark in the bad block table corresponding to the block where the current page is located to a second mark;

[0152] If yes, step 411 is performed, and if no, step 412 is performed.

[0153] The steps 409 and 410 in the embodiment are similar to the steps 106 and 107 in the first embodiment, which will not be repeated here.

[0154] 411. Traversing the next block to be tested.

[0155] The write-read test in the embodiment traverses all the blocks to be tested.

[0156] 412. Judging whether the current page is the last page of the block where it is located.

[0157] If yes, step 411 is executed, and if not, step 413 is executed.

[0158] 413. Traversing the next page of the current block.

[0159] In the embodiment of the application, for the current page whose read operation is successful but the number of first bit flips exceeds the first preset threshold, further multiple read operation tests are performed, and the number of all bit flips in the multiple read operations is counted as the second number of bit flips. The higher the second number of bit flips is, the more unstable the performance of the block where the current page is located is, and the more likely the read operation fails. In order to avoid the influence of such suspected bad blocks on the overall performance of the memory, the block where the page whose second number of bit flips exceeds the second preset threshold is regarded as a bad block, which is marked with a second mark and updated in the bad block table. The second preset threshold can be dynamically set according to actual needs.

[0160] Please refer to Figure 5 , Figure 5 which is an embodiment of a flash memory detection system in the embodiment of the application. In the embodiment, the flash memory detection system comprises:

[0161] The flash memory device 500 comprises a plurality of dies, each of which comprises a plurality of blocks, for example, a solid state disk, a flash memory disk or other similar devices.

[0162] The host 501 is coupled to the flash memory device 500, issues test commands such as erase, write and read, and collects and further processes the command execution results.

[0163] The test board 502 is connected to the host 501, is connected to the test board 502 signal, accepts and executes test commands, and sends the command execution results.

[0164] In this embodiment, the host 501 selects a to-be-tested block from the to-be-tested Die, establishes a bad block table and sends an erase command to the test board 502, updates the mark in the bad block table corresponding to the block where an erase error occurs to a first mark; the test board 502 receives the erase command sent by the host 501, executes the erase command on the to-be-tested block in units of blocks in turn, and sends the execution result to the host 501; receives the write-read operation command sent by the host 501, executes the write-read operation on the to-be-tested block and sends the execution result to the host 501; receives the read operation command sent by the host 501 and executes the read operation command on the current page multiple times, and sends the multiple read results to the host 501;

[0165] The host 501 is further configured to: after erasing the to-be-tested block and updating the bad block table, send a write-read operation command to the test board 502, determine the first bit flip number of the current page in the to-be-tested block according to the execution result; determine whether the first bit flip number exceeds a first preset threshold; if the first bit flip number exceeds the first preset threshold, send a command to the test board 502 to read the original data of the current page multiple times, determine the second bit flip number of the current page according to the multiple read results; determine whether the second bit flip number of the current page exceeds a second preset threshold; if yes, update the mark in the bad block table corresponding to the block where the current page is located to a second mark.

[0166] In an embodiment, the host 501 is further configured to: traverse the to-be-tested block in units of blocks, and check the mark corresponding to the to-be-tested block currently traversed in the bad block table; determine whether the mark corresponding to the to-be-tested block currently traversed in the bad block table is the first mark, and if not, send a write command to the test board 502;

[0167] The test board 502 is further configured to: execute the write command sent by the host, write the preset test data into the to-be-tested block currently traversed, and send the write command execution result to the host 501;

[0168] The host 501 is further configured to: determine whether the write operation of the to-be-tested block currently traversed fails, and if yes, update the mark corresponding to the to-be-tested block currently traversed in the bad block table to a third mark, and if not, traverse the to-be-tested block currently traversed in units of pages, and send a read command for the current page traversed to the test board 502;

[0169] The test board 502 is further configured to: receive the read command for the current page sent by the host 501, execute the read operation on the current page, and send the read result to the host 501;

[0170] The host 501 is further configured to: determine whether the read operation on the current page fails, and if yes, update the mark corresponding to the block where the current page is located in the bad block table to a fourth mark, and if not, determine the first bit flip number of the current page.

[0171] In one embodiment, the host is further configured to: if the number of first bit flips exceeds a first preset threshold, send multiple commands to the 502 test board to read the original data of the current page;

[0172] Test board 502 is also used to: execute read commands multiple times on the current page to obtain the first data set A = {A1, A2, ..., A...} i ,…,A n}, i = 1, 2, ..., n, A i This indicates the result of the i-th read, which is the i-th first data, and the first data set is sent to host 501;

[0173] The host 501 is also used to: perform an XOR operation on each piece of first data in the first data set with a preset standard original data to obtain a second data set P = {P1, P2, ..., P...} i ,…,P n}, where P i For the i-th second data, A i B0 represents the i-th data in the first data set, B0 represents the standard original data, and n represents the number of data in the first data set.

[0174] Host 501 is also used to: perform an OR operation on each of the second data in the second data set to obtain the third data R, where R = P1 ∨ … ∨ P i ∨…∨P n , i = 1, 2, 3, ..., n; count the number of bits with a value of 1 in the third data to obtain the number of times the second bit is flipped.

[0175] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method of detecting a flash memory, the method comprising: The flash detection method comprises: selecting a to-be-tested block from a to-be-tested Die, and establishing a bad block table; performing an erase command on the to-be-tested block in units of blocks in sequence, and updating a mark in the bad block table corresponding to a block in which an erase error occurs to a first mark; after erasing the to-be-tested block and updating the bad block table, performing a write-read operation on the to-be-tested block, and determining a first bit flip number of a current page in the to-be-tested block; determining whether the first bit flip number exceeds a first preset threshold, wherein the first preset threshold is less than a maximum bit number correctable by an error correction code; if the first bit flip number exceeds the first preset threshold, reading original data of the current page multiple times, and determining a second bit flip number of the current page according to multiple reading results, wherein the second bit flip number is a sum of positions of bit flip errors of the current page in the multiple reading processes, and a same-position bit error is counted only once; determining whether the second bit flip number exceeds a second preset threshold, wherein the second preset threshold is less than the maximum bit number correctable by the error correction code; if the second bit flip number exceeds the second preset threshold, updating the mark in the bad block table corresponding to the block in which the current page is located to a second mark; wherein one Die contains at least two Planes, and one Plane includes multiple blocks, and the selecting a to-be-tested block from a to-be-tested Die and establishing a bad block table comprises: selecting to-be-tested blocks from the to-be-tested Die uniformly, so that the number of selected blocks in each Plane is the same and the selected blocks and the unselected blocks are uniformly spaced; creating a bad block table for recording test results of the to-be-tested blocks, wherein each to-be-tested block in the bad block table corresponds to a mark for identifying a test result; wherein the performing an erase command on the to-be-tested block in units of blocks in sequence and updating a mark in the bad block table corresponding to a to-be-tested block in which an erase error occurs to a first mark comprises: traversing the to-be-tested blocks in units of blocks, and performing an erase operation on a currently traversed to-be-tested block; determining whether the erase operation on the currently traversed to-be-tested block fails, and if so, updating the mark in the bad block table corresponding to the currently traversed to-be-tested block to the first mark; determining whether the currently traversed to-be-tested block is the last to-be-tested block, and if so, ending the traversal.

2. The flash detection method of claim 1, wherein, the determining whether the erase operation on the currently traversed to-be-tested block fails comprises: determining whether a threshold voltage of any storage unit of the to-be-tested block after the erase operation is greater than a preset threshold value; if the threshold voltage of any storage unit of the to-be-tested block after the erase operation is greater than the preset threshold value, determining that the erase operation fails.

3. The flash detection method of claim 1, wherein, the performing a write-read operation on the to-be-tested block after erasing the to-be-tested block and updating the bad block table, and determining a first bit flip number of a current page in the to-be-tested block comprises: traversing the to-be-tested blocks in units of blocks, and checking the mark in the bad block table corresponding to a currently traversed to-be-tested block; determining whether the mark corresponding to the currently traversed to-be-tested block in the bad block table is the first mark, and if not, writing preset test data into the currently traversed to-be-tested block; determining whether the write operation of the currently traversed to-be-tested block fails, and if so, updating the mark corresponding to the currently traversed to-be-tested block in the bad block table to the third mark, and if not, traversing the currently traversed to-be-tested block in units of pages, and performing a read operation on the currently traversed page; determining whether the read operation of the currently traversed page fails, and if so, updating the mark corresponding to the block where the currently traversed page is located in the bad block table to the fourth mark, and if not, determining the first bit flip number of the currently traversed page.

4. The flash detection method of claim 3, wherein, The determination whether the read operation of the currently traversed page fails includes: if the number of flipped bits of the read data exceeds the maximum number of correctable bits of the error correction code of the block where the currently traversed page is located, it is determined that the read operation of the currently traversed page fails, wherein the read data is data corrected by the error correction code.

5. The flash detection method of claim 3, wherein, The determination whether the read operation of the currently traversed page fails includes: performing a read operation on the currently traversed page, and if the read data and the preset test data are partially different, it is determined that the read operation of the currently traversed page fails.

6. The flash detection method of claim 1, wherein, If the first bit flip number exceeds the first preset threshold, the original data of the currently traversed page is read multiple times, and the second bit flip number of the currently traversed page is determined according to the multiple read results, including: If the number of first bit flips exceeds the first preset threshold, then the original data of the current page is read multiple times to obtain a first data set A = {A1, A2, ..., A...}. i , …, A n }, i = 1, 2, …, n, A i This indicates the result of the i-th read, which is the i-th first data item; Each first data point in the first data set is XORed with a preset standard original data to obtain a second data set P = {P1, P2, …, P}. i , …, P n }, where P i For the i-th second data, P i = A i +B0, i =1,2, …, n, A i B0 represents the i-th data in the first data set, B0 represents the standard original data, and n represents the number of data in the first data set. performing or operation on each second data in the second data set to obtain third data R, wherein R = P1 V... V P i V... V P n , i = 1, 2, 3,..., n; counting the number of bits with a value of 1 in the third data to obtain the second bit flip number.

7. A flash memory detection system, comprising: The flash memory detection system includes a flash memory device, a host, and a test board, the flash memory device includes a plurality of dies, each die includes a plurality of blocks, the host is coupled to the flash memory device, and the host is in signal connection with the test board. The host is configured to select to-be-tested blocks from to-be-tested dies, establish a bad block table, send an erase command to the test board, and update the mark corresponding to the block where the erase error occurs in the bad block table to the first mark. The test board is configured to receive the erase command sent by the host, execute the erase command on the to-be-tested blocks in units of blocks in turn, and send the execution result to the host; receive the write-read operation command sent by the host, execute the write-read operation on the to-be-tested blocks, and send the execution result to the host; receive the read operation command sent by the host and execute the read operation command on the currently traversed page multiple times, and send the multiple read results to the host. The host is further configured to: after erasing the to-be-tested block and updating the bad block table, send a write-read operation command to the test board, determine a first bit flip number of a current page in the to-be-tested block according to an execution result, determine whether the first bit flip number exceeds a first preset threshold, if the first bit flip number exceeds the first preset threshold, send a command for reading original data of the current page multiple times to the test board, determine a second bit flip number of the current page according to multiple reading results, determine whether the second bit flip number exceeds a second preset threshold, and if the second bit flip number exceeds the second preset threshold, update a mark in the bad block table corresponding to a block where the current page is located to a second mark, wherein the first preset threshold is less than a maximum bit number correctable by an error correction code, the second bit flip number is a sum of positions of bit flip errors of the current page in the multiple reading processes, a same-position bit is counted only once if it fails multiple times, and the second preset threshold is less than the maximum bit number correctable by the error correction code. One Die contains at least two Planes, and one Plane includes multiple blocks. The host is specifically configured to: uniformly select to-be-tested blocks from the to-be-tested Die, so that a number of selected blocks in each Plane is the same and intervals between the selected blocks and unselected blocks are uniform, and create a bad block table for recording test results of the to-be-tested blocks, wherein each to-be-tested block in the bad block table corresponds to a mark for identifying a test result. The test board is specifically configured to: traverse the to-be-tested blocks in a block unit, and perform an erasing operation on a currently traversed to-be-tested block; determine whether the currently traversed to-be-tested block fails in the erasing operation, and if yes, update a mark corresponding to the currently traversed to-be-tested block in the bad block table to a first mark; and determine whether the currently traversed to-be-tested block is a last to-be-tested block, and if yes, end the traversal.

8. The flash detection system of claim 7, wherein, The host is further configured to: traverse the to-be-tested blocks in a block unit, and check a mark corresponding to a currently traversed to-be-tested block in the bad block table; and determine whether the mark corresponding to the currently traversed to-be-tested block in the bad block table is the first mark, and if not, send a write command to the test board. The test board is further configured to: perform the write command sent by the host, write preset test data into the currently traversed to-be-tested block, and send a write command execution result to the host. The host is further configured to: determine whether the write operation of the currently traversed to-be-tested block fails, and if yes, update the mark corresponding to the currently traversed to-be-tested block in the bad block table to a third mark, and if not, traverse the currently traversed to-be-tested block in a page unit, and send a read command for a currently traversed page to the test board. The test board is further configured to: receive the read command for the currently traversed page sent by the host, perform a read operation on the currently traversed page, and send a reading result to the host. The host is further configured to determine whether the current page fails in performing a read operation, and if so, update a mark corresponding to the block where the current page is located in the bad block table as a fourth mark, and if not, determine the first number of bit flips of the current page.

9. The flash detection system of claim 7, wherein, The host is further configured to send a command of reading original data of the current page multiple times to the test board if the first number of bit flips exceeds the first preset threshold. The test board is also used to: execute read commands multiple times on the current page to obtain a first data set A = {A1, A2, ..., A...} i A n }, i = 1, 2, …, n, A i This indicates the result of the i-th read, which is the i-th first data, and the first data set is sent to the host; The host is further configured to: perform an XOR operation on each first data in the first data set with a preset standard original data to obtain a second data set P = {P1, P2, …, P}. i , …, P n }, where P i For the i-th second data, P i = A i +B0, i =1, 2, …, n, A i B0 represents the i-th data in the first data set, B0 represents the standard original data, and n represents the number of data in the first data set. The host is further configured to perform or operation on each second data in the second data set to obtain third data R, wherein R = P1 V... V P i V... V P n , i = 1, 2, 3, …, n; and count the number of bits with a value of 1 in the third data to obtain a second bit flip number.

Citation Information

Patent Citations

  • A method and apparatus for controlling erase performance

    CN111863090A

  • Bad block screening method and device, readable storage medium and electronic equipment

    CN113035265A

  • Bad block screening method and device, computer readable storage medium and electronic equipment

    CN113241112A