Memory controller, semiconductor memory device, and control method for semiconductor memory device

09960788 ยท 2018-05-01

Assignee

Inventors

Cpc classification

International classification

Abstract

A memory controller is a memory controller including an encoder that product-codes, with a linear code, data to be recorded in a memory section and a decoder that decodes product-coded data read out from the memory section. The encoder and the decoder share a parity generation circuit including a plurality of remainder calculating and retaining sections, each including a remainder calculation circuit by a generator polynomial and a retaining circuit that retains an output of the remainder calculation circuit.

Claims

1. A memory controller comprising: an encoder that product-codes, with a linear code, data to be recorded in a memory section, the product code being a two-dimensional product code by a first code and a second code; a decoder that decodes product-coded data read out from the memory section; a first parity generation circuit that performs coding processing by the first code, generates a parity of the first code, and includes a plurality of remainder calculating and retaining sections, each including a remainder calculation circuit based on a generator polynomial and a retaining circuit that retains an output of the remainder calculation circuit; and a second parity generation circuit that is shared by the encoder and the decoder, performs coding processing by the second code, and generates a parity of the second code, wherein the coding processing by the second code is performed together with the coding processing by the first code, the parity of the second code is retained in each retaining circuit, decoding processing by the second code is performed together with decoding processing by the first code, the remainder calculation circuit is a linear feedback register, and the retaining circuit is a flip-flop.

2. The memory controller according to claim 1, wherein the decoder includes a syndrome generation circuit that divides the parity of the second code retained in each retaining circuit by a minimal polynomial of the generator polynomial.

3. The memory controller according to claim 2, wherein the encoder and the decoder further share the first parity generation circuit.

4. The memory controller according to claim 2, wherein the first code and the second code are BCH codes.

5. The memory controller according to claim 2, wherein the first code is a BCH code and the second code is a Reed Solomon code.

6. The memory controller according to claim 2, wherein the memory section is a NAND flash memory, a NOR flash memory, a magnetoresistive random access memory, or a resistive random access memory.

7. The memory controller according to claim 6, wherein a memory cell of the memory section is a multi-value memory.

8. A semiconductor memory device comprising: a memory section; and a memory controller including: an encoder that product-codes, with a linear code, data to be recorded in the memory section, the product code being a two-dimensional product code by a first code and a second code, a decoder that decodes product-coded data read out from the memory section, a first parity generation circuit that performs coding processing by the first code, generates a parity of the first code, and includes a plurality of remainder calculating and retaining sections, each including a remainder calculation circuit based on a generator polynomial and a retaining circuit that retains an output of the remainder calculation circuit; and, a second parity generation circuit that is shared by the encoder and the decoder, performs coding processing by the second code, and generates a parity of the second code, wherein the coding processing by the second code is performed together with the coding processing by the first code, the parity of the second code is retained in each retaining circuit, decoding processing by the second code is performed together with decoding processing by the first code, the remainder calculation circuit is a linear feedback register, and the retaining circuit is a flip-flop.

9. The semiconductor memory device according to claim 8, wherein the decoder includes a syndrome generation circuit that divides the parity of the second code retained in each retaining circuit by a minimal polynomial of the generator polynomial.

10. The semiconductor memory device according to claim 9, wherein the encoder and the decoder further share the first parity generation circuit.

11. The semiconductor memory device according to claim 9, wherein the first code and the second code are BCH codes.

12. The semiconductor memory device according to claim 9, wherein the first code is a BCH code and the second code is a Reed Solomon code.

13. The semiconductor memory device according to claim 9, wherein the memory section is a NAND flash memory, a NOR flash memory, a magnetoresistive random access memory, or a resistive random access memory.

14. The semiconductor memory device according to claim 13, wherein a memory cell of the memory section is a multi-value memory.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) FIG. 1 is a diagram for explaining a product code of a memory controller in an embodiment;

(2) FIG. 2 is a configuration diagram showing a schematic configuration of a memory card including the memory controller in the embodiment;

(3) FIG. 3 is a configuration diagram of an ED section of the memory controller in the embodiment;

(4) FIG. 4 is a configuration diagram of a C1-parity generation circuit of the memory controller in the embodiment;

(5) FIG. 5 is a configuration diagram of a C2-parity generation circuit of the memory controller in the embodiment;

(6) FIG. 6 is a configuration diagram of a syndrome generation circuit of the memory controller in the embodiment;

(7) FIG. 7 is a flowchart for coding processing of the memory controller in the embodiment; and

(8) FIG. 8 is a flowchart of decoding processing of the memory controller in the embodiment.

DETAILED DESCRIPTION

(9) First, schematic configurations of a memory controller 2 and a memory card 3, which is a semiconductor memory device including the memory controller 2, in an embodiment of the present invention are explained with reference to FIG. 2.

(10) As shown in FIG. 2, the memory card 3 in the embodiment of the present invention records data received from a host 4 such as a personal computer or a digital camera and transmits the recorded data to the host 4. The memory card 3 includes a semiconductor memory section (hereinafter simply referred to as memory section as well) 10 and a memory controller 2. The memory section 10 is configured from a NAND flash memory and includes a larger number of memory cells 11, which are unit cells. The memory cell 11 may be a multi-value memory in which a plurality of bits are recorded.

(11) The memory controller 2 includes a ROM 13, a CPU 14, which is a control section, a RAM 15, a host I/F (interface) 16, an E/D (encoder/decoder) section 17, and a NAND I/F (interface) 19, each of which is connected via a bus 18.

(12) The memory controller 2 performs data transmission and reception with the host 4 via the host I/F 16 and performs data transmission and reception with the memory section 10 via the NAND I/F 19 using the CPU 14. The memory controller 2 realizes address management of the memory section 10 with FW (firmware) executed by the CPU 14. Control of the entire memory card 3 corresponding to a command input from the host 4 is also executed by the FW in the CPU 14. The ROM 13 records, for example, a control program of the memory card 3. In the RAM 15, for example, an address conversion table necessary in address management is recorded.

(13) The ED section 17 includes an encoder 20 that performs encoding processing for generating and giving an error correction code during data recording and a decoder 30 that performs decoding processing for read-out encoded data during data readout. Note that the ED section 17 may include an SRAM that temporarily stores data during processing.

(14) In the memory controller 2 of the memory card 3, the encoder 20 and the decoder 30 of the ED section 17 share a remainder calculating section 40, which is a parity generation circuit.

(15) The ED section 17 uses a BCH (Bose-Chaudhuri-Hocquenghem) code, which is a linear code, or a Reed Solomon (RS) code, which is a linear block code of the BCH code.

(16) Both of the BCH code and the Reed Solomon code are codes configured using characteristics of a primitive polynomial on a Galois field and a root of the primitive polynomial. However, the BCH code and the Reed Solomon code are different in that, whereas the BCH code treats information with one bit as a unit and an error correction code is also generated in bit units, the Reed Solomon code treats data with, for example, 8 bits=1 byte as a unit and an error correction code is also generated in byte units.

(17) In the following explanation, an example is explained in which the ED section 17 performs coding/decoding by a two-dimensional BCH product code shown in FIG. 1.

(18) As shown in FIG. 3, the remainder calculating section 40 includes a C1-parity generation circuit 41 by the correction code C1 and a C2-parity generation circuit 42 by the correction code C2. The decoder 30 includes a syndrome generation circuit 31 that generates a syndrome from a C2 parity generated by the C1-parity generation circuit 41 and the C2-parity generation circuit 42 and an error correction circuit 32 that detects an error position from the syndrome and corrects an error.

(19) As shown in FIG. 4, the C1-parity generation circuit 41 includes a remainder calculation circuit 43 by a generator polynomial G (x). The remainder calculation circuit 43 by the generator polynomial G (x) is realized by a linear feedback shift register (LFSR) or a combinational circuit.

(20) The generator polynomial G (x) used during 5-bit correction indicated by Equation 1 is explained below as an example. In the Equation, M.sub.1 (x) to M.sub.9 (x) are referred to as minimal polynomials.
G(x)=M.sub.1(x)M.sub.3(x)M.sub.5(x)M.sub.7(x)M.sub.9(x)(1)

(21) As shown in FIG. 5, the C2-parity generation circuit 42 includes remainder calculation retaining circuits 42A (42A1 to 42A (M+P)) of (M+P) sets by the generator polynomials G (x). Like the C1-parity generation circuit, remainder calculation circuits 44A (44A1 to 44A (M+P)) by the generator polynomial G (x) are realized by LFSRs or combinational circuits. The remainder calculation retaining circuits 42A include the remainder calculation circuits 44A (44A1 to 44A (M+P)) by the generator polynomial G (x) and flip-flops (FFs) 45A (45A1 to 45A (M+P)), which are retaining circuits that retain outputs of the remainder calculation circuits 44A. Like the remainder calculation circuit 43, the remainder calculation circuits 44A perform a division by the generator polynomial G (x) and calculate a remainder. When the processing of the C1-parity generation circuit 41 is completed, the C2 parity is retained in the FF 45.

(22) As shown in FIG. 6, the syndrome generation circuit 31 includes remainder calculation circuits 31A (31A1 to 31A9) by the minimal polynomials M.sub.1 (x) to M.sub.9 (x). The remainder calculation circuits 31A are realized by LFSRs or combinational circuits. The remainder calculation circuits 31A1 to 31A9 generate syndromes S1 to S9.

(23) In the memory controller 2 of the memory card 3, since the C2-parity generation circuit 42 includes the FF 45, when the C1 parity generation is completed, the C2 parity generation is also completed. Therefore, the memory controller 2 performs coding processing and decoding processing faster than the conventional memory controller 2 that performs operation by iterative processing.

(24) Since the C2-parity generation circuit 42 includes the (M+P) sets of remainder calculation retaining circuits 42A, the circuit size of the C2-parity generation circuit 41 is large.

(25) However, in the memory controller 2, since the encoder 20 and the decoder 30 share the C2-parity generation circuit 42, the circuit size of the memory controller 2 is reduced.

(26) Note that, in the memory controller 2, the encoder 20 and the decoder 30 also share the C1-parity generation circuit 41. Since the C1-parity generation circuit 41 has a small circuit size compared with the C2-parity generation circuit 42, the encoder 20 and the decoder 30 may respectively include C1-parity generation circuits.

(27) A principle of the decoder 30 that decodes a reception polynomial P (x) based on product-coded data read out from the memory section 10 is briefly explained.

(28) The C2-parity generation circuit 42 divides the reception polynomial P (x) by the generator polynomial G (x).
P(x)=G(x)Q(x)+R(x)(2)
Q (x) is a quotient and R (x) is a remainder.

(29) The syndrome generation circuit 31 divides the remainder R (x) by the minimal polynomial M.sub.1 (x).
R(x)=M.sub.1(x)Q.sub.1(x)+R.sub.1(x)(3)
Q (x) is a quotient and R.sub.1 (x) is a remainder.

(30) From Equation 2 and Equation 3, Equation 4 is obtained.
P(x)=G(x)Q(x)+M.sub.1(x)Q.sub.1(x)+R.sub.1(x)(4)

(31) Given Equation 1, that is,
G(x)=M.sub.1(x)M.sub.3(x)M.sub.5(x)M.sub.7(x)M.sub.9(x),

(32) Equation 5 is obtained.
P(x)=M.sub.1(x)M.sub.3(x)M.sub.5(x)M.sub.7(x)M.sub.9(x)Q(x)+M.sub.1(x)Q.sub.1(x)+R.sub.1(x)(5)

(33) If Q (x)={(M.sub.3 (x)M.sub.5 (x)M.sub.7 (x)M.sub.9 (x)Q (x)+Q.sub.1 (x)}, Equation 6 is obtained.
P(x)=M.sub.1(x)Q(x)+R.sub.1(x)(6)

(34) Equation 6 indicates that a remainder obtained by dividing the reception polynomial P (x) by M.sub.1 (x) is R.sub.1 (x). The same applies to M.sub.3 (x), M.sub.5 (x), M.sub.7 (x), and M.sub.9 (x).

(35) Operation of the memory controller in the embodiment is explained according to flowcharts of FIGS. 7 and 8.

(36) First, coding processing is explained according to the flowchart of FIG. 7.

(37) Step S11

(38) A row number is set to 0.

(39) Step S12

(40) Data of a target row is input to the C1-parity generation circuit 41 and a C1 parity is generated.

(41) Step S13

(42) Data of a target column is input to the C2-parity generation circuit 42 and a value of the FF 45 is updated.

(43) Step S14

(44) When the row number is N (Yes), the processing is completed.

(45) Step S15

(46) When the row number is not N in S14 (No), 1 is added to a target row number and the processing is iterated from S12.

(47) When the processing is completed, that is, when processing of data in N rows is completed, the value retained in the FF 45 of the C2-parity generation circuit 42 changes to a C2 parity.

(48) Decoding processing is explained according to the flowchart of FIG. 8.

(49) Step S21

(50) A column number and a row number are set to 0. Note that the number of times of iteration (Itr) is set to 1.

(51) Step S22

(52) Data of a target column is input to the C1-parity generation circuit 41 and a C1 parity is generated.

(53) Step S23

(54) A C1 syndrome is generated from the C1 parity by the syndrome generation circuit 31. If an error position is specified from the C1 syndrome, an error is corrected.

(55) Step S24

(56) Correction data of a target row is input to the C2-parity generation circuit 42 and the value of the FF 45 is updated.

(57) When the row number is N (Yes), C1 correction processing in the first time of the number of times of iteration (Itr) is completed.

(58) Step S25

(59) When the row number is not N (No), in step S26, 1 is added to a target row number and the processing is iterated from S22.

(60) Step S27

(61) When row processing is completed in S25 (Yes), column processing is performed. That is, a C2 parity is read out from the FF 45 of the C2-parity generation circuit 42 of the target column.

(62) Step S28

(63) A C2 syndrome is generated from a C2 parity of the target row by the syndrome generation circuit 31. If an error position is specified from the C2 syndrome, an error is corrected.

(64) Step S29

(65) When the column number is not (M+P) (No), in step S30, 1 is added to a target column number and the processing is iterated from S27.

(66) Step S31

(67) When the column number is (M+P) in S29 (Yes), it is determined whether all errors are corrected. Note that completion of the error correction may be checked by adding a CRC parity to the end of information bits.

(68) Step S32

(69) When the error correction is not completed in S32, in step S33, 1 is added to the number of times of iteration Itr. The processing is iterated from step S21 until the number of times of iteration Itr reaches a predetermined set number of times Max.

(70) As explained above, in the memory controller 2 in the embodiment, when the C1 parity calculation by the C1 code is completed, the C2 parity calculation by the C2 code is also completed. Therefore, processing is fast. The retaining circuit in which the C2 parity is retained is the flip-flop. Therefore, a circuit configuration is simple. Further, the encoder and the decoder share the C2-parity generation circuit including the remainder calculation circuit (LFSR) of the generator polynomial and the retaining circuit FF that retains an output of the remainder calculation circuit. Therefore, a circuit size is reduced.

(71) Note that, in the above explanation, both of the first code C1 and the second code C2 are the BCH codes. However, the first code C1 and the second code C2 may be either the BCH codes or the RS codes. However, the first code C1 is particularly preferably the BCH code faster in processing than the RS code. This is because, when all errors can be corrected in decoding by the first code C1, decoding by the second code C2 is unnecessary.

(72) In the above explanation, the column processing is performed after the row processing. However, the column processing may be performed first. The two-dimensional product code is explained as the example above. However, the two-dimensional product code can be expanded to an n-dimensional product code (N>3).

(73) In the above explanation, the memory card 3 connected to the host 4 is explained as the example of the semiconductor memory device. The same effects as the effects of the memory card 3 or the like can be obtained by a NAND flash memory device of a so-called embedded type (a so-called silicon disk drive: SSD) or the like that is housed on the inside of the host 4 and records start data or the like of the host 4. The memory section 10 may be a NOR flash memory, a magnetoresistive random access memory (MRAM), a resistive random access memory (ReRAM), or the like as long as the memory section 10 includes a nonvolatile memory cell.

(74) 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.