Embodiments described herein relate generally to a storage device and a memory control method.
A commonly used storage device stores data after error-correction encoding in order to protect the data to be stored. A product code in which a code word is two-dimensionally generated is known as an example of the error-correction encoding.
According to the present embodiment, a storage device includes: a non-volatile memory, encoding units configured to generate a first, second, and third error correction code words, respectively; a memory interface configured to store the first, second, and third error correction code words into the non-volatile memory, and reads the first, second, and third error correction code words from the non-volatile memory; and decoding units configured to decode the first, second, and third error correction code words, respectively. A memory controller includes a position estimating unit configured to estimate a position of an error in the second error correction code word based on information indicating whether the third error correction code word has successfully been decoded and information indicating whether the first error correction code word has successfully been decoded. The decoding unit decodes the second error correction code word using the position of the error estimated with the position estimating unit.
A storage device and memory control method according to the embodiment will be described in detail hereinafter with reference to the appended drawings. Note that the present invention is not limited to the embodiment.
The semiconductor memory unit 3 is a non-volatile memory configured to store data in a non-volatile manner, for example, a NAND memory. Note that, although an example in which a NAND memory is used as the semiconductor memory unit 3 will be described hereinafter, a storage unit other than a NAND memory, for example, a flash memory having a three-dimensional structure, a Resistance Random Access Memory (ReRAM), or a Ferroelectric Random Access Memory (FeRAM) can be used as the semiconductor memory unit 3. Although an example in which a semiconductor memory is used as the storage unit will be described hereinafter, an error collecting process in the present embodiment can be used in a storage device using a storage unit other than a semiconductor memory.
The memory controller 2 controls the writing into the semiconductor memory unit 3 in compliance with the write command (request) from the host 4, and also controls the reading from the semiconductor memory unit 3 in compliance with the read command from the host 4. The memory controller 2 includes a host interface (Host I/F) 21, a memory interface (memory I/F) 22, a control unit 23, an encoding unit/decoding unit (Encoder/Decoder) 24, and a data buffer 25. The Host I/F 21, the memory I/F 22, the control unit 23, the encoding unit/decoding unit 24, and the data buffer 25 are connected to each other through an internal bus 20.
The semiconductor memory unit 3 is connected to the memory controller 2 through one or more channels. The memory controller 2 individually controls a plurality of memory chips sharing a control I/O signal per bank in each of the channels. The memory controller 2 uses a ready/busy signal across the channels, and controls the memory chips sharing the ready/busy signal to operate simultaneously in each of the channels. A group of memory chips sharing a ready/busy signal is referred to as a bank. Each of the banks can independently perform a writing/reading/deleting operation. A bank is formed of a plurality of memory chips.
The semiconductor memory unit 3 includes one or more memory chips (CHIPS). Although
The Host I/F 21 performs a process in compliance with an interface standard with the host 4, and outputs the instructions or user data received from the host 4 to the internal bus 20. The Host I/F 21 transmits the user data read from the semiconductor memory unit 3, or the response from the control unit 23 to the host 4. Note that, in the present embodiment, the data to be written into the semiconductor memory unit 3 according to the write request from the host 4 is referred to as user data.
The memory I/F 22 performs a process for writing the data to be written into the semiconductor memory unit 3 based on the instructions from the control unit 23. The memory I/F 22 also performs a process for reading data from the semiconductor memory unit 3 based on the instructions from the control unit 23.
The control unit 23 generally controls each components of the semiconductor storage device 1. When receiving an instruction from the host 4 through the Host I/F 21, the control unit 23 performs a control in compliance with the instruction. For example, the control unit 23 gives the memory I/F 22 an instruction for writing the user data and parity into the semiconductor memory unit 3 in compliance with the instruction from the host 4. The control unit 23 gives the memory I/F 22 an instruction for reading the user data and parity from the semiconductor memory unit 3 in compliance with the instruction from the host 4.
Alternatively, when receiving a write request from the host 4, the control unit 23 determines the storage area (memory area) in the semiconductor memory unit 3 for the user data accumulated in the data buffer 25. In other words, the control unit 23 manages the destination to which the user data is to be written. The linkage between the logical addresses of the user data received from the host 4 and the physical address indicating the storage area in the semiconductor memory unit 3 in which the user data is stored is stored as an address conversion table.
Alternatively, when receiving a read request from the host 4, the control unit 23 converts the logical address designated by the read request into a physical address using the address conversion table and gives the memory I/F 22 an instruction for reading data from the physical address.
In a commonly used NAND memory, data is written or read in a unit of data referred to as a page, and is deleted in a unit of data referred to as a block.
Word lines WL0 to WLn are connected to control gate electrodes of the memory cell transistors MT0 to MTn forming the NAND strings NS, respectively. The same the word line WLi (i=0 to n) is commonly connected to the memory cell transistors MTi (i=0 to n) in the NAND strings. In other words, in the block BLK, the control gate electrodes of the memory cell transistors MTi on the same row are connected to the same word line WLi.
Each of the memory cell transistors MT0 to MTn is a field effect transistor having a stacked gate structure formed on the semiconductor substrate. In that case, the stacked gate structure includes a charge storage layer (floating gate electrode) formed on the semiconductor substrate through a gate insulating film, and a control gate electrode formed on the charge storage layer through an inter-gate insulating film. The threshold voltage of the memory cell transistors MT0 to MTn varies depending on the number of charges stored in the floating gate electrode. Data can be stored depending on the difference of the threshold voltages.
Bit lines BL0 to BLm are connected to the drains of the (m+1) selection transistors ST1, respectively, in a block BLK. A selection gate line SGD is commonly connected to the gates of the selection transistors ST1. The source of the selection transistor ST1 is connected to the drain of the memory cell transistor MT0. Similarly, a source line SL is commonly connected to the sources of the (m+1) selection transistors ST2 in the block BLK. A selection gate line SGS is commonly connected to the gates of the selection transistors ST2. The drains of the selection transistors ST2 are connected to the sources of the memory cell transistors MTn.
In the present embodiment, the (m+1) memory cell transistors MTi connected to the same word line WLi are referred to as a memory cell group. When the memory cells are stored in a single level cell (SLC), a memory cell group corresponds to a page. When memory cells are stored in a multilevel cell (MLC), a memory cell group corresponds to a plurality of pages. Each of the memory cells is connected to the word line and to the bit line. Each of the memory cells can be identified with the address identifying the word line and with the address identifying the bit line.
The data buffer 25 temporarily stores the user data that the memory controller 2 has received from the host 4 until the data is stored in the semiconductor memory unit 3. The data buffer 25 temporarily stores the user data read from the semiconductor memory unit 3 until the data is transmitted to the host 4. The data buffer 25 is a multi-purpose memory, for example, a Static Random Access Memory (SRAM), or a Dynamic Random Access Memory (DRAM).
The user data transmitted from the host 4 is transferred to the internal bus 20 and is stored in the data buffer 25. The encoding unit/decoding unit 24 includes an encoding unit 26 and a decoding unit 27. The encoding unit 26 generates a code word by encoding the user data stored in the semiconductor memory unit 3. The decoding unit 27 decodes the user data read from the semiconductor memory unit 3.
The product code will be described hereinafter. There is a method in which a product code is formed as an error-correction encoding method. For example, encoding data having a first data length generates a first-dimensional code word. Next, encoding data formed of parts of the data each from a plurality of first-dimensional code words and having a second data length generates a second-dimensional code word. The entire of the code word formed of the first-dimensional code words and second-dimensional code words described above is referred to as a two-dimensional product code. In the product code, the data is doubly protected using the two code words, the first-dimensional code word and the second-dimensional code word.
The black crosses in
The first to third and eighth to tenth rows of the BCH frames include errors of which number is too large to totally correct with the BCH decoding and thus the correction has failed. The first, second, fourth to seventh, and ninth RS frames from the left include errors of which number is too large to totally correct with a usual error correction and thus the correction has failed. BCH frame decoding failure information 201 indicates the BCH frame of which correction has failed as a result of the BCH decoding. RS frame decoding failure information 202 indicates the RS frame of which correction has failed as a result of the RS decoding. Even if the number of errors is too large to correct with the usual error correction, the erasure in the RS frame can be corrected as long as the positions of the error symbols in the RS frame can be determined using the BCH frame decoding failure information 201 and the number of the error symbols is equal to or less than two. In other words, if the number of BCH frames of which error correction has failed is equal to or less than two, the positions of the error symbols in the RS frame can be determined. In the example of
In the present embodiment, extending the product code into three dimensions as described below increases the possibility of determining the position of an error symbol, and erasure correction is performed using the determined position of the error symbol. This increases the performance in error correction.
Next, the encoding and decoding in the present embodiment will be described. First, the encoding will be described.
Any error correcting code can be used in each of the first encoding, the second encoding, and the third encoding. For example, an RS code, or a BCH code can be used. Different error correcting codes can be used in the first encoding, the second encoding, and the third encoding. Alternatively, the same error correcting code can be used in two or more of the encodings. In the description below, an example in which the first encoding is the BCH encoding, and the second encoding and the third encoding are the RS encoding will be described.
The first encoding unit 261 generates a BCH Parity formed of redundant bits by encoding the user data having a first data length (first symbol length) with the BCH encoding. In the present embodiment, the BCH the code word formed of the user data of nx symbols having a first symbol length and a BCH Parity is referred to as a BCH frame. One symbol has, for example, eight bits. Note that one symbol does not necessarily have eight bits. For example, one symbol can have 16 bits. The number of bits of the data forming one symbol is not limited. When one symbol has eight bits, the first data length is nx×8.
The second encoding unit 262 generates an RS Parity formed of redundant bits by encoding the user data of ny symbols having a second data length (second symbol length) with the RS encoding. In the present embodiment, the RS code word formed of the user data having the second data length and the RS Parity is referred to as an RS frame.
The rectangle of which inside a numerical value 1, 2, 3 or 4 is indicated is one symbol in
The third encoding unit 263 generates an RS_Z Parity formed of redundant bits by encoding the user data of nz symbols having a third data length (third symbol length) with the RS encoding. In the present embodiment, the RS code word formed of the user data having the third data length and the RS_Z Parity is referred to as an RS_Z frame. In the example of
As illustrated in
The position in the semiconductor memory unit 3 to which the XY plane frame 100 is stored is not especially limited. The XY plane frame 100 can be stored in any manner. For example, the BCH frames are stored in a page, and the RS frames are separately stored in a plurality of pages. A plurality of BCH frames can be stored in a page, or a BCH frame can be stored in a page. The RS frames can be divided and stored in a plurality of blocks or a plurality of CHIPS. An XY plane frame 100 can be stored in a page. When the product code is extended into the three dimensions described in the present embodiment in the storage device that has already performed error-correction encoding using the XY plane frame 100, it is not necessary to change the method for storing the XY plane frame 100. Note that the storing method means a method for dividing the BCH frames and RS frames, for example, a method in which a plurality of BCH frames is stored in a page, or a method in which RS frames are divided into a plurality of blocks.
The positions in the semiconductor memory unit 3 to which the RS_Z Parity frames 101 and 102 are stored are also not especially limited. The method for storing the RS_Z Parity frames 101 and 102 can be similar to, or different from the method for storing the XY plane frame 100. For example, the XY plane frame 100 can be divided and stored in a plurality of CHIPS while the RS_Z Parity frames 101 and 102 are stored in a CHIP. Hereinafter, an example in which the BCH frames are stored in a page while the RS frames and RS_Z frames are divided and stored in a plurality of pages will be described.
The semiconductor memory unit 3 writes data by the page. When the exemplary three-dimensional product code illustrated in
In the method using a plurality of encoders described above, the number of the encoders increases. To prevent the number of the encoders from increasing, a method for generating an RS frame by accumulating the user data having an XY plane frame (nx×ny symbols) in the data buffer 25 and reading the user data from the data buffer 25 using the second encoding unit 262 can be provided. Similarly, a method for generating an RS_Z frame by accumulating whole the user data (nx×ny×nz symbols) forming the three-dimensional product code in the data buffer 25 and reading the user data from the data buffer 25 using the third encoding unit 263.
In the method in which the user data is held in the data buffer 25 described above, it is necessary to use a large area in the data buffer 25. Especially, it is necessary for the third encoding to hold the user data having nx×ny×nz symbols. In light of the foregoing, the second encoding unit 262 and the third encoding unit 263 each write the intermediate parity into the data buffer 25 in the present embodiment in order to prevent the increase in the number of the encoders and reduce the area used in the data buffer 25. When data is encoded, the second encoding unit 262 and the third encoding unit 263 read the intermediate parity stored in the data buffer 25 to generate a new intermediate parity based on the read intermediate parity and a symbol to newly be input, and update the intermediate parity in the data buffer 25 to a new intermediate parity. When ny symbols are input to the encoder in the second encoding unit 262, the encoder in the second encoding unit 262 outputs the generated parity as an RS Parity to the first encoding unit 261. When nz symbols are input to the encoder in the third encoding unit 263, the encoder in the third encoding unit 263 outputs the generated parity as an RS_Z Parity to the first encoding unit 261 and the second encoding unit 262. Note that, when ny symbols are input to the encoder in the second encoding unit 262, the encoder in the second encoding unit 262 can temporarily update the intermediate parity in the data buffer 25 to the generated intermediate parity, and output the intermediate parity in the data buffer 25 as an RS Parity to the first encoding unit 261. Similarly, when nz symbols are input to the encoder in the third encoding unit 263, the encoder in the third encoding unit 263 can temporarily update the intermediate parity in the data buffer 25 to the generated intermediate parity, and output the intermediate parity in the data buffer 25 as an RS_Z Parity to the first encoding unit 261 and the second encoding unit 262. When the BCH encoding and RS encoding of the RS_Z Parity is not performed, the encoder in the third encoding unit 263 can output the generated parity to the memory I/F 22.
Note that, when the second symbol length is equal to the third symbol length, and the symbol length of the RS Parity per RS code word is equal to the symbol length of RS_Z Parity per RS code word, the second encoding unit 262 or the third encoding unit 263 can serve as both of them. In that case, writing the intermediate parity into the data buffer 25 as described above enables one encoder to perform the second encoding and the third encoding.
The first decoding unit 271 decodes the first-dimensional code word. When the three-dimensional product code has the formation illustrated in
Data is read from the semiconductor memory unit 3 by the page. As described above, the BCH frames are stored in a page, so that reading a page can decode the BCH frames. When the data is read from the semiconductor memory unit 3, the first decoding unit 271 decodes the BCH frames, first. The first decoding unit 271 notifies whether the first decoding has succeeded to the control unit 23 directly, or through the decoding control unit 276. When the BCH frames have successfully been decoded, the control unit 23 outputs the user data of which error has been corrected (or the read user data when the user data has not included an error) as the read data to transmit the data through the Host I/F 21 to the host 4. When the decoding of the BCH frames has failed, the control unit 23 determines to start decoding using the XY plane frame, namely, decoding the two-dimensional product code. Then, to read the XY plane frame including the BCH frame of which first decoding has failed from the semiconductor memory unit 3, the control unit 23 designates the physical address at which the XY plane frame is stored and gives the memory I/F 22 an instruction for reading the XY plane frame. The memory I/F 22 reads the XY plane frame based on the instruction from the control unit 23. The read XY plane frame is stored in the data buffer 25. The control unit 23 gives the decoding unit 27 an instruction for starting decoding the XY plane frame.
When receiving the instruction for starting decoding the XY plane frame, the decoding control unit 276 in the decoding unit 27 gives the first decoding unit 271 an instruction for staring the decoding, first. The first decoding unit 271 decodes all of the BCH frames in the XY plane frame in the data buffer 25 to correct the error. Next, the decoding control unit 276 in the decoding unit 27 gives the second decoding unit 272 an instruction for staring the decoding. The second decoding unit 272 decodes the RS frame in the XY plane frame of which error has been corrected with the first decoding unit 271 and that is in the data buffer 25 to correct the error. The first decoding unit 271 and the second decoding unit 272 notify whether the decoding has succeeded to the decoding control unit 276.
When all of the RS frames in the XY plane frame have successfully been decoded, the decoding control unit 276 notifies the fact to the control unit 23. The control unit 23 outputs the user data of which error has been corrected as the read data, and transmits the data through the Host I/F 21 to the host 4. When an RS frame of which decoding has failed exists, the decoding control unit 276 gives the first decoding unit 271 an instruction for staring the decoding again. The first decoding unit 271 decodes all of the BCH frames in the XY plane frame in the data buffer 25 again. When a BCH frame of which decoding has failed exists, the decoding control unit 276 gives the second decoding unit 272 an instruction for staring the decoding again. Then, the second decoding unit 272 decodes all of the RS frames in the XY plane frame again. As described above, a process in which the decoding with the first decoding unit 271 and the decoding with the second decoding unit 272 are repeated is hereinafter referred to as decoding based on an iterative decoding method. The decoding based on an iterative decoding method is a decoding method usually performed in a two-dimensional product code. Accordingly, the detailed description will be omitted. The concrete procedures in the decoding based on an iterative decoding method for the XY plane frame are not limited. The decoding can be performed with any procedures.
When all of the errors have been corrected (when all of the BCH frames in the XY plane frame have successfully been decoded, or when all of the RS frames in the XY plane frame have successfully been decoded), or when the number of the iterations reaches the maximum number, the decoding based on an iterative decoding method is terminated. The decoding control unit 276 notifies whether the decoding based on an iterative decoding method has succeeded to the control unit 23. When the decoding based on an iterative decoding method has failed (when the number of the iterations reaches the maximum number and the decoding based on an iterative decoding method is terminated while an error remains in the XY plane frame), the control unit 23 determines to start the decoding using the three-dimensional product code frame.
When receiving the instruction for starting decoding the three-dimensional product code frame, the decoding unit 27 decodes all of the XY plane frames and all of the RS_Z Parity frames in the three-dimensional product code frame with the decoding based on an iterative decoding method described above (step S1).
Then, the third decoding unit 273 performs erasure correction in the RS_Z frame (step S2). Concretely, the decoding control unit 276 gives the third decoding unit 273 an instruction for erasure correction in the RS_Z frame. The third decoding unit 273 performs the erasure correction in all of the RS_Z frames in the three-dimensional product code frame of which error has been corrected in step S1. To perform the erasure correction, it is necessary to determine the position of the error symbol in the RS_Z frame. To determine the position of the error symbol in the RS_Z frame, the information indicating whether the BCH frame has successfully been decoded is used.
In the example illustrated in
When, among the XZ planes in the three-dimensional product code frame, there is a plane in which the erasure correction in the RS_Z frame has failed or the confirmation using the BCH frame has failed (No in step S3), the decoding control unit 276 gives the third decoding unit 273 an instruction for correcting the error in the RS_Z frame in which erasure correction has failed in the three-dimensional product code frame. Then, the third decoding unit 273 corrects the error in the RS_Z frame (step S4).
After that, the decoding control unit 276 decodes the BCH frame that has not successfully been corrected in all of the BCH frames in the three-dimensional product code frame to correct the error, and determines whether the all of the BCH frames in the three-dimensional product code frame have successfully been decoded, in other words, the error correction has succeeded (step S5). When all of the BCH frames in the three-dimensional product code frame have successfully been decoded (Yes in step S5), the process goes to step S11.
When a BCH frame that has not successfully been decoded exists in the three-dimensional product code frame (No in step S5), the decoding control unit 276 determines whether one or more bits have been corrected (step S6). Concretely, the decoding control unit 276 determines whether even one of the RS_Z frames and BCH frames of which decoding has failed so far has successfully been decoded in step S2, step S4, or step S5 in comparison with the state before the start of step S2. When one or more bits have been corrected (Yes in step S6), the frame storing unit 274 finds the XY plane frame in which one or more bits have been corrected and stores the information identifying the found XY plane frame (step S15). Then, the process goes to step S7. Concretely, for example, the frame storing unit 274 can find the XY plane frame in which one or more bits have been corrected by monitoring whether the data in the data buffer 25 has been updated.
When any bit has not been corrected (No in step S6), the process goes to step S7. In step S7, the decoding control unit 276 performs three-dimensional error symbol position detection and erasure correction (step S7). The concrete processes of the three-dimensional error symbol position detection and the erasure correction will be described below.
After that, the decoding control unit 276 decodes the BCH frame that has not successfully been corrected in all of the BCH frames in the three-dimensional product code frame to correct the error, and determines whether all of the BCH frames in the three-dimensional product code frame have successfully been decoded, in other words, the error correction has succeeded (step S8). When all of the BCH frames in the three-dimensional product code frame have successfully been decoded (Yes in step S8), the process goes to step S11.
When a BCH frame that has not successfully been decoded exists in the three-dimensional product code frame (No in step S8), the decoding control unit 276 determines whether one or more bits have been corrected (step S9). Concretely, the decoding control unit 276 determines whether even one of the RS_Z frames and BCH frames of which decoding has failed so far has successfully been decoded in step S7, or step S8. When one or more bits have been corrected (Yes in step S9), the frame storing unit 274 finds the XY plane frame in which one or more bits have been corrected and stores the information identifying the found XY plane frame (step S14). Then, the process goes to step S10.
When any bit has not been corrected (No in step S9), the process goes to step S10. In step S10, the decoding control unit 276 determines whether the number of the XY plane frames stored in the frame storing unit 274, in other words, the number of the XY plane frames in which one or more bits have been corrected is one or more (step S10). When the number of the XY plane frames in which one or more bits have been corrected is zero (No in step S10), it is determined that the decoding has failed and the process is terminated (step S13).
When the number of the XY plane frames in which one or more bits have been corrected is one or more (Yes in step S10), each of the XY plane frames in which one or more bits have been corrected is decoded with the decoding based on an iterative decoding method (step S12). Then, the process goes back to step S2.
Note that the process can go to step S7 from step S1 without performing the procedures in step S2 to step S6. The process in
Next, the three-dimensional error symbol position detection and the erasure correction in step S7 will be described.
Note that, although the actual positions of the error symbols are shown with the black crosses to show the actual positions of the error symbols in that case, the actual positions of the error symbols are not determined when the frame is decoded. In other words, when the process in step S7 is performed, the white crosses are not actually distinguished from the black crosses in
Next, a method for forming an RS_Z frame will be described. When a plurality of BCH frames is stored in a page of the semiconductor memory unit 3, two methods can be considered. One is a method for forming an RS_Z frame such that the RS_Z frame includes many symbols in the BCH frames on the same page. The other is a method for forming the RS_Z frame with the symbols in the BCH frames that are stored in pages as different from each other as possible. An advantage of the former is, for example, to perform the encoding or decoding process at a high speed. An advantage of the latter is, for example, to increase the possibility of correction even when an error occurs depending on a failure by the word line.
The symbols at the same positions in the XY plane frames (the same positions in the XY planes) form the RS_Z frame in the above-mentioned description. However, the symbols at different positions in the XY plane frames can form the RS_Z frame.
As illustrated in
As described above, in the present embodiment, a three-dimensional product code frame is formed. When decoding an XY plane frame has not corrected all the errors, the erasure correction of RS frames in the Y direction is performed using the information indicating whether the errors in the RS_Z frame have successfully been corrected. This can improve the performance in the error correction in comparison with the case in which a two-dimensional code is formed.
While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the inventions. Indeed, the novel embodiments described herein may be embodied in a variety of other forms; furthermore, various omissions, substitutions and changes in the form of the embodiments described herein may be made without departing from the spirit of the inventions. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the inventions.
This application is based upon and claims the benefit of priority from U.S. Provisional Application No. 62/048,531, filed on Sep. 10, 2014; the entire contents of which are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
62048531 | Sep 2014 | US |