Embodiments described herein relate generally to a memory controller, a storage device, and a memory control method.
In NAND flash memory (hereinafter referred to as NAND memory), information is stored by the charge amount accumulated at the floating gate of a memory cell. The stored information can be read out as a result of applying voltage (threshold voltage) to the memory cell. In the multi-valued NAND memory, the information of a plurality of bits is stored in a single memory cell, and the information is read out using a plurality of threshold voltages.
In general, according to one embodiment, a memory controller is a memory controller configured to control nonvolatile memory including a memory cell of K bits/cell, the memory controller including an encoder configured to encode unit data to write in a first page to generate a parity, a first bit representing data of the first page and a second bit representing data of a second page among data of K bits; a memory control unit configured to perform control to write the unit data and the parity in the nonvolatile memory; a decoder configured to carry out an error correction process using the unit data and the parity read out from the nonvolatile memory; and a readout control unit configured to give an instruction to carry out readout using 2K−1 first voltage values at time of readout from the first page, and to carry out readout using a second voltage value, which is different from the first voltage value and less than 2K−1, at time of readout from the second page, and select the bit value of the second page from a determination result of the bit value by the second voltage value based on the bit value of after the error correction of the first page.
Exemplary embodiments of a memory controller, a storage device, and a memory control method will be explained below in detail with reference to the accompanying drawings. The present invention is not limited to the following embodiments.
The nonvolatile memory 3 is nonvolatile memory that stores data in a nonvolatile manner, and is, for example, NAND memory. An example of using the NAND memory for the nonvolatile memory 3 will be described herein, but a memory other than the NAND memory may be adopted. In the NAND memory, write and readout of the data are carried out for every write unit data generally called a page. In the present embodiment, a memory cell of the nonvolatile memory 3 is assumed as a multi-level cell in which two or more bits can be stored in a single memory cell.
The memory controller 2 controls the write in the nonvolatile memory 3 in accordance with a write command from the host 4. The memory controller 2 controls the readout from the nonvolatile memory 3 in accordance with a readout command from the host 4. The memory controller 2 includes a Host I/F 21, a memory I/F 22 (memory control unit), a control unit 23, an ECC (Error Correcting Code) unit 24, a data buffer 27, and a readout control unit 28, which are connected to each other with an internal bus 20.
The Host I/F 21 outputs the command received from the host 4, the user data (write data), and the like to the internal bus 20. The Host I/F 21 transmits the user data read out from the nonvolatile memory 3, the response from the control unit 23, and the like to the host 4.
The memory I/F 22 controls the write process of the user data, and the like to the nonvolatile memory 3 and the readout process of the same from the nonvolatile memory 3 based on an instruction of the control unit 23.
The control unit 23 comprehensively controls the semiconductor storage device 1. The control unit 23 is, for example, a CPU (Central Processing Unit), an MPU (Micro Processing Unit), and the like. When receiving a command from the host 4 via the Host I/F 21, the control unit 23 carries out the control corresponding to such command. For example, the control unit 23 instructs the memory I/F 22 on the write of the user data and the parity in the nonvolatile memory 3 according to the command from the host 4. Furthermore, the control unit 23 instructs the memory I/F 22 on the readout of the user data and the parity from the nonvolatile memory 3 according to the command from the host 4.
The control unit 23 determines a storage region (memory region) on the nonvolatile memory 3 with respect to the user data accumulated in the data buffer 27. The user data are stored in the data buffer 27 via the internal bus 20. The control unit 23 determines the memory region with respect to the data (page data) in units of pages, which is the write unit. In the present specification, the user data stored in one page of the nonvolatile memory 3 is defined as the unit data. If the parity, to be described later, is generated with respect to the unit data, the unit data and the parity are stored in one page of the nonvolatile memory 3 as one page data. In the present embodiment, the parity may not be generated as will be described later, in which case, the unit data is stored in one page of the nonvolatile memory 3 as one page data. The details of the unit data and the parity will be described later. In the present specification, the memory cells commonly connected to one word line are defined as a memory cell group. If the memory cell is a multi-level cell, the memory cell group corresponds to a plurality of pages. For example, if a multi-level cell in which two bits can be stored is used, the memory cell group corresponds to two pages. The control unit 23 determines the memory region of the nonvolatile memory 3 of the write destination for every unit data. A physical address is assigned to the memory region of the nonvolatile memory 3. The control unit 23 manages the memory region of the write destination of the unit data using the physical address. The control unit 23 instructs the memory I/F 22 to specify the determined memory region (physical address) and write the user data in the nonvolatile memory 3. The control unit 23 manages the correspondence of a logical address (logical address managed by the host 4) and the physical address of the user data. When a readout command including the logical address from the host 4 is received, the physical address corresponding to the logical address is specified, and specification of the physical address and the readout of the user data are instructed to the memory I/F 22.
The ECC unit 24 encodes the user data stored in the data buffer 27 to generate the parity. The ECC unit 24 includes an encoder 25 and a decoder 26. The encoder 25 encodes the user data (unit data) to be written to the same page to generate the parity. The parity is written to the page, and the like to where the unit data, which is the basis of encoding, is written. The decoder 26 carries out decoding using the parity. The details of encoding and decoding, and the storage area of the parity according to the present embodiment will be described later.
The data buffer 27 temporarily stores the user data received from the host 4 until storing in the nonvolatile memory 3, or temporarily stores the data read out from the nonvolatile memory 3 until transmitting to the host 4. For example, the data buffer may be configured with a general purpose memory such as SRAM (Static Random Access Memory), DRAM (Dynamic Random Access Memory), and the like.
The readout control unit 28 instructs the memory I/F 22 on the readout voltage (threshold value), the page to read out, and the like based on the type of page to be read out instructed from the control unit 23 at the time of readout from the nonvolatile memory 3. The type of page is the page corresponding to each bit of a plurality of bits stored by the memory cell, and includes Upper page, Lower page, and the like.
In
The storage of data in the multi-level cell and the readout method of a comparative example will be described below.
In
In the NAND memory, error factors such as data retention error, read disturb error, program disturb failure, and the like are found. Due to such error factors, the charge amount of the floating gate may change and the wrong bit value may be read out at the time of readout from the memory cell. Thus, in the NAND memory, the parity is given so that correction can be made when error occurs. For example, the parity is given to the unit data, and the parity and the unit data are stored in the same page in the nonvolatile memory 3. When using the assigning method of the data value illustrated in
The assigning method of the data value to the distribution of the charge amount and the readout method from the nonvolatile memory 3 according to the present embodiment will be described below.
As illustrated in
Similarly, as illustrated in
As described above, if the bit value of the Lower page is fixed first, the readout that reduces the readout error of the Upper page can be performed. However, since the bit value of the Lower page has a possibility of including error with the readout bit value as is, the readout of the Upper page is carried out using the bit value of the Lower page of after the error correction using the parity for the Lower page.
In the present embodiment, the probability of the readout error of the Upper page lowers since the readout of the Upper page is carried out based on the bit value of the Lower page, as described above. However, the error at the time of readout cannot be lowered for the Lower page, and hence greater amount of parities than the Upper page are desirably assigned with respect to the Lower page.
Other than the examples of
The write operation to the nonvolatile memory 3 and the readout operation from the nonvolatile memory 3 according to the present embodiment will now be described. At the time of the write in the nonvolatile memory 3, the unit data and the parity generated using the unit data are written to each memory cell according to the assignment illustrated in
The operation in readout of the present embodiment differs between the readout of the Upper page and the readout of the Lower page. When the logical address of the data to be read out is instructed from the host 4, the control unit 23 obtains the physical address corresponding to the logical address, and notifies the physical address to the readout control unit 28. In this case, information with which the Upper page and the Lower page can be distinguished is contained as the physical address. Alternatively, the control unit 23 notifies, along with the physical address, the information indicating whether the page corresponding to the relevant physical address is the Upper page or the Lower page to the readout control unit 28.
The readout control unit 28 sets a counter n to 0 (step S13), and determines whether or not the bit value of the Lower page of the nth memory cell is “0” (step S14). If the bit value of the Lower page is “0” (Yes in step S14), the bit value of the Upper page of the nth memory cell is determined based on the determination result of the voltage level corresponding to Q12 (step S15). The readout control unit 28 determines whether or not n is np−1 (np is the number of memory cells connected to the same word line) (step S17), and terminates the process if n is np−1 (Yes in step S17). If n is not np−1 (No in step S17), n=n+1 is assumed (step S18), and the process returns to step S14. If the bit value of the Lower page is not “0” (No in step S14), the bit value of the Upper page of the nth memory cell is determined based on the determination result of the voltage level corresponding to Q23 (step S16), and the process proceeds to step S17.
As described above, in the present embodiment, either one of Q12 and Q23 is selected based on the bit value of after the error correction of the Lower page, and the bit value of the Upper page is determined based on the selected threshold value.
In the above description, an example of carrying out the assignment by the natural code has been described as illustrated in
As described above, in the present embodiment, the bit assignment by the natural code is carried out with respect to the charge amount distribution, and the charge threshold values Q12 and Q23 different from the normal charge threshold value to become the boundary of the charge amount distribution are defined. At the time of the readout of the Lower page (first page), the readout is carried out at three voltage levels, which are the normal charge threshold values to become the boundary of the charge amount distribution. At the time of the readout of the Upper page (second page), the Lower page is read out and error corrected, and either one of the charge threshold values Q12 and Q23 different from the boundary of the charge amount distribution is selected based on the bit value of the Lower page of after the error correction to determine the bit value of the Upper page. Thus, for the Upper page, the bit value is determined using the charge threshold values Q12 and Q23, and hence error due to the movement of the charge amount distribution is less likely to occur. A greater amount of parity than the Upper page thus can be assigned to the Lower page, and the error correction capability as a whole can be enhanced.
Generally, the Lower page and the Upper page corresponding to the memory cell connected to the same word line are often continuously performed with write, and the Lower page and the Upper page are also often continuously read out in readout. Therefore, when the Lower page is read out, the data (after error correction) of the Lower page is saved in the data buffer 27, and the like for a constant period so that steps S1 to S3 of
Nonvolatile memory 3 of the present embodiment includes a memory cell of three bits/cell. The present embodiment carries out assignment by the natural code, similar to the first embodiment, with respect to the memory cell of three bits/cell. The dotted line described as L on the right side of the figure is the charge threshold value used when reading out the Lower page, and the dotted line described as M on the right side is the charge threshold value used when reading out the Middle page.
At the time of write in the nonvolatile memory 3, the unit data and the parity generated using the unit data are written to each memory cell according to the assignment illustrated in
The operation at the time of readout of the Lower page of the present embodiment is similar to the operation at the time of readout of the Lower page of the first embodiment other than that there are seven voltage levels to use in the readout. Similar to the operation at the time of the readout of the Upper page of the first embodiment, the operation of the readout of the Middle page according to the present embodiment selects the charge threshold value to use in the determination of the bit value of the Middle page based on the bit value of after the error correction of the Lower page, and determines the bit value of the Middle page using the selected charge threshold value.
Specifically, if the bit value of after the error correction of the Lower page is zero, the readout is performed at three voltage levels respectively corresponding to the vicinity of the vertices of the three charge threshold values of 1 level, 3 level, and 5 level. If the bit value of after the error correction of the Lower page is one, the readout is performed at three voltage levels respectively corresponding to the vicinity of the vertices of the three charge threshold values of 2 level, 4 level, and 6 level. Actually, the readout may be carried out at six voltage levels respectively corresponding to the vicinity of the six vertices of 1 to 6 levels, and then the readout result of the three voltage levels may be respectively referenced. The bit value of the Middle page is determined based on the readout result of the three voltage levels (whether or not the charge amount of the floating gate is greater than or equal to the respective charge threshold value for the three charge threshold values).
For example, when the bit value of the Lower page is 0, the bit value of the Middle page is 1, and the bit value of the Upper page is 0, the charge distribution of 2 level is the ideal distribution. If the bit value of the Lower page is fixed at 0, and the readout is carried at three voltage levels corresponding to the three charge threshold values of 1 level, 3 level, 5 level in this case, the determination results respectively become “up”, “down”, and “down”. “Up” in the determination result is the determination result in which the charge amount of the floating gate is greater than or equal to the charge threshold value, and “down” is the determination result in which the charge amount of the floating gate is smaller than the charge threshold value. According to such determination results, the bit value of the Middle page can be fixed as 1. When the charge distribution that ideally becomes 2 level is shifted to the upper side, for example, error may possibly occur if the readout is carried out at the voltage level corresponding to the charge threshold value between 2 level and 3 level, but the accuracy of the readout becomes high if the readout is carried out at the voltage level corresponding to the charge threshold value in the vicinity of the vertex of 3 level.
The operation of the readout of the Upper page of the present embodiment includes determining the bit value of the Middle page described above, and then selecting the charge threshold value to use in the determination of the bit value of the Upper page based on the bit values of the Lower page and the Middle page, and determining the bit value of the Upper page using the selected charge threshold value. When the bit value of the Lower page is fixed at 0 and the bit value of the Middle page is fixed at 0, the bit value of the Upper page is determined using the determination result of the readout at the voltage level corresponding to the vicinity of the vertex of 2 level. When the bit value of the Lower page is fixed at 0 and the bit value of the Middle page is fixed at 1, the bit value of the Upper page is determined using the determination result of the readout at the voltage level corresponding to the vicinity of the vertex of 4 level. When the bit value of the Lower page is fixed at 1 and the bit value of the Middle page is fixed at 0, the bit value of the Upper page is determined using the determination result of the readout at the voltage level corresponding to the vicinity of the vertex of 3 level. When the bit value of the Lower page is fixed at 1 and the bit value of the Middle page is fixed at 1, the bit value of the Upper page is determined using the determination result of the readout at the voltage level corresponding to the vicinity of the vertex of 5 level. As apparent from
According to the example described above, in the readout of the Upper page, the bit value is determined in the order of the Lower page and the Middle page, and then the bit value of the Upper page is determined. In other words, the bit value is determined in the order of the Lower page (first page), Middle page (second page), and Upper page (third page), but the bit value of the Upper page (second page) may be determined based on the bit value of the Lower page (first page) without reading out the Middle page. In this case, there are two charge threshold values to use in the readout of the Upper page, the intermediate value (assumed as U1) of the charge threshold value third from the top of the Upper page and the charge threshold value fourth from the top of the Upper page, and the intermediate value (assumed as U2) of the charge threshold value fourth from the top of the Upper page and the charge threshold value fifth from the top of the Upper page. The result of the determination on which of the eight charge distributions is realized in the readout of the Lower page is output from the nonvolatile memory 3. If the charge distribution is one of the three (7 level, 6 level, 5 level) from the top, the bit value of the Upper page is determined as “1” regardless of the readout result of the Upper page. If the charge distribution is one of the three (2 level, 1 level, 0 level) from the bottom, the bit value of the Upper page is determined as “0” regardless of the readout result of the Upper page. If determined that the charge distribution is the fourth or the fifth (4 level or 3 level) from the top in the readout of the Upper page, the determination result of U1 is selected if the bit value of the Lower page is “0” and the determination result of U2 is selected if the bit value is “0” of the two readout results of the Upper page.
When determining the bit value of the Upper page based on the bit value of the Middle page without reading out the Lower page, the readout is first carried out using three charge threshold values, which are second, fourth and sixth from the top, of the charge threshold values used in reading out the Lower page of
In the present embodiment, it is desirable that the greatest amount of parities are added to the Lower page, and the least amount of parities are added (or parity is not added) to the Upper page.
In the present embodiment, therefore, for the case of three bits/cell, the bit assignment by the natural code is carried out with respect to the charge amount distribution, and the charge threshold value different from the normal charge threshold value to become the boundary of the charge amount distribution is defined. At the time of the readout of the Upper page, the readout and the error correction of the Lower page, and the readout and the error correction of the Middle page are carried out, and then the charge threshold value different from the boundary of the charge amount distribution is selected based on the bit value of the Middle page of after the error correction to determine the bit value of the Upper page.
The two bits/cell has been described in the first embodiment, and the three bits/cell has been described in the second embodiment. In summary, when carrying out the assignment by the natural code, the number of charge threshold values for the readout of the Lower page is 2K−1 for the case of K (K is an integer greater than or equal to two) bits/cell. At the time of the readout of the Lower page, the readout is carried out using 2K−1 voltage levels (first voltage value). At the time of the readout of a page other than the Lower page, the readout is carried out at P (P<2K−1) voltage levels (second voltage level) different from the 2K−1 voltage levels, and the voltage level to use in the determination of the bit value of the page to be read out is selected based on the bit value of the Lower page. Similar readout method can be applied for the case in which K is greater than or equal to four.
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. 61/949,548, filed on 7 Mar. 2014; the entire contents of which are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
61949548 | Mar 2014 | US |