The present embodiment generally relates to a method of controlling nonvolatile memory.
The flash memory records data by programming a threshold voltage depending upon a value to be recorded in each memory cell. However, the threshold voltage of the flash memory is changed according to various factors. As a result, an error is caused in read data sometimes.
In order to cope with the error, data to be recorded is protected by using an error correcting code and the error is removed by executing decoding at the time of reading. If the quantity of errors exceeds the capability of the error correcting code, the errors cannot be removed.
Therefore, there is a method of changing operation parameters little by little when reading data, repeating data reading and error correction, and searching a suitable read voltage with which errors are held down to within the correction capability. Reading a read target page is repeated a plurality of times in this method, however, it takes a longer time for read processing.
According to the present embodiment, a nonvolatile memory includes a plurality of blocks. each of the blocks is a unit of data erasing. each of the blocks includes a plurality of pages. each of the pages is a unit of data writing and reading. A method of controlling the nonvolatile memory comprises reading a plurality of first pages in parallel based on respectively different operation parameters. each of the first pages is respectively included in a plurality of first blocks. Each of the operation parameters include a read voltage. The method comprises performing error correction on each of read data, and selecting one operation parameter out of the plurality of different operation parameters based on a result of the error correction.
A method of controlling nonvolatile memory according to embodiments will be descried below with reference to the accompanying drawings. By the way, the present invention is not limited to the embodiments.
The memory system 100 includes a host I/F unit 2, a NAND type flash memory (hereafter abbreviated to NAND) 10 functioning as nonvolatile memory, a memory controller 3, and a data buffer 4. The memory controller 3 includes a memory interface unit 20, a data management unit 30, a read control unit 32, a write control unit 33, an ECC decoder 40, an ECC encoder 41, a block management unit 50, and an error correction control unit 60. By the way, the nonvolatile memory may be a memory other than the NAND flash memory. The nonvolatile memory may be a memory such as, for example, a NAND flash memory of three-dimensional lamination type, RERAM (resistance random access memory), or FERAM (Ferroelectric Random Access Memory).
The NAND 10 stores user data transferred from the host 1, management information of the memory system 100, system data and the like. The NAND 10 includes a memory cell array in which a plurality of memory cells are arranged in a matrix form. Each memory cell is capable of binary or multi-value storing. The NAND 10 includes a plurality of memory chips #0 to #n−1.
In the NAND 10, in general, block is a minimum unit of data erasing, and page is a unit of writing and reading.
Word lines WL0 to WLn are connected to control gate electrodes of the memory cell transistors MT0 to MTn included in the NAND string NS, respectively. The memory cell transistors MTi (i=0 to n) in the NAND strings NS are connected in common by the same word line WLi (i=0 to n). In other words, control gate electrodes of the memory cell transistors MTi in the same row in the block BLK are connected to the same word line WLi.
Each of the memory cell transistors MT0 to MTn is formed of a field effect transistor having a laminate gate structure formed on a semiconductor substrate. Here, the laminate gate structure includes a charge storage layer (floating gate electrode) formed over the semiconductor substrate with a gate insulation film between and a control gate electrode formed over the charge storage layer with an inter-gate insulation film between. Each of the memory cell transistors MT0 to MTn changes in threshold voltage depending on the number of electrons stored in the floating gate electrode. Each of the memory cell transistors MT0 to MTn can store data depending on a difference of the threshold voltage.
Bit lines BL0 to BLm are connected to drains of (m+1) selection transistors ST1 in one block BLK, respectively. A selection gate line SGD is connected to gates of the (m+1) selection transistors ST1 in common. Furthermore, a source of the selection transistor ST1 is connected to a drain of the memory cell transistor MT0. In the same way, a source line SL is connected to sources of the (m+1) selection transistors ST2 in one block BLK in common. A selection gate line SGS is connected to gates of the (m+1) selection transistors ST2 in one block BLK in common. Furthermore, a drain of the selection transistor ST2 is connected to a source of the memory cell transistor MTn.
In the present embodiment, the (m+1) memory cell transistors MTi connected to the same word line WLi are referred to as memory cell group. In a case where the memory cell is a single level cell (SLC), one memory cell group corresponds to one page. In a case where the memory cell is a multi-level cell (MLC), one memory cell group corresponds to two pages (lower page and upper page). In a case where the memory cell is a triple level cell (TLC), one memory cell group corresponds to three pages (lower page, middle page, and upper page). Furthermore, each memory cell is connected to a word line and connected to a bit line as well. Each memory cell can be identified by using an address identifying a word line and an address identifying a bit line.
In the present specification, in a case where the memory cell is the SLC, the page corresponds to the memory cell group. In a case where the memory cell is the MLC, the page corresponds to one of the lower page and the upper page. In a case where the memory cell is the TLC, the page corresponds to one of the lower page, the middle page, and the upper page.
The host I/F unit 2 is a communication interface such as the SATA (Serial Advanced Technology Attachment) or the SAS (Serial Attached SCSI). The host I/F unit 2 connects the memory system 100 and the host 1. The host I/F unit 2 receives a command such as a read command or a write command from the host 1. As for a command, an address of data to be transferred by the command, a size of the data, and the data are added to the command. Upon receiving a command from the host 1, the host I/F unit 2 allocates a necessary buffer area on the data buffer 4, and notifies the memory controller 3 of the command.
The data buffer 4 temporarily stores data transferred between the memory system 100 and the host 1. As the data buffer 4, for example, SRAM (Static Random Access Memory) or DRAM (Dynamic Random Access Memory) is used.
The memory controller 3 generally controls the memory system 100. A function of the memory controller 3 is implemented by a processor which executes firmware stored in the NAND 10, various hardware circuits and the like. The memory controller 3 performs, for example, processing of reading and writing on the NAND 10 in accordance with a command notified of by the host I/F unit 2.
The ECC encoder 41 encodes user data buffered in the data buffer 4, and generates a code word including data and a redundant unit (parity). The ECC decoder 40 acquires a code word read from the NAND 10, from the memory I/F unit 20, and decodes the acquired code word. If the ECC decoder 40 fails in error correction at the time of decoding, the ECC decoder 40 notifies the read control unit 32 and the error correction control unit 60 of a read error.
The memory I/F unit 20 is a controller that directly controls the NAND 10 in accordance with a control protocol of the NAND 10. The memory I/F unit 20 writes a code word input from the ECC encoder 41, in accordance with control from the write control unit 33 or the like. The memory I/F unit 20 reads a code word from the NAND 10 in accordance with control from the read control unit 32 or the like, and transfers the code word to the ECC decoder 40.
The memory I/F unit 20 includes an operation parameter setting unit 21. Operation parameters which are set by the error correction control unit 60 are set in the operation parameter setting unit 21. The memory I/F unit 20 executes writing into the NAND 10 and reading from the NAND 10 in accordance with the operation parameters which are set in the operation parameter setting unit 21. The operation parameters include a read voltage, a program voltage, and the like.
The data management unit (data manager) 30 manages which position on the NAND 10 data is to be stored in. The data management unit 30 has an address translation table 31 which manages correspondence between a logical address given by the host 1 and a physical position on the NAND 10, and performs garbage collection depending upon a use situation of blocks on the NAND 10.
The block management unit 50 manages blocks on the NAND 10. In the memory system 100, a logical block which is a virtual block is used as a management unit of blocks. A logical block is formed by collecting physical blocks from a plurality of memory chips #0 to #n−1. The logical blocks are managed by using a logical block management table 51. Details of the logical blocks will be described in a second embodiment. The block management unit 50 manages the blocks. Management information includes information such as configuration information of logical blocks, the number of times of block erasing (hereafter referred to as erase count), and a utilization state. The configuration information of a logical block is identifier (physical block numbers) of a plurality of physical blocks included in the logical block. The erase count is the number of times of block erasing in a logical block unit. The utilization state is used for distinguishing whether the block is an active block or a free block. The active block is a logical block having valid data recorded therein. The free block is a logical block having no valid data recorded therein. By the way, in the block management unit 50, the function of managing logical blocks is not necessary in the memory system in the first embodiment, and is used in a memory system in a second embodiment.
The read control unit 32 performs read processing from the NAND 10 in accordance with a command notified of by the host I/F unit 2. The read control unit 32 performs read processing by acquiring a physical position on the NAND 10 corresponding to a logical address of read data from the data management unit 30 and notifying the memory I/F unit 20 of the acquired physical position. Data that is read is transferred to the host 1 via the ECC encoder 41, the data buffer 4, and the host I/F unit 2.
The write control unit 33 performs write processing on the NAND 10 in accordance with a command notified of by the host I/F unit 2. The write control unit 33 acquires position information of a block into which data should be written, from the block management unit 50. The write control unit 33 performs write processing by outputting the position information of the block acquired from the block management unit 50 and a code word which is output from the ECC encoder 41 to the memory I/F unit 20. The write control unit 33 registers mapping between the logical address of the written data and the physical position on the NAND 10 into the data management unit 30.
The error correction control unit 60 operates in a case where error correction fails and a read error occurs at the time of decoding in the ECC decoder 40. In the flash memory, data is recorded by programming a threshold voltage depending upon a value to be recorded in a memory cell.
In the NAND 10 of 2 bits/cell illustrated in
The threshold voltage of the flash memory changes due to influence of discharge caused by elapse of time and voltage application caused by reading in the block. A voltage drop due to influence of discharge caused by elapse of time is referred to as data retention. A voltage rise due to influence of voltage application caused by reading in the block is referred to as read disturb. Distribution of the threshold voltage changes because of such phenomena. A lower diagram in
As a countermeasure against such an error, data to be recorded in the NAND 10 is encoded by the ECC encoder 41 and recorded. If the change of the threshold voltage becomes large and the number of errors at the time of decoding exceeds the capability of error correction, however, it becomes impossible to read correct data.
Therefore, there is a method of changing the read voltage (Vth1 to Vthm) little by little as illustrated in
When searching for suitable operation parameters (including the read voltage) on a target page in which a read error has occurred, therefore, it is not conducted in the first embodiment to read the target page a plurality of times while changing the operation parameters. A plurality of physical blocks (referred to as test blocks as well) are selected, and one page is selected from each of the plurality of selected test blocks. And different operation parameters are set for each of a plurality of pages included in the plurality of selected test blocks, and reading is performed in parallel. Code words from the plurality of pages are decoded, and optimum operation parameters are selected on the basis of results of decoding of the code words.
Upon receiving a notice of a read error from the read control unit 32, the error correction control unit 60 selects a plurality of physical blocks besides a physical block Berr including an error page in which the read error has occurred, as test blocks. In other words, p (where p≧2) test blocks B(0) to B(p−1) are selected inclusive of the physical block Berr. The test blocks are selected out of physical blocks used equally with the physical block Berr. The physical blocks used equally are selected out of, for example, physical blocks that are close in the erase count to the physical block Berr, physical blocks programmed at time close to that of the physical block Berr, or physical blocks that are close in the number of times of being read to the physical block Berr. It is desirable that p test blocks are blocks that can be read in parallel.
The error correction control unit 60 selects operation parameters to be searched for. Here, the read voltage is adjusted as an operation parameter. A plurality of different read voltages V0 to Vs to be searched for are set for each search area in the error correction control unit 60. The search area in a case where the memory cell is an MLC is two areas in the upper page and one area in the lower page. The error correction control unit 60 assigns the plurality of read voltages V0 to Vs to p test blocks B(0) to B(p−1). By the way, in a case where the number s of candidates of read voltage to be searched for is greater than the number p of test blocks, different read voltages are set for the same test block and reading from the same test block is performed a plurality of times. Conversely, in a case where s is less than p, the number of test blocks can be set equal to s.
Page data in the block B(0) read with the read voltage V0, page data in the block B(1) read with the read voltage V1, page data in the block B(2) read with the read voltage V2, and page data in the block B(3) read with the read voltage V3 are decoded by the ECC decoder 40, and it is determined whether error correction is successful. And a read voltage used to read a page for which error correction is determined to be successful is selected as an optimum read voltage. In
Hereafter, read processing in the first embodiment will be described with reference to flow charts illustrated in
Upon receiving a read command from the host 1 (step S100), the host I/F unit 2 notifies the memory controller 3 of the read command. The read control unit 32 acquires a physical address corresponding to a logical address of read target data from the data management unit 30 (step S110). In accordance with an instruction from the read control unit 32, the memory I/F unit 20 reads data from a read target page in the NAND 10 with a read voltage having a preset prescribed value (step S120).
The memory I/F unit 20 inputs page data read from the NAND 10 to the ECC decoder 40. The ECC decoder 40 decodes the read data (step S130). In a case where error correction is successful (step S140: Yes), the ECC decoder 40 notifies the read control unit 32 that the error correction had been successful, and buffers the data into the data buffer 4. The read control unit 32 instructs the host I/F unit 2 to transfer the data (step S150). The host I/F unit 2 transfers the data from the data buffer 4 to the host 1 (step S160).
In a case where error correction is failed (step S140: No), the ECC decoder 40 notifies the read control unit 32 of a read error and suspends the read operation of the data once. The read control unit 32 notifies the error correction control unit 60 of occurrence of the read error and causes the error correction control unit 60 to perform selection processing of an optimum read voltage Vopt. The error correction control unit 60 performs selection processing of the optimum read voltage Vopt (step S170). The selection processing of the optimum read voltage Vopt will be described in detail later with reference to
Upon completion of selection of the optimum read voltage Vopt, the memory I/F unit 20 sets the selected read voltage Vopt in the operation parameter setting unit 21 and re-reads the error page (step S180). Then, data in the error page re-read is decoded by the ECC decoder 40 (step S130). If the error correction succeeds (step S140: Yes), the decoded data is transferred to the host 1 via the data buffer 4 (steps S150 and S160).
The selection processing of the optimum read voltage Vopt will now be described with reference to
Then, the error correction control unit 60 selects candidates V(0) to V(p−1) of the read voltage to be searched for, and assigns one of the candidates to each of the pages respectively in the test blocks B(0) to B(p−1) (step S210). Furthermore, the error correction control unit 60 sets respective page addresses in the test blocks B(0) to B(p−1) and the candidates V(0) to V(p−1) of the read voltage into the operation parameter setting unit 21. The memory I/F 20 performs read operation on pages respectively in the test blocks B(0) to B(p−1) in the NAND 10 by using different read voltages V(0) to V(p−1) in accordance with contents set in the operation parameter setting unit 21 (step S220). For example, the memory I/F 20 sets V(k) as the read voltage and performs read operation from the block B(k). At this time, the memory I/F 20 starts setting of the next V(k+1) and read operation of B(k+1) without waiting for completion of the read operation of B(k). The memory I/F 20 executes read operation of B(0) to B(p−1) in parallel.
The memory I/F unit 20 inputs data of a plurality of pages (p pages) read from the plurality of test blocks B(0) to B(p−1), to the ECC decoder 40. The ECC decoder 40 decodes data in the plurality of pages and notifies the error correction control unit 60 of decoding results of respective pages via the read control unit 32. The error correction control unit 60 refers to decoding results of respective pages and determines whether error correction has succeeded in each page. And the error correction control unit 60 selects a read voltage used in a page in which error correction has succeeded, as the optimum read voltage Vopt. By the way, in a case where there are a plurality of page data in which error correction has succeeded, one read voltage is selected by using a suitable algorithm.
In this way, in the first embodiment, a plurality of test blocks are selected when searching for the optimum read voltage Vopt for a page in which a read error has occurred. And different read voltages are set for pages in the plurality of selected test blocks, and parallel reading is performed. Read data from the plurality of pages are decoded, and the optimum read voltage Vopt is selected on the basis of decoding results of the read data. As a result, operation time required when searching for the optimum read voltage Vopt can be shortened. Furthermore, influence of the read disturb can be distributed to a plurality of blocks.
In a second embodiment, test blocks are selected out of physical blocks included in a logical block. As described earlier, it is desirable that
Since it is preferable that changes in threshold voltage among the test blocks are approximately the same, it is desirable that the test blocks be used equally. Since the change of the threshold voltage is greatly influenced by exhaustion of the memory cell, blocks that are close in the erase count are desirable. Influence of the data retention depends on elapsed time since the block is programmed, and influence of the read disturb depends on the number of times of reading. As test blocks, therefore, blocks programmed at time points that are close and blocks storing data that are also close in the number of times of being read are desirable.
In the memory system 100, a logical block which is a virtual block is used as a management unit of blocks as described earlier. The logical block is formed by collecting physical blocks out of a plurality of memory chips #0 to #n.
A plurality of physical blocks included in a logical block are erased simultaneously and used as a logical block for writing. Therefore, a plurality of physical blocks included in a logical block become equal in the erase count. Furthermore, since data written from the host 1 at the same timing are recorded in the logical block, elapsed time since programming also becomes nearly the same. Furthermore, for example, in a case where data in one file is distributed to a plurality of physical blocks included in a logical block and recorded, it is considered that the physical blocks are also equal in the number of times of reading. Owing to the facts described heretofore, a plurality of blocks included in a logical block satisfy the condition of the test blocks.
The logical block is managed by the block management unit 50 as described earlier. The block management unit 50 includes the logical block management table 51 to manage logical blocks.
In this way, the test blocks B(0) to B(p−1) are selected out of the plurality of physical blocks included in the logical block to which the physical block Berr belongs. Then, the read control unit 32 executes the processing at the step S170 in
In this way, in the second embodiment, test blocks are selected out of a plurality of physical blocks included in a logical block to which the physical block Berr including page data in which a read error has occurred belongs. As a result, physical blocks having similar tendencies in change of threshold voltage can be certainly selected as test blocks. In the second embodiment, the logical block is associated with the plurality of physical blocks to enable channel parallel operation and plane parallel operation. the logical block may be associated with the plurality of physical blocks to enable channel parallel operation, plane parallel operation, and bank interleaving operation. Bank interleaving allows a parallel operation by causing a plurality of memory chips connected to one common IO bus to execute an interleaving operation.
In a third embodiment, the ECC decoder 40 and the ECC encoder 41 performs code processing of two kinds differing in error correction capability. First code processing is intra-page ECC. A redundant portion (parity) is created from data in the same page, and the created parity is recorded in the same page as the data. Second code processing is inter-page ECC. Parity is created from data distributed to a plurality of pages and stored. The created parity is recorded in a page different from the data.
In the ECC decoder 40, decoding is performed by using the intra-page ECC when reading data. In a case where error correction has succeeded, decoded data is used as read data. In a case where error correction is failed, however, the ECC decoder 40 performs decoding by using the inter-page ECC.
Here, the page data. DA, DB and DC and the inter-page parity PP included in the inter-page ECC are distributed to a plurality of physical blocks B(0) to B(p−1) included in the same logical block and recorded.
It is not true that if the optimum read voltage Vopt is determined, the optimum read voltage Vopt is set only in the block Berr and data in the block Berr is re-read. If the optimum read voltage Vopt is determined, the optimum read voltage Vopt is also set for pages in physical blocks including other data or parities included in the inter-page ECC. And page data are read from a plurality of physical blocks including a plurality of data and parities included in the inter-page ECC. And page data in the block Berr is restored by decoding a plurality of read page data with the inter-page ECC. In
By the way, when selecting test blocks, the physical block Berr may not be included in the test blocks. This is because a case where the cause of correction failure with an intra-page ECC is not increase of random errors caused by deviation of the threshold voltage, but a burst error caused by a failure of hardware is also considerable.
Hereafter, read processing in the third embodiment will be described with reference to a flow chart illustrated in
The memory I/F unit 20 inputs page data read from the NAND 10 to the ECC decoder 40. The ECC decoder 40 decodes read data by using the intra-page ECC (step S135). In a case where error correction has succeeded (step S140: Yes), the ECC decoder 40 notifies the read control unit 32 that the error correction had been successful, and buffers data into the data buffer 4. The read control unit 32 instructs the host I/F unit 2 to transfer data (step S150). The host I/F unit 2 transfers data from the buffer 4 to the host 1 (step S160).
In a case where error correction is failed as a result of decoding using the intra-page ECC (step S140: No), the ECC decoder 40 notifies the read control unit 32 of an error and suspends the read operation of the data once. The read control unit 32 instructs the error correction control unit 60 to perform selection processing of the optimum read voltage Vopt. The error correction control unit 60 performs selection processing of the optimum read voltage Vopt (step S175).
At the step S175, the error correction control unit 60 executes processing of steps S300 to S320 illustrated in
Upon acquiring the optimum read voltage Vopt, the error correction control unit 60 identifies a code word in an inter-page ECC including page data in which the read error has occurred, by using management data in the block management unit 50 (step S181). In other words, symbols D(0) to D(L−1) included in the identified code word are identified. L is the number of symbols included in the code word in the inter-page ECC. The symbols include data, which is an information symbol, and parity, which is a redundant symbol.
The memory I/F unit 20 sets the optimum read voltage Vopt on each of pages including the symbols D(0) to D(L−1) and reads the symbols D(0) to D(L−1) from each page (step S182). The memory I/F unit 20 inputs the symbols D(0) to D(L−1), which are read, to the ECC decoder 40. The ECC decoder 40 performs decoding with the inter-page ECC by using the symbols D(0) to D(L−1), which are read, and restores page data in which the read error has occurred (step S183). The ECC decoder 40 notifies the read control unit 32 that page data in which the read error has occurred had been restored, and buffers the restored page data into the data buffer 4. The read control unit 32 instructs the host I/F unit 2 to transfer the data. The host I/F unit 2 transfers the data from the buffer 4 to the host 1 (step S160).
According to the third embodiment, when restoring page data that has caused a read error with the inter-page ECC, the optimum read voltage Vopt is set for all pages included in the inter-page ECC and re-reading is performed, in this way. As a result, the probability of success of error correction using the inter-page ECC can be increased.
At the step S120 in
By the way, in the first to third embodiments, data is read from a second block other than a first block including a page in which a read error has occurred, optimum operation parameters for the second block are determined on the basis of a result of error correction on the read data, and the determined operation parameters are used as operation parameters for the first block. In the first to third embodiments, therefore, a concept that operation parameters are diverted among physical blocks is included. In the present invention, therefore, an embodiment in which error correction is performed on page data read from a first physical block, operation parameters suitable for the first physical block are selected on the basis of a result of the error correction, and the selected operation parameters are applied to read processing of a second physical is also possible.
While certain embodiments have been described herein, these embodiments have been presented by way of example only, and are not intended to limit the scope of the present invention. Indeed, the novel embodiments described herein may be embodied in a variety of other embodiments; furthermore, various omissions, substitutions and changes in the form of the embodiments described herein may be made without departing from the spirit of the invention. The accompanying claims and their equivalents are intended to cover such embodiments or modifications as would fall within the scope and spirit of the invention.
This application is based upon and claims the benefit of priority from U.S. Provisional Patent Application No. 62/048,833, filed on Sep. 11, 2014; the entire contents of which are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
62048833 | Sep 2014 | US |