Disclosure of Invention
In view of the above, the present invention provides a flash memory and a method and a system for detecting an erroneous bit count thereof, so as to improve the accuracy of the erroneous bit count detection.
In order to achieve the purpose, the invention provides the following technical scheme:
an error bit count detection system of a flash memory comprises an ECC control module, a block buffer, a block marking circuit and an error bit module;
each block buffer comprises a plurality of page buffers, each page buffer is connected with the memory control module, and the page buffers are used for storing the programming verification data of the corresponding page memory units and obtaining error marking signals for marking the page memory units with verification errors according to the programming verification data;
the ECC control module is used for sending a logic address of a logic block which needs to be subjected to error bit counting to the block marking circuit;
the block marking circuit is used for decoding the logic address of the logic block, obtaining a physical address corresponding to the logic address of the logic block and sending an address marking signal of the physical address to an error bit module which is arranged corresponding to a storage unit with the physical address;
the error bit module is used for counting the memory units with verification errors according to the address marking signals sent by the block marking circuit and the error marking signals output by the page buffer, and judging whether the programming verification is successful according to the counting result.
Optionally, the error bit module comprises an error bit counting module and an analog error bit counting and accumulating module;
the error bit counting module is connected with the page buffer and the block marking circuit, and is used for outputting an intermediate level signal according to the address marking signal sent by the block marking circuit and the error marking signal output by the page buffer and sending the intermediate level signal to the analog error bit counting and accumulating module;
and the analog error bit counting and accumulating module is used for counting the storage units with verification errors according to the intermediate level signal and judging whether the programming verification is successful according to the counting result.
Optionally, the error bit counting module is further connected to a flag latch;
the flag latch is used for storing an address replacement flag signal which indicates whether the page memory cell is replaced by a page memory cell in the redundant cell array;
the error bit counting module is further configured to output an intermediate level signal according to the address flag signal sent by the block flag circuit, the error flag signal output by the page buffer, and the address replacement flag signal output by the flag latch.
Optionally, the error bit counting module includes a nor gate, a first switch tube, a second switch tube and the flag latch;
a first input end of the NOR gate is connected with the block flag circuit, a second input end of the NOR gate is connected with the page buffer, a third input end of the NOR gate is connected with the mark latch, and an output end of the NOR gate is connected with a grid electrode of the first switch tube;
the first end of the first switch tube is grounded, the second end of the first switch tube is connected with the first end of the second switch tube, the second end of the second switch tube is connected with the output end of the error bit counting module, and the grid electrode of the second switch tube is connected with the analog output control signal line of the analog error bit counting and accumulating module;
when the block marking circuit outputs a low-level address marking signal as a low-level signal, the marking latch outputs a low-level address replacement marking signal and the page buffer outputs a low-level error marking signal, the nor gate inputs a high-level signal to the gate of the first switch tube, so that the first switch tube is conducted;
when the analog output control signal line inputs a control signal to the grid electrode of the second switch tube, the second switch tube is conducted, the output end of the error bit counting module outputs a middle level signal, and the middle level signal is sent to the analog error bit counting and accumulating module, so that the analog error bit counting and accumulating module compares the middle level signal with a reference level signal to complete counting.
Optionally, the memory cell array of the flash memory includes a main cell array and a redundant cell array;
the block buffers comprise a first block buffer and a second block buffer, a page buffer in the first block buffer is connected with a bit line of each page storage unit in the main cell array, and a page buffer in the second block buffer is connected with a bit line of each page storage unit in the redundant cell array;
the error bit counting module comprises a first error bit counting module and a second error bit counting module, the first error bit counting module is connected with the page buffer in the first block buffer, and the second error bit counting module is connected with the page buffer in the second block buffer;
the block flag circuit comprises a first block flag circuit and a second block flag circuit, the first block flag circuit is connected with the first error bit counting module, and the second block flag circuit is connected with the second error bit counting module.
A method for detecting an erroneous bit count of a flash memory includes:
the ECC control module sends a logic address of a logic block which needs to be subjected to error bit counting to a block marking circuit;
the block marking circuit decodes the logic address of the logic block to obtain a physical address corresponding to the logic address of the logic block, and sends an address marking signal of the physical address to an error bit module which is arranged corresponding to a storage unit with the physical address;
the error bit module is used for generating an error bit according to the address mark signal sent by the block marking circuit and the error mark signal output by the page buffer,
and counting the memory cells with verification errors, and judging whether the programming verification is successful according to the counting result.
Optionally, the step of the error bit module counting the memory cells with verification errors according to the address flag signal sent by the block flag circuit and the error flag signal output by the page buffer, and determining whether the program verification is successful according to the counting result includes:
the error bit counting module outputs an intermediate level signal according to the address mark signal sent by the block marking circuit and the error mark signal output by the page buffer, and sends the intermediate level signal to the analog error bit counting and accumulating module;
and the analog error bit counting and accumulating module counts the memory cells with verification errors according to the intermediate level signal and judges whether the programming verification is successful according to the counting result.
Optionally, the outputting, by the error bit counting module, the intermediate level signal according to the address flag signal sent by the block flag circuit and the error flag signal output by the page buffer includes:
the error bit counting module outputs an intermediate level signal according to the address mark signal sent by the block marking circuit, the error mark signal output by the page buffer and the address replacement mark signal output by the mark latch.
Optionally, when the error bit counting module includes a nor gate, a first switch tube, a second switch tube and the flag latch, the outputting, by the error bit counting module, an intermediate level signal according to the address flag signal sent by the block flag circuit, the error flag signal output by the page buffer, and the address replacement flag signal output by the flag latch includes:
the block marking circuit outputs a low-level address marking signal, the marking latch outputs a low-level address replacement marking signal and the page buffer outputs a low-level error marking signal, and the NOR gate inputs a high-level signal to the grid electrode of the first switch tube to enable the first switch tube to be conducted;
the analog output control signal line inputs a control signal to a grid electrode of the second switch tube, the second switch tube is conducted, and an output end of the error bit counting module outputs a middle level signal.
A flash memory comprising an error bit count detection system of a flash memory as described in any one of the above.
Compared with the prior art, the technical scheme provided by the invention has the following advantages:
the invention provides a flash memory and a method and a system for detecting error bit count thereof, an ECC control module sends a logic address of a logic block which needs to be subjected to error bit count to a block marking circuit, the block marking circuit decodes the logic address of the logic block to obtain a physical address corresponding to the logic address of the logic block and sends an address marking signal of the physical address to an error bit module which is arranged corresponding to a storage unit with the physical address, the error bit module counts the storage unit with verification error according to the address marking signal sent by the block marking circuit and an error marking signal output by a page buffer and judges whether programming verification is successful according to a counting result, namely, the invention carries out error bit count according to the logic block of the ECC control module, thereby improving the accuracy of the erroneous bit count detection.
Detailed Description
As described in the background, the existing error bit count detection method has a problem of inaccurate error bit count detection.
The conventional flash memory includes a main cell array 11, a redundant cell array 12, an error bit detection module 13, a memory control module 14, and an ECC control module 15. The main cell array 11 and the redundant cell array 12 each include a plurality of memory strings each including a plurality of memory cells, and the memory string in the redundant cell array 12 is used to replace the memory string of the erroneous bit in the main cell array 11. Wherein one or more of the memory cells constitute a page, the plurality of pages constitute a memory block, the memory block is an erasable cell, and the page is a readable and programmable cell.
The error bit detection module 13 is configured to count verification result data in the memory block and count error bits after the memory block is subjected to an erase or program verification operation.
Also, the existing NAND uses an ECC (Error Correcting Code) control module 15 to encode and correct data, and the ECC control module 15 may correct some Error bits, that is, allow some correctable Error bits to exist according to the correction standard of the ECC control module 15. Generally, the comparison unit of ECC is 2KB or 4KB, and for a NAND with a capacity of 16KB, the technology of error bit grouping for every 2KB of logical storage units in the verification operation required by ECC is more in accordance with the standard of ECC. However, the actual physical address distribution of the NAND16KB data is not as concentrated as the logical addresses. It is possible that a centralized physical region has data belonging to the first 2KB, the second 2KB, the third 2KB, the fourth 2KB, etc. When counting is then performed, the operations are all performed in blocks because of layout constraints. Therefore, the counting cannot be performed according to the address of the ECC, which is not accurate.
Based on this, the invention provides a flash memory and a method and a system for detecting the error bit count thereof, so as to overcome the problems in the prior art, wherein the system for detecting the error bit count of the flash memory comprises an ECC control module, a block buffer, a block marking circuit and an error bit module;
each block buffer comprises a plurality of page buffers, each page buffer is connected with the memory control module, and the page buffers are used for storing the programming verification data of the corresponding page memory units and obtaining error marking signals for marking the page memory units with verification errors according to the programming verification data;
the ECC control module is used for sending a logic address of a logic block which needs to be subjected to error bit counting to the block marking circuit;
the block marking circuit is used for decoding the logic address of the logic block, obtaining a physical address corresponding to the logic address of the logic block and sending an address marking signal of the physical address to an error bit module which is arranged corresponding to a storage unit with the physical address;
the error bit module is used for counting the memory units with verification errors according to the address marking signals sent by the block marking circuit and the error marking signals output by the page buffer, and judging whether the programming verification is successful according to the counting result.
The invention provides a flash memory and a method and a system for detecting error bit count thereof, an ECC control module sends a logic address of a logic block which needs to be subjected to error bit count to a block marking circuit, the block marking circuit decodes the logic address of the logic block to obtain a physical address corresponding to the logic address of the logic block and sends an address marking signal of the physical address to an error bit module which is arranged corresponding to a storage unit with the physical address, the error bit module counts the storage unit with verification error according to the address marking signal sent by the block marking circuit and an error marking signal output by a page buffer and judges whether programming verification is successful according to a counting result, namely, the invention carries out error bit count according to the logic block of the ECC control module, thereby improving the accuracy of the erroneous bit count detection.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, so that the above is the core idea of the present invention, and the above objects, features and advantages of the present invention can be more clearly understood. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
An embodiment of the present invention provides an error bit count detection system for a flash memory, where the flash memory may be a NAND flash memory such as a Single Level Cell (SLC), a multi-level cell (MLC), a three-level cell (TLC), a four-level cell (QLC), and as shown in fig. 2, the flash memory includes a cell array, and the error bit count detection system includes an ECC control module 21, a memory control module 22, a block buffer 23, an error bit module, and a block flag circuit 25.
The block buffer 23 is arranged corresponding to a physical block of the flash memory. Specifically, the memory cell array includes a main cell array 201 and a redundant cell array 202, and as shown in fig. 3, the block buffer 23 includes a first block buffer 231 and a second block buffer 232, the first block buffer 231 is disposed corresponding to a physical memory block in the main cell array 201, and the second block buffer 232 is disposed corresponding to a physical memory block in the redundant cell array 202.
Each block buffer 23 includes a plurality of page buffers. The first block buffer 231 includes a plurality of page buffers 2310 and the second block buffer 232 includes a plurality of page buffers 2320. A plurality of page buffers are respectively connected to bit lines of respective memory cells on the same word line, and specifically, the page buffer 2310 in the first block buffer 231 is connected to the bit line of each memory cell in the main cell array 201, and the page buffer 2320 in the second block buffer 232 is connected to the bit line of each memory cell in the redundant cell array 202.
Each block buffer 23 is connected to the memory control module 22, and is configured to store program verification data of a corresponding page of memory cells, and obtain an error flag signal for identifying that a verification error exists in the page of memory cells according to the program verification data. Specifically, the memory control module 22 may also write and read data to and from the corresponding memory cells through the block buffer 23 so as to program the data, thereby obtaining program verification data.
The ECC control module 21 is configured to encode and error-correct data input by the flash memory, decode and error-correct data output by the flash memory, and send a logical address of a logical block that needs to be subjected to error bit counting to the block flag circuit according to an address bit requirement of the ECC.
The block flag circuit 25 is configured to decode a logical address of the logical block, obtain a physical address corresponding to the logical address of the logical block, and send an address flag signal of the physical address to an error bit module set corresponding to a memory cell having the physical address.
The error bit module is used for counting the memory units with verification errors according to the address mark signals sent by the block marking circuit and the error mark signals output by the page buffer, and judging whether the programming verification is successful according to the counting result.
Specifically, the error bit module includes an error bit count module 24, an analog error bit count and accumulation module 26. The error bit counting module 24 is connected to the page buffer 230 and the block flag circuit 25, and is configured to output an intermediate level signal according to the address flag signal sent by the block flag circuit 25 and the error flag signal output by the page buffer 230, and send the intermediate level signal to the analog error bit counting and accumulating module 26;
the analog error bit counting and accumulating module 26 is used for counting the memory cells with verification errors according to the intermediate level signal and judging whether the programming verification is successful according to the counting result.
In one embodiment of the present invention, the block flag circuit includes a first block flag circuit 251 and a second block flag circuit 252, the first block flag circuit 251 being coupled to the first error bit count module 241, the second block flag circuit 252 being coupled to the second error bit count module 242.
Since the corresponding relationship between the physical address and the logical address of the main cell array 201 is known, after the first block flag circuit 251 obtains the logical address of each logical block, the physical address of each storage unit in the main cell array 201 can be obtained according to the corresponding relationship between the physical address and the logical address, that is, the physical block where the corresponding storage unit of each logical block is located is obtained, and then the first block flag circuit 251 sends the address flag signal of the physical address to the first error bit counting module 241 corresponding to the storage unit with the physical address.
However, since it is not known which location of the memory string in the main cell array 201 is replaced by the memory string in the redundant cell array 202 after the memory string in the redundant cell array 202 replaces the memory string in the main cell array 201, in the embodiment of the present invention, the block flag circuit includes a first block flag circuit 251 and a plurality of second block flag circuits 252, the first block flag circuit 251 is connected to all of the first error bit count modules 241, each of the second block flag circuits 252 is connected to one of the second error bit count modules 242, and the second block flag circuit 252 uses the redundant CAM address to determine which block the page memory cell adjacent thereto belongs to.
Each error bit counting module 24 is connected to the page buffer 230 and the block flag circuit 25, and specifically, the error bit counting module 24 includes a first error bit counting module 241 and a second error bit counting module 242, the first error bit counting module 241 is connected to the page buffer in the first block buffer 231, and the second error bit counting module 242 is connected to the page buffer in the second block buffer 232.
It should be noted that the present invention is not limited to this, and in other embodiments, the present invention may only include the first block buffer 231, the first block flag circuit 251, and the first error bit counting module 241, that is, in the embodiment of the present invention, the error bit counting may only be performed on the main array unit 201.
Because of the small pitch of the bit lines, in the embodiment of the present invention, as shown in fig. 3, a plurality of page buffers 230 are sequentially arranged in a plurality of columns, and each block buffer 23 is sequentially arranged in a plurality of rows, so that the page buffers can be reasonably arranged within the pitch of the bit lines. Of course, the invention is not limited to this, and in other embodiments, the page buffers may be arranged according to actual situations.
In the embodiment of the present invention, the error bit counting module 24 is further connected to the flag latch;
the flag latch is used to store an address replacement flag signal indicating whether a page memory cell is replaced by a page memory cell in the redundant cell array 202;
the error bit counting block 24 is further configured to output an intermediate level signal according to the address flag signal sent by the block flag circuit 25, the error flag signal output by the page buffer, and the address replacement flag signal output by the flag latch.
As shown in fig. 4, the error bit count module includes a nor gate 2410, a first switch tube 2411, a second switch tube 2412, and a flag latch. Of course, the present invention is described by taking the circuit structure as an example, but the present invention is not limited thereto.
A first input terminal of the nor gate 2410 is connected to the block flag circuit 25, e.g., the first block flag circuit or the second block flag circuit, a second input terminal of the nor gate 2410 is connected to the page buffer, e.g., 230 or 232, a third input terminal of the nor gate 2410 is connected to the tag latch, and an output terminal of the nor gate 2410 is connected to the gate of the first switch 2411;
a first end of the first switch tube 2411 is grounded, a second end of the first switch tube 2411 is connected with a first end of the second switch tube 2412, a second end of the second switch tube 2412 is connected with an output end of the error bit counting module 24, and a grid electrode of the second switch tube 2412 is connected with an analog output control signal line of the analog error bit counting and accumulating module 26;
when the block flag circuit 25 outputs the low-level address flag signal chunk _ sig, the flag latch outputs the low-level address replacement flag signal, and the page buffer outputs the low-level error flag signal ver _ sig, the nor gate 2410 inputs the high-level signal to the gate of the first switch tube 2411, so that the first switch tube 2411 is turned on;
when the analog output control signal line ver _ iref _ sig inputs a control signal to the gate of the second switch tube 2412, the second switch tube 2412 is turned on, the output end of the error bit counting module 24 outputs an intermediate level signal, and the intermediate level signal is sent to the analog error bit counting and accumulating module 26, so that the analog error bit counting and accumulating module 26 compares the intermediate level signal with the reference level signal to complete counting.
Specifically, when the block flag circuit 25 sends an address flag to the error bit count module 24 indicating that the block of data is not within the address of the required ECC count, the address flag signal sent by the block flag circuit 25 is high. The output of the nor gate 2410 is low no matter what the level of the other input terminals of the error bit counting module 24 is; the memory verify error bits for this region will not be counted.
When the block flag circuit 25 sends an address flag signal to the error bit count module 24 indicating that the block of data is within the address of the required ECC count, the address flag signal sent by the block flag circuit 25 is low. The output of the NOR gate 2410 is determined by the page register and the tag latch output. The output of the NOR gate 2410 is determined by the page buffer when the flag latch output of the page buffer is low. When the page buffer indicates that the cell is verified to be erroneous, the page buffer outputs a low level, and the input end of the error bit counting module 24 connected thereto is a low level; the memory verify error bits for this region are counted. When the page buffer indicates that the unit is correctly verified, the page buffer outputs a high level, and the input end connected with the error bit counting module 24 is a low level; the memory verify error bits for this region are counted. When the three input terminals of the nor gate input a low level, the nor gate 2410 inputs a high level to the gate of the first switch tube 2411, so that the first switch tube 2411 is turned on, indicating that there is an error data.
When the analog output control signal line ver _ iref _ sig inputs a control signal to the gate of the second switch tube 2412, the second switch tube 2412 is turned on, the output end of the error bit counting module 24 outputs an intermediate level signal, and the intermediate level signal is sent to the analog error bit counting and accumulating module 26, so that the analog error bit counting and accumulating module 26 compares the intermediate level signal with the reference level signal to complete counting.
The invention provides an error bit counting detection system of a flash memory, wherein an ECC control module sends a logic address of a logic block needing error bit counting to a block marking circuit according to the address bit requirement of the ECC, the block marking circuit decodes the logic address of the logic block to obtain a physical address corresponding to the logic address of the logic block and sends an address marking signal of the physical address to an error bit counting module correspondingly arranged with a storage unit with the physical address, the error bit counting module outputs a middle level signal according to the address marking signal sent by the block marking circuit and an error marking signal output by a page buffer and sends the middle level signal to a simulation error bit counting and accumulating module; the analog error bit counting and accumulating module is used for counting the storage units with verification errors according to the intermediate level signal and judging whether the programming verification is successful or not according to the counting result, namely, the error bit counting is carried out according to the logic block of the ECC control module, so that the accuracy of error bit counting detection is improved.
Embodiments of the present invention further provide a flash memory, which includes a memory cell array and the error bit count detection system provided in any of the above embodiments.
An embodiment of the present invention further provides a method for detecting an error bit count of a flash memory, which is applied to the error bit count detection system provided in any of the above embodiments, and as shown in fig. 5, the method includes:
s101: the ECC control module sends a logic address of a logic block which needs to be subjected to error bit counting to a block marking circuit;
s102: the block marking circuit decodes the logic address of the logic block, obtains a physical address corresponding to the logic address of the logic block, and sends an address marking signal of the physical address to an error bit module which is arranged corresponding to a storage unit with the physical address;
s103: the error bit module counts the memory cells with verification errors according to the address mark signals sent by the block marking circuit and the error mark signals output by the page buffer, and judges whether the programming verification is successful according to the counting result.
Wherein, the error bit module counts the memory cells with verification errors according to the address mark signal sent by the block marking circuit and the error mark signal output by the page buffer, and judges whether the program verification is successful according to the counting result comprises:
the error bit counting module outputs an intermediate level signal according to the address mark signal sent by the block marking circuit and the error mark signal output by the page buffer, and sends the intermediate level signal to the analog error bit counting and accumulating module;
and the analog error bit counting and accumulating module counts the memory cells with verification errors according to the intermediate level signal and judges whether the programming verification is successful according to the counting result.
Optionally, the outputting, by the error bit counting module, the intermediate level signal according to the address flag signal sent by the block flag circuit and the error flag signal output by the page buffer includes:
the error bit counting module outputs an intermediate level signal according to the address mark signal sent by the block marking circuit, the error mark signal output by the page buffer and the address replacement mark signal output by the mark latch.
When the error bit counting module comprises a nor gate, a first switch tube, a second switch tube and a mark latch, the error bit counting module outputs an intermediate level signal according to an address mark signal sent by the block marking circuit, an error mark signal output by the page buffer and an address replacement mark signal output by the mark latch, and comprises:
the block marking circuit outputs a low-level address marking signal, the marking latch outputs a low-level address replacement marking signal and the page buffer outputs a low-level error marking signal, and the NOR gate inputs a high-level signal to the grid electrode of the first switch tube to enable the first switch tube to be conducted;
the analog output control signal line inputs a control signal to a grid electrode of the second switch tube, the second switch tube is conducted, and the output end of the error bit counting module outputs a middle level signal.
Specifically, as shown in fig. 4, when the block flag circuit 25 sends an address flag to the error bit count module 24 indicating that the block data is not within the address of the required ECC count, the address flag signal sent by the block flag circuit 25 is high. The output of the nor gate 2410 is low no matter what the level of the other input terminals of the error bit counting module 24 is; the memory verify error bits for this region will not be counted.
When the block flag circuit 25 sends an address flag signal to the error bit count module 24 indicating that the block of data is within the address of the required ECC count, the address flag signal sent by the block flag circuit 25 is low. The output of the NOR gate 2410 is determined by the page register and the tag latch output. The output of the NOR gate 2410 is determined by the page buffer when the flag latch output of the page buffer is low. When the page buffer indicates that the cell is verified to be erroneous, the page buffer outputs a low level, and the input end of the error bit counting module 24 connected thereto is a low level; the memory verify error bits for this region are counted. When the page buffer indicates that the unit is correctly verified, the page buffer outputs a high level, and the input end connected with the error bit counting module 24 is a low level; the memory verify error bits for this region are counted. When the three input terminals of the nor gate input a low level, the nor gate 2410 inputs a high level to the gate of the first switch tube 2411, so that the first switch tube 2411 is turned on, indicating that there is an error data.
When the analog output control signal line ver _ iref _ sig inputs a control signal to the gate of the second switch tube 2412, the second switch tube 2412 is turned on, the output end of the error bit counting module 24 outputs an intermediate level signal, and the intermediate level signal is sent to the analog error bit counting and accumulating module 26, so that the analog error bit counting and accumulating module 26 compares the intermediate level signal with the reference level signal to complete counting.
The error bit counting detection method of the flash memory provided by the invention counts the error bits according to the logic block of the ECC control module, thereby improving the accuracy of error bit counting detection.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.