Semiconductor memory device and error detection / correction method
The semiconductor memory device adapts error detection and correction functions to optimize performance by switching between Hamming and BCH codes based on selection information, addressing performance and reliability challenges in NAND flash memory.
Patent Information
- Application Number
- JP2023109148
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-07-03
- Publication Date
- 2024-11-13
- Estimated Expiration
- 2041-03-09
AI Technical Summary
Conventional error detection and correction circuits in semiconductor storage devices, such as NAND flash memory, face challenges in achieving both high error detection and correction capability and efficient read/write performance, particularly as the number of data rewrites increases and data retention characteristics deteriorate over time, leading to performance degradation and increased chip size.
A semiconductor memory device and method that incorporates a first and second error detection and correction function, selectable based on selection information, allowing switching between 1-bit Hamming code and multi-bit BCH code operations, optimizing error detection and correction capabilities according to the device's life cycle and operational needs.
This approach enables efficient error detection and correction while maintaining optimal read/write performance by adaptively selecting the appropriate error correction method, reducing processing time and chip size, and enhancing reliability throughout the device's lifecycle.
Smart Images

Figure 0007583121000001 
Figure 0007583121000002 
Figure 0007583121000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a semiconductor memory device such as a NAND flash memory, and more particularly to switching between error detection and correction functions. [Background technology]
[0002] In NAND-type flash memories, repeated programming and erasing of data can cause the charge retention characteristics to deteriorate due to deterioration of the tunnel insulating film, or the threshold voltage to fluctuate due to charges trapped in the tunnel insulating film, which can lead to bit errors. To prevent such bit errors, flash memories are equipped with an error detection and correction circuit (hereinafter referred to as an ECC circuit) (for example, Patent Documents 1 and 2). [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Patent No. 6744950 [Patent Document 2] Patent No. 6744951 Summary of the Invention [Problem to be solved by the invention]
[0004] In recent years, products equipped with ECC circuits have become commonplace in non-volatile memories such as flash memory, due to cell miniaturization, increasing rewrite counts, and expanded use in automotive devices. Many error detection and correction occurs in cases where data rewrite counts and data retention characteristics have deteriorated over time. In other words, most error detection and correction occurs in the latter half of a product's life cycle. In addition, ECC circuits require the generation of parity bits when writing data and the identification and correction of error bits, such as syndrome calculations when reading data, which adversely affects performance when writing and reading.
[0005] 1 shows a schematic configuration of a conventional NAND flash memory equipped with an on-chip ECC function. The flash memory 10 includes a memory cell array 20, a page buffer / sense circuit 30, an ECC circuit 40, and an input / output circuit 50. The ECC circuit 40 includes a transfer circuit 42, an ECC core 44, an error register 46, and a write circuit 48.
[0006] In a read operation, data read from a selected page of the memory cell array 20 is held in the page buffer / sense circuit 30, and the data held in the page buffer / sense circuit 30 is transferred to the ECC core 44 via the transfer circuit 42. The ECC core 44 performs an ECC operation on the transferred data, and error information obtained from the operation is held in the error register 46. The write circuit 48 writes corrected data back to the page buffer / sense circuit 30 based on the error information held in the error register 46. Thus, after the ECC process for one page is completed, the data held in the page buffer / sense circuit 30 is read to the data bus 60 according to the column address, and the read data is provided to the input / output circuit 50. The input / output circuit 50 outputs the read data to the outside from an input / output terminal (not shown).
[0007] In a write operation, data to be programmed that is input from the outside is held in the page buffer / sense circuit 30, the ECC core 44 generates a code (parity bit) for the data transferred from the page buffer / sense circuit 30, and the write circuit 48 writes the generated code to a position corresponding to the spare area of the page buffer / sense circuit 30. After the ECC process, the data held in the page buffer / sense circuit 30 is programmed into the memory cell array 20.
[0008] When the ECC circuit 40 performs 1-bit error detection and correction, a Hamming code can be used, and this processing time is relatively short. On the other hand, when performing error detection and correction of multiple bits (for example, 2 bits, 4 bits, 8 bits, etc.), error correction using a BCH code is generally used, and the processing of the BCH code requires a longer time than the processing of the Hamming code. In particular, if the data size of one page becomes large, it will have a great impact on the read and write times of the page, or the operating frequency when continuously reading multiple pages in synchronization with an external clock signal by SPI (Serial Peripheral Interface). Also, although high-speed operation is achieved by pipeline processing, it also leads to an increase in chip size, and it is difficult to achieve both error detection and correction capabilities and read performance.
[0009] The present invention focuses on such conventional problems, and an object thereof is to provide a semiconductor memory device and an error detection and correction method that achieve both error detection and correction capabilities and write / read performance.
Means for Solving the Problems
[0010] An error detection and correction method for a semiconductor memory device according to the present invention includes a step of setting selection information for selecting a first error detection and correction function for performing m-bit error detection and correction or a second error detection and correction function for performing n-bit error detection and correction (m and n are natural numbers, and m < n), and a step of executing the first error detection and correction function or the second error detection and correction function based on the selection information during a read operation or a write operation.
[0011] In one embodiment, the setting step enables the change of the selection information by an external command. In one embodiment, the selection information defines a first address space of a memory cell array for selecting the first error detection and correction function and a second address space of the memory cell array for selecting the second error detection and correction function, and the execution step executes the first error detection and correction function or the second error detection and correction function based on the first or second address space corresponding to the address of the read or write operation. In one embodiment, the error detection and correction method further includes a step of converting first data related to the first error detection and correction function written in the memory cell array into second data related to the second error detection and correction function when the operation is switched from the first error detection and correction function to the second error detection and correction function. In one embodiment, the converting step reads the first data from the memory cell array to a page buffer / sense circuit, operates the read first data with the second error detection and correction function to convert it into second data, and writes the converted second data back to the original position in the memory cell array. In one embodiment, the first error detection and correction function performs 1-bit error detection and correction by a Hamming code, and the second error detection and correction function performs 2-bit, 4-bit or 8-bit error detection and correction by a BCH code. In one embodiment, the memory cell array is a NAND-type memory cell array including a regular region and a spare region, and parity bits generated by the first or second error detection and correction function are stored in the spare region.
[0012] The semiconductor memory device according to the present invention includes a memory cell array, error detection and correction means including a first error detection and correction function for performing m-bit error detection and correction and a second error detection and correction function for performing n-bit error detection and correction (m and n are natural numbers, and m < n), setting means for setting selection information for selecting the first error detection and correction function or the second error detection and correction function, and execution means for executing the first error detection and correction function or the second error detection and correction function based on the selection information during a read operation or a write operation.
[0013] In one embodiment, the setting means can change the selection information by an external command. In one embodiment, the selection information specifies a first address space of the memory cell array for selecting the first error detection and correction function and a second address space of the memory cell array for selecting the second error detection and correction function, and the execution means executes the first error detection and correction function or the second error detection and correction function based on the first or second address space corresponding to an address of a read operation or a write operation. In one embodiment, the execution means includes a conversion means for converting first data related to the first error detection and correction function written in the memory cell array into second data related to the second error detection and correction function when the operation is switched from the first error detection and correction function to the second error detection and correction function. In one embodiment, the conversion means reads the first data from the memory cell array to a page buffer / sense circuit, operates a second error detection and correction function to convert the read first data into second data, and writes the converted second data to the original position of the memory cell array. In one embodiment, the first error detection and correction function detects and corrects a 1-bit error using a Hamming code, and the second error detection and correction function detects and corrects a 2-bit, 4-bit, or 8-bit error using a BCH code. In one embodiment, the memory cell array is a NAND type memory cell array including a regular area and a spare area, and a parity bit generated by the first or second error detection and correction function is stored in the spare area. Effect of the Invention
[0014] According to the present invention, it is possible to select either the first error detection and correction function or the second error detection and correction function, so that it is possible to achieve compatibility with the performance of read and write operations by switching the error detection and correction capability according to, for example, the product life cycle, etc. [Brief description of the drawings]
[0015] [Figure 1]FIG. 1 is a diagram showing a schematic configuration of a conventional NAND flash memory equipped with an on-chip ECC function. [Diagram 2] 1 is a block diagram showing a configuration of a NAND type flash memory according to an embodiment of the present invention. [Diagram 3] 2 is a diagram showing an internal configuration of an ECC circuit according to an embodiment of the present invention; [Figure 4] FIG. 4 is a diagram illustrating an example of a setting register according to the first embodiment of the present invention. [Diagram 5] FIG. 2 is a diagram illustrating the operation of the ECC circuit according to the first embodiment of the present invention. [Figure 6] 5 is a flow diagram illustrating a switching operation of the error detection and correction capabilities of the ECC circuit according to the first embodiment of the present invention. [Figure 7] FIG. 13 is a diagram illustrating an example of a setting register according to a third embodiment of the present invention. [Figure 8] 13 is a flow diagram illustrating a switching operation of the error detection and correction capabilities of an ECC circuit according to a third embodiment of the present invention. [Figure 9] 2 is a block diagram showing a configuration of a decoder of an ECC circuit according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0016] Next, an embodiment of the present invention will be described in detail with reference to the drawings. The semiconductor memory device according to the present invention is, for example, a NAND type flash memory, or a microprocessor, a microcontroller, logic, an ASIC, a processor for processing images and sounds, a processor for processing signals such as wireless signals, etc., in which such a flash memory is embedded. EXAMPLES
[0017] Next, an embodiment of the present invention will be described in detail with reference to the drawings. Fig. 2 is a diagram showing the internal configuration of a NAND type flash memory according to an embodiment of the present invention. The flash memory 100 includes a memory array 110 in which a plurality of memory cells are arranged in a matrix, an input / output circuit 120 connected to an external input / output terminal and outputting read data to the outside or taking in data input from the outside, an ECC circuit 130 that generates an error correction code for data to be programmed and performs error detection and correction of the read data based on the error correction code, an address register 140 that receives address data via the input / output circuit 120, a controller 150 that controls each part based on an instruction (command) received via the input / output circuit 120 or a control signal applied to a control terminal, a word line selection circuit 160 that selects a block or a word line based on a decoded result of row address information Ax from the address register 140, a page buffer / sense circuit 170 that holds data read from a selected page of the memory cell array 110 or holds data to be programmed into the selected page, a column selection circuit 180 that selects a column based on a decoded result of column address information Ay from the address register 140, and a setting register 190 that sets selection information for a plurality of error detection and correction functions. Although not shown here, the flash memory 100 includes an internal voltage generation circuit that generates voltages necessary for reading, programming (writing), erasing, etc. of data (program voltage Vpgm, pass voltage Vpass, read voltage Vread, erase voltage Vers, etc.). In addition, the NAND flash memory 100 may be equipped with an SPI to ensure operational compatibility with NOR flash memories.
[0018] The memory array 110 has, for example, m memory blocks BLK(0), BLK(1), ..., BLK(m-1) arranged in the column direction. A plurality of NAND strings are formed in one memory block, and one NAND string includes a plurality of memory cells, a bit line side select transistor, and a source line side select transistor connected in series. The drain of the bit line side select transistor is connected to a corresponding global bit line, and the source of the source line side select transistor is connected to a common source line. The gate of the memory cell is connected to a corresponding word line, and the gates of the bit line side select transistor and the source line side select transistor are connected to select gate lines SGD and SGS, respectively. The word line selection circuit 160 drives the bit line side select transistor and the source line side select transistor via select gate lines SGD and SGS based on the row address Ax to select a block or a word line.
[0019] The NAND strings may be formed two-dimensionally on the substrate surface, or three-dimensionally on the substrate surface, and the memory cells may be of the SLC type that stores one bit (binary data) or of the type that stores multiple bits.
[0020] In a read operation, a certain positive voltage is applied to the bit line, a certain voltage (e.g., 0V) is applied to the selected word line, a pass voltage Vpass (e.g., 4.5V) is applied to the unselected word lines, a positive voltage (e.g., 4.5V) is applied to the select gate lines SGD and SGS, the bit line side select transistor and the source line side select transistor are turned on, and the common source line SL is set to 0V. In a program operation, a high program voltage Vpgm (e.g., 15 to 20V) is applied to the selected word line, an intermediate potential (e.g., 10V) is applied to the unselected word lines, the bit line side select transistor is turned on, the source line side select transistor is turned off, and a potential corresponding to data "0" or "1" is supplied to the bit line. In an erase operation, 0V is applied to the selected word line in the block, and a high voltage (e.g., 20V) is applied to the P-well.
[0021] In one embodiment, the ECC circuit 130 includes a first ECC section 132 having a 1-bit error detection and correction function and a second ECC section 134 having an 8-bit error detection and correction function as shown in FIG. 3. The first ECC section 132 encodes / decodes data using a Hamming code, and the second ECC section 134 encodes / decodes data using a BCH code. A first enable signal EN_1 and a second enable signal EN_2 are respectively supplied from the controller 150 to the first ECC section 132 and the second ECC section 134. The first ECC section 132 is enabled when the first enable signal EN_1 is in a first logic state, and is disabled when the first enable signal EN_1 is in a second logic state. The second ECC section 134 is enabled when the second enable signal EN_2 is in a first logic state, and is disabled when the second enable signal EN_2 is in a second logic state. The first ECC unit 132 and the second ECC unit 134 perform ECC processing in synchronization with the supplied internal clock signal CLK_ECC.
[0022] The setting register 190 sets and holds selection information for selecting the operation of the first ECC section 132 or the second ECC section 134. The selection information includes, for example, a 1-bit flag as shown in FIG. 4, where a flag "0" specifies the selection of the first ECC section 132, and a flag "1" specifies the selection of the second ECC section 134. In one embodiment, the selection information is loaded from a fuse ROM (fuse memory cell) when a power-on sequence of the flash memory 100 is executed. In a default state or at the time of shipment, a flag "0" is stored in the fuse ROM as the selection information. When the life cycle is in the initial stage or the first half, it is predicted that the memory cells are relatively little deteriorated with time, and therefore the frequency of occurrence of errors is low. For this reason, the first ECC section 132 is selected as the initial setting. Therefore, in the first half of the life cycle, the ECC processing time is short, and the increase in the read and write times due to the ECC processing is suppressed.
[0023] The setting register 190 is accessible from the outside, and the user can rewrite the selection information set in the setting register 190 using a specified command. When the controller 150 receives a setting register write command and write data from the host computer via the input / output circuit 120, it writes the write data to the setting register 190. This rewrites the selection information. When the memory cells degrade with age in the latter half of the life cycle, it is predicted that the frequency of errors will increase. To deal with this, the second ECC section 134 is selected to switch from a single-bit error detection and correction function to a multi-bit error detection and correction function. As a result, in the latter half of the life cycle, the read and write times will be longer due to ECC processing, but on the other hand, the error detection and correction capability will increase, and the deterioration of reliability will be suppressed.
[0024] The controller 150 includes a microcontroller or a state machine, and controls the overall operations of the flash memory 100, such as reading, programming, erasing, and switching between error detection and correction functions, based on commands and control signals received from the outside.
[0025] Next, the operation of the ECC circuit 130 will be described. During a program operation, data input from the input / output circuit 120 is held in the page buffer / sense circuit 170, and then the held data is transferred to the ECC circuit 130. The ECC circuit 130 performs an ECC operation on the transferred data, generates an error correction code (e.g., a parity bit), and writes the generated error correction code back to the spare area of the page buffer / sense circuit 170. The input data and error correction code are then programmed into a selected page of the memory cell array 110.
[0026] During a read operation, data read from a selected page of the memory cell array 110 is transferred to the page buffer / sense circuit 170 and stored therein. The stored data is then transferred to the ECC circuit 130, which detects the presence or absence of an error based on an error correction code, and corrects the data error if an error is detected. The error is corrected, for example, by rewriting the data stored in the page buffer / sense circuit 170. The data stored in the page buffer / sense circuit 170 is then output to the outside via the input / output circuit 120.
[0027] 5 shows an example of the data configuration of the page buffer / sense circuit 170. The page buffer / sense circuit 170 has a regular area 200 divided into eight sectors, for example, sector 0 to sector 7, and a spare area 210 divided into four sectors, spare 0, spare 1, spare 2, and spare 3. The regular area is used to store data, and one sector of the regular area 200 is composed of, for example, 256 bytes, and the eight sectors of the regular area 200 hold approximately 2K bytes of data in total.
[0028] One sector of the spare area 210 is composed of, for example, 16 bytes, and the four sectors (spare 0 to spare 3) hold a total of 64 bytes of data. In spare 0, the error correction codes of sectors 0 and 1 of the regular area 200 are stored, in spare 1, the error correction codes of sectors 2 and 3 of the regular area 200 are stored, in spare 2, the error correction codes of sectors 4 and 5 of the regular area 200 are stored, and in spare 3, the error correction codes of sectors 6 and 7 of the regular area 200 are stored.
[0029] The ECC circuit 130 includes a transfer circuit 136 that receives data transferred in sector units and transfers it to an ECC processing unit 135, an ECC processing unit 135 including a first ECC unit 132 having a 1-bit error detection and correction function and a second ECC circuit 134 having an 8-bit error detection and correction function, and a write circuit 138 that writes error correction codes to the spare area 210 and writes corrected data to the regular area 200.
[0030] The controller 150 outputs enable signals EN_1 and EN_2 to the ECC circuit 130 based on the selection information (flag) set in the setting register 190, and selectively operates the first ECC unit 132 or the second ECC unit 134. The first ECC unit 132 performs single-bit error detection and correction using a Hamming code, and the second ECC unit 134 performs 8-bit error detection and correction using a BCH code. The time required by the first ECC unit 132 is shorter than the time required by the second ECC unit 134. Therefore, when the first ECC unit 132 is selected, the time required for reading and writing can be shorter than when the second ECC unit 134 is selected, but on the other hand, when the second ECC unit 134 is selected, detection and correction of more error bits can be performed than when the first ECC unit 132 is selected.
[0031] 6 is a flow chart for explaining the switching operation of the error detection and correction capability of the ECC circuit according to the first embodiment of the present invention. An initial value of selection information of the first ECC section 132 or the second ECC section 134 of the ECC circuit 130 is stored in a fuse ROM (e.g., an area that cannot be accessed by the user) different from the user-used area of the memory cell array 110. The initial value of the selection information sets the selection of the first ECC section 132 as information at the time of product shipment. When a power-up sequence is executed, the selection information stored in the fuse ROM is loaded into the setting register 190 (S100).
[0032] The controller 150 refers to the selection information in the setting register 190, enables the first ECC unit 132 via an enable signal EN_1, and disables the second ECC unit 134 via an enable signal EN_2. As a result, during a read or write operation, the selected first ECC unit 132 is operated and the second ECC unit 134 is made inoperative (S110).
[0033] Thereafter, depending on the usage status of the flash memory, etc., the user rewrites the selection information in the setting register 190 so that the second ECC unit 134 is selected (S120). When the selection information is rewritten, the controller 150 disables the first ECC unit 132 via the enable signal EN_1 and enables the second ECC unit 134 via the enable signal EN_2. As a result, during read and write operations, the selected second ECC unit 134 is operated and the first ECC unit 132 is made inoperative (S130).
[0034] In this way, according to this embodiment, the first ECC unit 132 or the second ECC unit 134 is operated according to the selection information of the setting register, so that the error detection and correction capability can be selectively switched according to the product life cycle, the processing time for error detection and correction can be optimally managed, and a decrease in the page read time and the operating frequency of continuous reading can be suppressed. In other words, during a period when the deterioration of memory cells is small, the time required for ECC processing can be shortened to enable high-speed reading and writing, while during a period when the deterioration of memory cells is large, the error correction capability can be strengthened to improve reliability.
[0035] In the above embodiment, the setting register 190 loads the initial value from the fuse ROM, but this is only an example, and the present embodiment is not necessarily limited to such an embodiment. For example, the setting register 190 may use a part of the memory space of the memory cell array 110 that is available to the user, and the default value (erased state) of the memory space may indicate the selection of the first ECC unit 132. In this case, the controller 150 reads the default value of the memory space, enables the first ECC unit 132, and disables the second ECC unit 134. When the second ECC unit 134 is selected, the user programs the default value of the memory space and rewrites the selection information.
[0036] Next, a second embodiment of the present invention will be described. In the first embodiment, when the operation is switched from the first ECC unit 132 to the second ECC unit 134, the data encoded by the first ECC unit 132 cannot be decoded by the second ECC unit 134. In other words, the error correction code generated by the first ECC unit 132 and stored in the memory cell array 110 cannot be decoded by the second ECC unit 134. Therefore, when switching to the second ECC unit 134, the error correction code generated by the first ECC unit 132 must be converted to the error correction code generated by the second ECC unit 132.
[0037] Therefore, in the second embodiment, by utilizing the copy-back function of the flash memory, the page processed by the first ECC unit 132 is read from the memory cell array to the page buffer / sense circuit 170, the read data is decoded by the first ECC unit 132 (i.e., error detection and correction is performed), and the decoded data is further encoded again by the second ECC unit 134 to generate an error correction code, and the data including the generated error correction code is programmed into the original page of the memory cell array.
[0038] Such data conversion is performed on all data for the first ECC section 132 stored in the memory cell array 110. The controller 150 automatically performs data conversion using the copy-back function in the background so as not to interfere with the operation of the flash memory 100, or automatically performs the data conversion during a period when operations such as reading and writing are not being performed. In one aspect, a flag indicating whether data has been converted or not may be stored in a spare area, and the controller 150 may perform data conversion by referring to the flag and rewrite the flag after conversion.
[0039] As described above, according to this embodiment, data conversion is automatically performed using the copy-back function, so that the error correction function can be smoothly switched from the first ECC unit 132 to the second ECC unit 134.
[0040] Next, a third embodiment of the present invention will be described. In this embodiment, the error detection and correction capability is switched according to the address space. FIG. 7 is a diagram showing a setting example of the setting register 190 of this embodiment. The relationship between the address space and the corresponding flag is set in advance in the setting register 190. The address space defines the range of the row address of the memory cell array 110. For example, the address space 1 is assigned a flag "0", the address space 2 is assigned a flag "1", and the address space 3 is assigned a flag "0". The flag "0" indicates the selection of the first ECC unit 132, and the flag "1" indicates the selection of the second ECC unit 134. Therefore, when reading or writing to the address space 1 is performed, the first ECC unit 132 is selected, and when reading or writing to the second address space 2 is performed, the second ECC unit 132 is selected.
[0041] 8 is a flow chart for explaining the switching operation of the error detection and correction capability of the ECC circuit according to the third embodiment. When a read or write operation is performed, a command and address for reading or writing are input from the outside via the input / output circuit 120 (S200).
[0042] The controller 150 refers to the setting register 190, identifies the flag of the address space corresponding to the row address of the input address (S210), and enables the first ECC unit 132 or the second ECC unit 134 via the enable signals EN_1, IN_2 to select the first ECC unit 132 or the second ECC unit 134 according to the identified flag (S220). Thus, during a read operation or a write operation, error detection and correction are performed by the first ECC unit 132 or the second ECC unit 134 selected according to the address (S230).
[0043] In this way, according to this embodiment, the error detection and correction capability can be changed according to the address space. For example, when the host computer manages the number of times data is rewritten or erased in the memory cell array in units of blocks, the address space may be set in units of blocks, and when the number of times data is rewritten or erased reaches a certain number, the flag of the address space may be rewritten from "0" to "1". This allows the error detection and correction capability to be changed according to the aging of the memory cells in the address space.
[0044] Next, a specific example of the second ECC unit 134 will be described. The second ECC unit 134 includes an encoder that encodes data using a BCH code, and a decoder that decodes the BCH-encoded data. FIG. 9(A) is a block diagram showing the internal configuration of a BCH decoder. The BCH decoder 300 includes a syndrome calculator 310 that evaluates the syndrome of data, a Euclidean algorithm calculator 320 that calculates an error location polynomial (ELP), an error location searcher 330 that calculates the root of the error location polynomial and searches for an error location, and an error bit corrector 340 that writes back corrected data to the page buffer / sense circuit 170 based on the searched error location.
[0045] The BCH decoder 300 has input terminals for receiving a reset signal RST_IN, a clock signal CLK for ECC calculation, an enable signal ENABLE_IN, a valid signal VALID_IN, data DATA_IN, etc. The syndrome calculation unit 310 outputs the evaluation result and a start signal EUC_S indicating the start of Euclidean algorithm calculation to the Euclidean algorithm calculation unit 320. The Euclidean algorithm calculation unit 320 outputs the calculation result of the error locator polynomial and an end signal EUC_E indicating the end of the calculation to the error location search unit 330.
[0046] 9B is a timing chart showing an example of processing of each part of the BCH decoder. t1 indicates the processing period of the syndrome calculation part 310, t2 indicates the processing period of the Euclidean mutual division calculation part 320, t3 indicates the processing period of the error position search part 330, and t4 indicates the processing period of the error bit correction part 340.
[0047] The BCH decoder 300 performs processing in synchronization with the input clock signal CLK, and becomes operable when the enable signal ENABLE_IN transitions to H level. During the period when the valid signal VALID_IN is at H level, the data held in the page buffer / sense circuit is taken into the syndrome calculation unit 310 from DATA_IN. When the syndrome calculation unit 310 finishes the calculation of the syndrome, it outputs a pulse signal EUC_S indicating the start of Euclidean mutual division, and in response to this, the Euclidean mutual division calculation unit 320 calculates the error location polynomial. When the Euclidean mutual division calculation unit 320 finishes the calculation of the error location polynomial, it outputs a pulse signal EUC_E indicating the end, and in response to this, the error location search unit 320 searches for the error location. The error bit correction unit 340 rewrites the data of the page buffer / sense circuit 170 via the output terminal DATA_OUT.
[0048] For example, when detecting and correcting 8-bit errors per 528 bytes using the BCH code, 149 clock cycles are required for syndrome calculation, 82 clock cycles for Euclidean algorithm calculation, 143 clock cycles for error location search, and 48 clock cycles for error correction, totaling 422 clock cycles. When the frequency of the clock signal CLK is 50 MHz, one clock cycle time is 20 ns, and 8.44 us is consumed for the decoding process of the BCH code. If the size of one page of the page buffer / sense circuit 170 is 2 Kbytes, about 34 us (1688 cycles = 422 * 4) is required.
[0049] On the other hand, when performing 1-bit error detection and correction using the Hamming code, the syndrome calculation and error correction configuration are simplified, so the number of clock cycles required for error detection and correction of 2K bytes is about 330. If one clock cycle time is 20ns, processing is completed in about 6.7us. Simply comparing it with 8-bit BCH code, it is about 1 / 6 the processing time. In the case of a 4K byte page length and an array read time of 20ns, with the 8-bit BCH code, tRD2 = (20us + 34us * 2) = 88us, while with the 1-bit Hamming code, tRD2 = (20us + (6.7us * 2) = 34us, and the difference between the two is very large. Therefore, when the BCH code is used, it affects the page read time (tRD2) and the upper limit of the clock frequency for continuous read operations.
[0050] In the above embodiment, a 1-bit error detection and correction function (first ECC unit 132) and an 8-bit error detection and correction function (second ECC unit 134) are implemented in a dual manner, but the circuit size is dominated by the 8-bit error detection and correction circuit, and the error bit correction unit 340 can be used redundantly, so the ECC circuit 130 can be realized by simply adding a syndrome calculation unit for the 1-bit error detection and correction circuit to the 8-bit error correction function. Therefore, there is little impact on the chip size.
[0051] In the above embodiment, error detection and correction using a Hamming code and error detection and correction using a BCH code are illustrated, but this is only an example, and the present invention can also be applied to error detection and correction using other codes.
[0052] Furthermore, in the above embodiment, the BCH code of the second ECC unit 134 is configured to perform 8-bit error detection and correction, but this is just one example, and the BCH code of the second ECC unit 134 may perform 2-bit, 4-bit, or 16-bit error detection and correction. Furthermore, in the above embodiment, the first ECC unit 132 is configured to perform 1-bit error detection and correction, but this is just one example, and as long as the error detection and correction function of the first ECC unit 132 is less than the error detection and correction function of the second ECC unit 134, the first ECC unit 132 may perform 2-bit or more error detection and correction.
[0053] Although a preferred embodiment of the present invention has been described in detail, the present invention is not limited to the specific embodiment, and various modifications and variations are possible within the scope of the gist of the present invention described in the claims. [Explanation of symbols]
[0054] 100: Flash memory 110: memory cell array 120: Input / output circuit 130:ECC circuit 132: First ECC section 134: Second ECC section 140: Address register 150: Controller 160: Word line selection circuit 170: Page buffer / sense circuit 180: Column selection circuit 190: Setting register
Claims
1. An error detection and correction method for a NAND flash memory having an on-chip error detection and correction function, comprising: A step of initially setting, in a storage unit, selection information for selecting a first error detection and correction function for performing m-bit error detection and correction; performing the first error detection and correction function based on the selection information during a read operation or a write operation; a step of determining whether or not the initially set selection information has been rewritten to selection information for selecting a second error detection and correction function for performing n-bit error detection and correction (m, n are natural numbers, m<n); executing the second error detection and correction function based on the rewritten selection information during a read operation or a write operation; a step of converting first data related to the first error detection and correction function written in a memory cell array into second data related to the second error detection and correction function when an operation is switched from the first error detection and correction function to the second error detection and correction function; The method for detecting and correcting an error, wherein the converting step is performed using a copy-back function.
2. 2. The error detection and correction method according to claim 1, wherein the storage unit is a part of a memory cell array available to a user, and the initially set selection information is data representing an erased state.
3. 3. The error detection and correction method according to claim 2, wherein the initially set selection information is rewritten by an external program command.
4. 2. The error detection and correction method according to claim 1, wherein the initially set selection information is loaded from a fuse ROM to a register during a power-on sequence, and the selection information loaded to the register is rewritten by a user command.
5. A NAND flash memory having an on-chip error detection and correction function, A memory cell array; the error correction function including a first error detection and correction function for detecting and correcting an m-bit error and a second error detection and correction function for detecting and correcting an n-bit error (m and n are natural numbers, m<n); a setting means for initially setting selection information for selecting a first error detection and correction function in the memory cell array; a determination means for determining whether or not the initially set selection information has been rewritten to selection information for selecting a second error detection and correction function; an execution means for executing the first error detection and correction function or the second error detection and correction function based on the selection information during a read operation or a write operation; a conversion means for converting first data related to the first error detection and correction function written in a memory cell array into second data related to the second error detection and correction function when an operation is switched from the first error detection and correction function to the second error detection and correction function, The conversion means is a flash memory that utilizes a copy-back function.
6. 6. The flash memory according to claim 5, wherein the initially set selection information is data representing an erased state, and the data is rewritten by an external program command.
7. 6. The flash memory according to claim 5, wherein the initially set selection information is loaded from a fuse ROM to a register during a power-on sequence, and the selection information loaded to the register is rewritten by a user command.
8. 6. The flash memory according to claim 5, wherein said conversion means reads first data from the memory cell array to a page buffer / sense circuit, converts the read first data into second data by operating a second error detection and correction function, and writes the converted second data to an original position of the memory cell array.
Citation Information
Patent Citations
Radio communication terminal equipment
JP1998145478A
Storage device provided with error correction means
JP2000349652A
Semiconductor integrated circuit device
JP2005268621A
Memory card, card controller and method for controlling memory card
JP2006155408A
Memory system
JP2019057055A
