Memory system and control method
The memory system simplifies error correction decoding by using a decoding unit to estimate error bits and perform variable conversion on error locator polynomials, reducing complexity and improving efficiency in nonvolatile memory systems.
Patent Information
- Application Number
- JP2023021414
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-02-15
- Publication Date
- 2024-08-27
AI Technical Summary
Existing memory systems require complex configurations for error correction decoding, which can be inefficient and resource-intensive.
A memory system with a simplified configuration that includes a nonvolatile memory and a memory controller, utilizing a decoding unit to calculate syndromes and estimate error bits, and perform variable conversion on error locator polynomials to correct errors of up to 3 bits using a BCH code, reducing the complexity of error correction decoding.
The simplified configuration allows for efficient error correction with reduced circuit scale and computational overhead, enabling faster and more efficient data retrieval from nonvolatile memory.
Smart Images

Figure 2024115662000001_ABST
Abstract
Description
[Technical field]
[0001] SUMMARY OF THE DISCLOSURE The present invention relates to a memory system and a control method. [Background technology]
[0002] In a memory system, in order to protect data stored in a memory such as a NAND flash memory, error correction coded data is stored in the memory. Therefore, when reading data stored in the memory, the error correction coded data (also called a received word) read from the memory is decoded to restore the data before being error correction coded. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] International Publication No. 2001 / 084719 [Patent Document 2] Japanese Patent Application Publication No. 7-231261 [Patent Document 3] U.S. Pat. No. 9,362,953 Summary of the Invention [Problem to be solved by the invention]
[0004] An object of the embodiments of the present invention is to provide a memory system and a control method capable of executing error correction (decoding) with a simpler configuration. [Means for solving the problem]
[0005] A memory system according to an embodiment includes a nonvolatile memory and a memory controller. The nonvolatile memory stores data encoded with an error correcting code that corrects errors of n bits or less (n is an integer equal to or greater than 3). The memory controller reads a received word from the nonvolatile memory, calculates a syndrome using the received word, estimates the number of error bits using the syndrome, and if the number of error bits is 2 or 3, performs variable transformation on a variable of an error locator polynomial corresponding to the number of bits using a calculated value that is one of a first value and a second value calculated based on the syndrome, performs calculation of a root of a transformation polynomial obtained by transforming the error locator polynomial according to the variable transformation using the first value and the second value, performs variable inverse transformation using the calculated value for the root of the transformation polynomial to obtain a root of the error locator polynomial, and corrects an error at an error location corresponding to the obtained root. [Brief description of the drawings]
[0006] [Figure 1] FIG. 1 is a block diagram of a memory system according to an embodiment. [Diagram 2] FIG. 2 is a block diagram of a decoding unit according to the first embodiment. [Diagram 3] FIG. 13 is a diagram showing an example of the configuration of a circuit of a comparative example. [Figure 4] 11 is a flowchart of a decoding process according to an embodiment. [Diagram 5] FIG. 11 is a block diagram of a decoding unit according to the second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0007] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, preferred embodiments of a memory system according to the present invention will be described in detail with reference to the accompanying drawings.
[0008] (First embodiment) First, the memory system according to this embodiment will be described in detail with reference to the drawings. FIG. 1 is a block diagram showing a schematic configuration example of the memory system according to this embodiment. As shown in FIG. 1, the memory system 1 includes a memory controller 10 and a non-volatile memory 20. The memory system 1 can be connected to a host 30, and FIG. 1 shows the memory system 1 connected to the host 30. The host 30 may be, for example, an electronic device such as a personal computer or a mobile terminal.
[0009] The nonvolatile memory 20 is a nonvolatile memory that stores data in a nonvolatile manner, such as a NAND type flash memory (hereinafter, simply referred to as a NAND memory). In the following description, a case where a NAND memory is used as the nonvolatile memory 20 is exemplified, but it is also possible to use a storage device other than a NAND memory, such as a three-dimensional structure flash memory, a ReRAM (Resistive Random Access Memory), or a FeRAM (Ferroelectric Random Access Memory), as the nonvolatile memory 20. In addition, it is not essential that the nonvolatile memory 20 is a semiconductor memory, and this embodiment can be applied to various storage media other than semiconductor memories.
[0010] The memory system 1 may be any of various memory systems equipped with a nonvolatile memory 20, such as a so-called SSD (Solid State Drive) or a memory card in which a memory controller 10 and a nonvolatile memory 20 are configured as one package.
[0011] The memory controller 10 controls writing to the non-volatile memory 20 in accordance with a write request from the host 30. The memory controller 10 also controls reading from the non-volatile memory 20 in accordance with a read request from the host 30. The memory controller 10 is a semiconductor integrated circuit configured as, for example, a SoC (System On a Chip). The memory controller 10 includes a host I / F (host interface) 15, a memory I / F (memory interface) 13, a control unit 11, an encoding / decoding unit (codec) 14, and a data buffer 12. The host I / F 15, the memory I / F 13, the control unit 11, the encoding / decoding unit 14, and the data buffer 12 are connected to each other by an internal bus 16. Some or all of the operations of each component of the memory controller 10 described below may be realized by a CPU (Central Processing Unit) executing firmware, or may be realized by hardware.
[0012] The host I / F 15 performs processing in accordance with the interface standard with the host 30, and outputs commands received from the host 30, user data to be written, and the like to the internal bus 16. In addition, the host I / F 15 transmits user data read and restored from the non-volatile memory 20, responses from the control unit 11, and the like to the host 30.
[0013] The memory I / F 13 performs a write process to the non-volatile memory 20 based on an instruction from the control unit 11. The memory I / F 13 also performs a read process from the non-volatile memory 20 based on an instruction from the control unit 11.
[0014] The control unit 11 performs overall control of each component of the memory system 1. When the control unit 11 receives an instruction from the host 30 via the host I / F 15, the control unit 11 performs control according to the instruction. For example, the control unit 11 instructs the memory I / F 13 to write user data and parity to the nonvolatile memory 20 according to the instruction from the host 30. The control unit 11 also instructs the memory I / F 13 to read user data and parity from the nonvolatile memory 20 according to the instruction from the host 30.
[0015] Furthermore, when the control unit 11 receives a write request from the host 30, it determines a storage area (memory area) on the nonvolatile memory 20 for the user data stored in the data buffer 12. That is, the control unit 11 manages the write destination of the user data. The correspondence between the logical address of the user data received from the host 30 and the physical address indicating the storage area on the nonvolatile memory 20 where the user data is stored is stored as an address conversion table.
[0016] Furthermore, when the control unit 11 receives a read request from the host 30, it converts the logical address specified by the read request into a physical address using the address conversion table described above, and instructs the memory I / F 13 to read from the physical address.
[0017] In a NAND memory, writing and reading are generally performed in data units called pages, and erasure is performed in data units called blocks. In this embodiment, a plurality of memory cells connected to the same word line are called a memory cell group. When the memory cells are single level cells (SLC: Single Level Cell), one memory cell group corresponds to one page. When the memory cells are multi-level cells (MLC: Multiple Level Cell), one memory cell group corresponds to multiple pages. In this description, MLC includes TLC (Triple Level Cell) and QLC (Quad Level Cell). Each memory cell is connected to a word line and also to a bit line. Therefore, each memory cell can be identified by an address that identifies a word line and an address that identifies a bit line.
[0018] The data buffer 12 temporarily stores user data received by the memory controller 10 from the host 30 until the data is stored in the nonvolatile memory 20. The data buffer 12 also temporarily stores user data read from the nonvolatile memory 20 until the data is transmitted to the host 30. For the data buffer 12, for example, a general-purpose memory such as an SRAM (Static Random Access Memory) or a DRAM (Dynamic Random Access Memory) can be used. Note that the data buffer 12 may not be built into the memory controller 10, but may be mounted outside the memory controller 10.
[0019] User data transmitted from the host 30 is transferred to the internal bus 16 and temporarily stored in the data buffer 12. The encoding / decoding unit 14 encodes the user data stored in the nonvolatile memory 20 to generate a codeword. The encoding / decoding unit 14 also decodes the received word read from the nonvolatile memory 20 to restore the user data. Therefore, the encoding / decoding unit 14 includes an encoding unit (Encoder) 17 and a decoding unit (Decoder) 18. Note that the data encoded by the encoding / decoding unit 14 may include control data used inside the memory controller 10 in addition to the user data.
[0020] Next, the write process of this embodiment will be described. When writing to the non-volatile memory 20, the control unit 11 instructs the encoding unit 17 to encode the user data. At that time, the control unit 11 determines a storage location (storage address) of the codeword in the non-volatile memory 20, and also instructs the memory I / F 13 of the determined storage location.
[0021] The encoding unit 17 generates a codeword by encoding the user data on the data buffer 12 based on an instruction from the control unit 11. For example, an encoding method using algebraic codes such as BCH (Bose-Chaudhuri-Hocquenghem) code and RS (Reed-Solomon) code, as well as an encoding method (such as product code) using these codes as row- and column-direction component codes, can be adopted as the encoding method. The memory I / F 13 controls the storage of the codeword in a memory location on the non-volatile memory 20 instructed by the control unit 11. The following describes an example in which a BCH code that corrects errors of 3 bits or less is used.
[0022] Next, a process of reading from the non-volatile memory 20 in this embodiment will be described. When reading from the non-volatile memory 20, the control unit 11 designates an address on the non-volatile memory 20 and instructs the memory I / F 13 to read. The control unit 11 also instructs the decoding unit 18 to start decoding. The memory I / F 13 reads the received word from the designated address in the non-volatile memory 20 in accordance with the instruction of the control unit 11, and inputs the read received word to the decoding unit 18. The decoding unit 18 decodes the received word read from the non-volatile memory 20.
[0023] The decoding unit 18 decodes the received word read from the non-volatile memory 20. The decoding unit 18 realizes the calculation of the root of the error locator polynomial when the number of error bits (hereinafter, the number of errors) is 2 or 3, with a simpler configuration.
[0024] Fig. 2 is a block diagram showing a configuration example of the decoding unit 18 according to this embodiment. Fig. 2 shows an example in which the decoding unit 18 is realized by a hardware circuit. As shown in Fig. 2, the decoding unit 18 includes a syndrome calculation circuit 201, arithmetic circuits 202 to 205, a root calculation circuit 100, a root calculation circuit 210, selection circuits 220 and 230, an error position calculation circuit 240, and a bit flip circuit 250.
[0025] The syndrome calculation circuit 201 inputs a received word r(x) and calculates and outputs a syndrome. For example, when the received word is r(x):=c(x)+e(x), the syndrome calculation circuit 201 calculates and outputs a syndrome. i :=r(α i ) Syndrome S i Calculate c(x) and e(x) as the codeword and error, respectively. α is a function of GF(2 m ) Primitive 2 m represents the -1th root. When using a BCH code that corrects errors of 3 bits or less, the syndrome calculation circuit 201 inputs the received word r(x) and outputs syndromes s1, s3, and s5. The syndromes s1, s3, and s5 correspond to the syndromes corresponding to the first, third, and fifth powers of the primitive element α of the Galois field GF, respectively.
[0026] The arithmetic circuits 202 to 205 each execute the following arithmetic operations. Arithmetic circuit 202: Outputs the cube of syndrome s1 (an example of a power operation). · Arithmetic circuit 203: Outputs the fifth power of syndrome s1 (an example of an exponentiation operation). · Arithmetic circuit 204: Adds the output value of the arithmetic circuit 202 and the syndrome s3, and outputs β, which is the addition result. · Arithmetic circuit 205: Adds the output value of the arithmetic circuit 203 and the syndrome s5, and outputs γ as the addition result.
[0027] Note that β and γ are examples of values (first value, second value) calculated based on the syndrome. As described below, in the first embodiment, one of β and γ, γ, is used as a calculated value to perform variable conversion on the variables of the error locator polynomial, and both β and γ are used to calculate the roots of a conversion polynomial obtained by converting the error locator polynomial. Note that in the second embodiment, an example will be described in which the other of β and γ, β, is used as a calculated value to perform variable conversion.
[0028] The root calculation circuit 100 calculates the roots of a quadratic or cubic error locator polynomial used when the number of errors is 2 or 3. For example, the root calculation circuit 100 inputs β and γ, and outputs the roots x1, x2, and x3 of the error locator polynomial. The details of the root calculation circuit 100 will be described later.
[0029] The root calculation circuit 210 calculates the root of a 0th or 1st order error locator polynomial used when the number of errors is 0 or 1. For example, the root calculation circuit 210 receives the syndrome s1 as an input and outputs the syndrome s1 as the root of the error locator polynomial.
[0030] The number of errors can be estimated using the syndrome value as follows: The number of errors and the syndrome value have the following relationship. When the number of errors is 0 or 1, s1 3 =s3 When the number of errors is 0 or 1, s1 5=s5 When the number of errors is 2 or 3, s1 3 ≠s3
[0031] This relationship can be rephrased as follows: When the number of errors is 0 or 1, s1 3 = s3 and s1 5 =s5 When the number of errors is 2 or 3, s1 3 ≠s3
[0032] Therefore, (s1 3 ≠ s3 or s1 5 ≠s5) and (s1 3 =s3) (i.e., s1 3 = s3 and s1 5 ≠s5), the number of errors will be 4 or more. Also, if we assume that the number of errors is 3 or less, (s1 3 = s3), the number of errors will be 0 or 1.
[0033] Here, β:=s1 3 +s3, γ:=s1 5 +s5, then β=0 is s1 3 = s3, and γ = 0 is equivalent to s1 5 = s5. Therefore, using β and γ, we obtain the following relationship for the number of errors: When (β≠0 or γ≠0) and (β=0) (i.e., when β=0 and γ≠0), the number of errors is 4 or more If we assume that the number of errors is 3 or less, then when (β=0), the number of errors is 0 or 1.
[0034] The selection circuit 220 selects and outputs either the root output by the root calculation circuit 100 or the root output by the root calculation circuit 210 according to the number of errors. As described above, for example, β=0 means that the number of errors is 0 or 1. Therefore, when β=0, the selection circuit 220 selects and outputs the root output by the root calculation circuit 210.
[0035] The selection circuit 230 selects and outputs either the input root or information indicating a correction failure according to the number of errors. As described above, for example, β=0 and γ≠0 means that the number of errors is 4 or more. Therefore, when β=0 and γ≠0, the selection circuit 230 outputs information indicating a correction failure.
[0036] The error location calculation circuit 240 inputs the root of the error location polynomial and outputs the error location. For example, when the roots x1, x2, and x3 output by the root calculation circuit 100 are input, the error location calculation circuit 240 outputs the error locations i1, i2, and i3. When the syndrome s1, which is the root output by the root calculation circuit 210, is input, the error location calculation circuit 240 outputs the error location i1.
[0037] The bit flip circuit 250 receives the received word r(x) and the error position output by the error position calculation circuit 240, and outputs the received word with the bit at the error position inverted.
[0038] Next, a detailed description will be given of the root calculation circuit 100. First, the error locator polynomial will be described.
[0039] An l-th degree (l is an integer equal to or greater than 0) error locator polynomial is expressed by the following equation (1). For example, error locator polynomials when l=0 to 3, that is, zeroth to third degree error locator polynomials, are expressed by the following equations (2) to (5).
number
number
number
number
number
[0040] The roots of the zeroth-order and first-order error locator polynomials can be found collectively, as described below. Hereinafter, the process of finding the roots of the zeroth-order and first-order error locator polynomials collectively is referred to as "root calculation of the zeroth-order, first-order error locator polynomial." Similarly, the roots of the quadratic and third-order error locator polynomials can be found collectively. Hereinafter, the process of finding the roots of the quadratic and third-order error locator polynomials collectively is referred to as "root calculation of the quadratic, third-order error locator polynomial."
[0041] First, we will explain the root calculation of the 0th and 1st order error locator polynomial. When the number of errors is 0, s1 3 =s3, s1=0, when the number of errors is 1, s1 5 =s5, s1 ≠ 0. Therefore, by "setting σ(x) = x + s1 and removing 0 from the roots of σ(x)", we can calculate the roots of the 0th and 1st degree error locator polynomial. This is derived from the following: When the number of errors is 0, the root of σ(x) is s1, and since s1=0, s1 is eliminated and there is no solution. When the number of errors is 1, the root of σ(x) is s1, and since s1 ≠ 0, s1 cannot be eliminated.
[0042] Next, we will explain how to calculate the roots of the quadratic and cubic error locator polynomial. When the number of errors is 2, s1 3 ≠ s3, s1 6 +s1s5=s1 3 s3+s3 2 When the number of errors is 3, s1 3 ≠ s3, s1 6 +s1s5 ≠ s1 3 s3+s3 2 Therefore, assuming that σ(x) is expressed by the following equation (6), the roots of the second and third degree error locator polynomials can be calculated by "removing 0 from the roots of σ(x)".
number
[0043] This is derived from the following: When the number of errors is 2, the roots of σ(x) are the roots of the quadratic error locator polynomial and 0 according to the following equation (7). Here, (s13 Since σ(x) / s≠0, the roots of the quadratic error locator polynomial do not contain 0. In other words, the roots of the quadratic error locator polynomial cannot be removed. Therefore, the roots of the quadratic error locator polynomial can be found by removing 0 from the roots of σ(x). When the number of errors is 3, the roots of σ(x) are the roots of the cubic error locator polynomial. Here, from equation (8) below, the roots of the cubic error locator polynomial do not include 0. In other words, the roots of the cubic error locator polynomial are never removed. Therefore, the roots of the cubic error locator polynomial can be found by removing 0 from the roots of σ(x).
number
number
[0044] Next, we will explain the procedure for calculating the root of σ(x) expressed by equation (6). If the variables x and y are transformed by the variable transformation expressed as x=y+s1, σ(x) is expressed by the following equation (9).
number
[0045] Note that equation (9) corresponds to a polynomial obtained by transforming the error locator polynomial according to the variable transformation of x = y + s1. In the following, such a polynomial obtained by transforming the error locator polynomial according to the variable transformation may be referred to as a transformed polynomial.
[0046] Here, β:=s1 3 +s3, γ:=s1 5 +s5, σ(x) is expressed by the following formula (10). Below, we will explain separately the cases (C1) when γ=0 and (C2) when γ≠0.
number
[0047] (C1) When γ=0 From the following formula (11), the roots y1, y2, and y3 can be found by using correspondence information (such as a look-up table (LUT)) that returns the cube root of β with β as key information. The LUT is an example of correspondence information that associates multiple values that the key information can take with the roots of a conversion polynomial, and any other form of correspondence information may be used.
number
number
number
number
number
[0048] Also, for each of the obtained roots z1, z2, and z3, 5 By multiplying by √(γ), the roots y1, y2, and y3 of σ(x) can be found. n √()” represents the n-th root of the value inside the brackets. For example, 5 √(γ) represents the fifth root of γ. When n=2, it may be written simply as "√()". Furthermore, by adding s1 to each of the obtained roots y1, y2, and y3, the roots x1, x2, and x3 of σ(x) can be found.
[0049] In addition, the cube roots of β, y2 and y3, are calculated by using the cube root of β, y1, as follows: y2=y1ω, y3=y1ω 2 where ω is the cube root of 1.
[0050] Also, the root x3 of σ(x) may be found by using the roots x1 and x2 of σ(x) as x3=x1+x2+s1. In this case, only the roots y1 and y2 and only the roots z1 and z2 need to be found.
[0051] As shown in equation (12), in the first embodiment, the variable transformation is performed using only γ, which is one of β and γ, as a calculated value. The variable transformation can be interpreted as being used to reduce the number of key information in the LUT. For example, by using the variable transformation in equation (12), the roots z1, z2, and z3 can be found by the LUT using one key information expressed by equation (14).
[0052] As a variable transformation for using one piece of key information, a variable transformation other than that in equation (12) may be used. Below, a comparative example using a variable transformation other than that in equation (12) will be described.
[0053] In the comparative example, the variables y and z are converted by the variable conversion expressed by the following equation (16), and √(β 5 / γ 3 ) as one piece of key information, the roots z1, z2, and z3 can be found by using an LUT that returns the roots of the polynomial expressed by the following equation (18).
number
number
number
[0054] The roots y1, y2, and y3 of σ(x) are obtained by multiplying the obtained roots z1, z2, and z3 by √(γ / β), respectively. Furthermore, the roots x1, x2, and x3 of σ(x) are obtained by adding s1 to the obtained roots y1, y2, and y3, respectively.
[0055] In the comparative example, the following two inverse elements need to be calculated: ·Key information√(β 5 / γ 3 ) used to calculate 1 / γ · 1 / β used to calculate √(γ / β) to be multiplied by roots z1, z2, z3 when finding roots y1, y2, y3
[0056] In contrast to this, in this embodiment, in order to calculate the key information expressed by equation (14), it is necessary to calculate γ to the (−3 / 5)th power (details will be described later).
[0057] In other words, in this embodiment, instead of calculating two inverse elements, only the calculation of the (-3 / 5)th power is required. The calculation of the (-3 / 5)th power may require a circuit scale similar to that of the inverse element, but at least in this embodiment, the calculation equivalent to the inverse element calculation can be reduced from two times to one time.
[0058] The root calculation circuit 100 is configured to execute the root calculation of the quadratic and cubic error locator polynomials as described above. The root calculation circuit 100 in Fig. 2 will be described in detail. The root calculation circuit 100 includes root calculation circuits 110 and 120, a selection circuit 131, and operation circuits 132 to 135.
[0059] The root calculation circuit 110 calculates the root when (C1)γ=0. The root calculation circuit 110 includes an LUT 111 and an arithmetic circuit 112. The LUT 111 and the arithmetic circuit 112 each execute the following calculations. · LUT111: Outputs the root y1, which is the cube root of β. · Arithmetic circuit 112: Multiplies the root y1 by ω (the cube root of 1) and outputs the root y2 which is the result of the multiplication.
[0060] The root calculation circuit 120 calculates the root when the above (C2)γ ≠ 0. The root calculation circuit 120 includes arithmetic circuits 121 to 123, an LUT 124, and arithmetic circuits 125 to 127. The arithmetic circuits 121 to 123, the LUT 124, and the arithmetic circuits 125 to 127 each execute the following calculations. · Arithmetic circuit 121: Calculates γ to the (-3 / 5)th power. Calculation circuit 122: Multiplies γ to the (-3 / 5)th power by γ, and calculates the result of the multiplication, γ / ( 5 √(γ 3 ))= 5 √(γ 2 ) to output. Calculation circuit 123: Multiplies γ to the (-3 / 5)th power by β, and calculates the result of the multiplication, β / ( 5 √(γ 3 )). ·LUT124:β / ( 5 √(γ 3 )) as key information and output the roots z1 and z2. ·Arithmetic circuit 125: 5 √(γ 2 ) to the power of 1 / 2 5 Calculate √(γ). Arithmetic circuit 126: root z1 and 5 It is multiplied by √(γ) and the root y1, which is the result of the multiplication, is output. Arithmetic circuit 127: root z2 and 5 Multiply by √(γ) and output the root y2, which is the result of the multiplication.
[0061] The selection circuit 131 selects and outputs either the roots y1, y2 calculated by the root calculation circuit 110 or the roots y1, y2 calculated by the root calculation circuit 120 depending on whether γ is 0 or not. For example, when γ=0, the selection circuit 131 selects the roots y1, y2 calculated by the root calculation circuit 110, and when γ≠0, the selection circuit 131 selects the roots y1, y2 calculated by the root calculation circuit 120.
[0062] The arithmetic circuits 132 to 135 each execute the following arithmetic operations. · Calculation circuit 132: Adds the syndrome s1 to the root y1, and outputs the result of the addition, that is, the root x1. · Arithmetic circuit 133: Adds the syndrome s1 to the root y2, and outputs the result of the addition, the root x2. · Arithmetic circuit 134: Adds root x2 to root x1, and outputs the addition result x1+x2. Arithmetic circuit 135: Adds syndrome s1 to x1+x2, and outputs the result of the addition, the root x3.
[0063] The calculations by the calculation circuits 132 to 135 can be interpreted as calculations for performing the inverse transformation (inverse variable transformation) of the variable transformation on the roots y1 and y2 of the transformation polynomial to obtain the roots x1, x2, and x3 of the error-locator polynomial.
[0064] Here, a configuration example of a circuit of a comparative example will be described. Fig. 3 is a diagram showing a configuration example of a circuit of a comparative example. In the comparative example, the configuration of the root calculation circuit 120 is different from that of this embodiment. Therefore, Fig. 3 mainly shows a root calculation circuit 60 of the comparative example, which corresponds to the root calculation circuit 120. The root calculation circuit 60 will be described below.
[0065] The root calculation circuit 60 includes arithmetic circuits 61 to 65, an LUT 66, and arithmetic circuits 67 to 71. The arithmetic circuits 61 to 65, the LUT 66, and the arithmetic circuits 67 to 71 each execute the following calculations. · Calculation circuit 61: Calculates the inverse element 1 / γ of γ (inverse element calculation circuit). Calculation circuit 62: 1 / γ, which is the cube of the inverse element 1 / γ 3 Calculate. Calculation circuit 63: β, which is the fifth power of β 5 Calculate. Calculation circuit 64:1 / γ 3 and β 5 Multiply by and β 5 / γ 3 Output. ·Arithmetic circuit 65:β 5 / γ 3 Square root of √(β 5 / γ 3 ) to calculate ·LUT66:√(β 5 / γ 3 ) as key information and output the roots z1 and z2. · Calculation circuit 67: Calculates the inverse element 1 / β of β (inverse element calculation circuit). Arithmetic circuit 68: Multiplies the inverse element 1 / β by γ, and outputs the result of the multiplication, γ / β. Calculation circuit 69: Calculates the square root of γ / β, √(γ / β). · Arithmetic circuit 70: Multiplies the root z1 by √(γ / β) and outputs the root y1 which is the result of the multiplication. · Arithmetic circuit 71: Multiplies the root z2 by √(γ / β) and outputs the root y2 which is the result of the multiplication.
[0066] Thus, in the comparative example, two arithmetic circuits 61 and 67 are required as the inverse element calculation circuit. In contrast, in this embodiment, one arithmetic circuit 121 that calculates the (-3 / 5)th power is sufficient as a calculation circuit of approximately the same scale as the inverse element calculation circuit. The inverse element calculation circuit may have a larger circuit scale compared to other arithmetic circuits. Even in such a case, according to this embodiment, the number of circuits with a large circuit scale can be reduced, making it possible to more efficiently reduce the circuit scale of the decryption unit 18.
[0067] When the decoding unit 18 is realized by a CPU and firmware, the firmware can be configured to perform one (-3 / 5)th power calculation as a calculation equivalent to an inverse element calculation for the root calculation of the quadratic and cubic error locator polynomial. In other words, the firmware for performing error correction (decoding) can be configured more simply.
[0068] In addition, in this embodiment, by using only γ, which is one of β and γ, for variable conversion, the calculation required for the other of β and γ is only one multiplication by the arithmetic circuit 123. Therefore, for example, the configuration can be simpler than the comparative example, which requires the fifth power (arithmetic circuit 63) and multiplication (arithmetic circuit 64) for β.
[0069] In this embodiment, the existence of the fifth root is guaranteed in GF(2 m ) (m is a value that is not divisible by 4), that is, it can be applied when m is not divisible by 4.
[0070] Next, a description will be given of the flow of the decryption process performed by the memory system 1. Fig. 4 is a flowchart showing an example of the decryption process in this embodiment.
[0071] The control unit 11 reads out the error correction code from the non-volatile memory 20 to obtain the received word (step S101). Also, the control unit 11 instructs the decoding unit 18 to start decoding.
[0072] The syndrome calculation circuit 201 of the decoding unit 18 calculates a syndrome from the received word (step S102).
[0073] Next, the decoding unit 18 estimates the number of errors (step S103). The decoding unit 18 determines whether the number of errors is 3 or less (step S104). If the number of errors is greater than 3 (step S104: No), the decoding unit 18 notifies a decoding failure (step S110) and ends the decoding process.
[0074] If the number of errors is 3 or less (step S104: Yes), the decoding unit 18 further judges whether the number of errors is 1 or less (step S105). If the number of errors is 1 or less (step S105: Yes), the decoding unit 18 executes root calculation of the 0th and 1st degree error locator polynomial (step S106). If the number of errors is not 1 or less (step S105: No), the decoding unit 18 executes root calculation of the 2nd and 3rd degree error locator polynomial (step S107).
[0075] When the root calculation of the quadratic and cubic error locator polynomial has been executed, the decoding unit 18 judges whether or not the root has been obtained by the root calculation of the quadratic and cubic error locator polynomial (step S108).
[0076] For the second and third degree error locator polynomials, β / ( 5 √(γ 3 There may be cases where no root exists for the value of s1). In such a case, for example, the LUT is configured so that information indicating that no root exists is associated with the key information of the LUT corresponding to this value. When information indicating that no root exists is obtained from the LUT, the decoding unit 18 determines that no root has been obtained. Note that for a 0th and 1st degree error locator polynomial, the syndrome s1 is always obtained as the root.
[0077] If the root is not obtained (step S108: No), the decoding unit 18 notifies the decoding failure (step S110) and ends the decoding process.
[0078] If the root is obtained (step S108: Yes), and after the root of the 0th and 1st degree error locator polynomial is calculated, the decoding unit 18 corrects the error at the error location corresponding to the root (step S109), and ends the decoding process.
[0079] Note that the decoding unit 18 may determine whether or not all the syndrome values are 0 after calculating the syndromes in step S102, and may end the decoding process if all the syndromes are 0. This is because if all the syndromes are 0, it can be determined that there is no error in the received word.
[0080] So far, an example has been described in which a BCH code that corrects 3-bit errors or less is used, but a similar procedure can also be applied to a configuration that uses a BCH code that corrects n-bit errors or less (n is an integer equal to or greater than 3). For example, when a BCH code that corrects 5-bit errors or less is used, the above procedure can be applied to decoding when the number of errors is between 0 and 3. Any procedure can be used for decoding when the number of errors is 4 or 5.
[0081] Second embodiment In the second embodiment, a variable transformation is performed using only β of β and γ as a calculated value. The overall configuration of the memory system of the second embodiment is the same as that of FIG. 1, but the configuration of the decoding unit is different from that of the first embodiment. The following describes the details of the function of the decoding unit 18-2 of the second embodiment.
[0082] Fig. 5 is a block diagram showing a configuration example of a decoding unit 18-2 according to the second embodiment. Fig. 5 shows an example in which the decoding unit 18-2 is realized by a hardware circuit. As shown in Fig. 5, the decoding unit 18-2 includes a syndrome calculation circuit 201, arithmetic circuits 202 to 205, a root calculation circuit 100-2, a root calculation circuit 210, selection circuits 220 and 230, an error position calculation circuit 240, and a bit flip circuit 250.
[0083] In the second embodiment, the root calculation circuit 100-2 does not include the root calculation circuit 110 and the selection circuit 131, and the function of the root calculation circuit 120-2 is different from that of the first embodiment. Since the other configurations are similar to those of the root calculation circuit 100 of the first embodiment, the same reference numerals are used and the description is omitted.
[0084] In the second embodiment, the case distinction between (C1) and (C2) in the first embodiment is unnecessary. As a result, a circuit equivalent to the root calculation circuit 110 and a circuit equivalent to the selection circuit 131 for selecting the output of the root calculation circuit are unnecessary.
[0085] The reason why the distinction is unnecessary will be explained below. The condition (C1) in the first embodiment can be interpreted as a condition for separating the calculation when γ=0 (the root calculation circuit 110) from the calculation when γ≠0 (the root calculation circuit 120) in order to prevent division by 0.
[0086] On the other hand, as described above, β used for variable conversion in the second embodiment is β=0 when the number of errors is 0 or 1. That is, β≠0 when the number of errors is 2 or 3. Therefore, the root calculation circuit 100-2 that calculates the root of the quadratic or cubic error locator polynomial used when the number of errors is 2 or 3 can be configured on the premise that β≠0 is satisfied, in other words, division by 0 (=β) does not occur. That is, in the second embodiment, case distinction such as (C1) and (C2) in the first embodiment is not necessary.
[0087] Hereinafter, the root calculation of the quadratic and cubic error locator polynomial σ(x) in the second embodiment will be described. σ(x) is expressed by equation (10) as in the first embodiment. In the second embodiment, if variables y and z are transformed by the variable transformation expressed by the following equation (19), the roots z1, z2, and z3 can be found from equation (20) by using an LUT that returns the root of the polynomial expressed by the following equation (22) using the value expressed by the following equation (21) as key information.
number
number
number
number
[0088] Also, for each of the obtained roots z1, z2, and z3, 3 Multiplying by √(β) gives the roots y1, y2, and y3 of σ(x). Furthermore, adding s1 to each of the obtained roots y1, y2, and y3 gives the roots x1, x2, and x3 of σ(x).
[0089] The root calculation circuit 100-2 is configured to execute the root calculation of the quadratic and cubic error locator polynomials as described above. The root calculation circuit 100-2 in Fig. 5 will be described in detail. The root calculation circuit 100-2 includes a root calculation circuit 120-2 and arithmetic circuits 132 to 135. The configuration of the arithmetic circuits 132 to 135 is the same as that of the first embodiment (Fig. 2), so the same reference numerals are used and the description will be omitted.
[0090] The root calculation circuit 120-2 includes arithmetic circuits 121-2 to 123-2, an LUT 124-2, and arithmetic circuits 125-2 to 127-2. The arithmetic circuits 121-2 to 123-2, the LUT 124-2, and the arithmetic circuits 125-2 to 127-2 each execute the following calculations. · Arithmetic circuit 121-2: Calculates the power of β (-5 / 3). · Arithmetic circuit 122-2: Calculates the square of β. Calculation circuit 123-2: Multiplies β to the (-5 / 3)th power by γ, and calculates the result of the multiplication, γ / ( 3 √(β 5 )). ·LUT124-2:γ / ( 3 √(β 5 )) as key information and output the roots z1 and z2. Calculation circuit 125-2: β squared (β 2) and the (-5 / 3) power of β, and the result of the multiplication, β 2 / ( 3 √(β 5 ))= 3 Output √(β). Arithmetic circuit 126-2: root z1 and 3 It is multiplied by √(β) and the root y1, which is the result of the multiplication, is output. · Arithmetic circuit 127-2: Root z2 and 3 Multiply by √(β) and output the root y2, which is the result of the multiplication.
[0091] In this embodiment, a single arithmetic circuit 121-2 that calculates the (-5 / 3)th power is sufficient as a calculation circuit of the same scale as the inverse calculation circuit. In addition, in this embodiment, by using only β, which is one of β and γ, for variable conversion, the calculation required for γ, which is the other of β and γ, is only one multiplication by the arithmetic circuit 123-2. Therefore, the calculation of the root of the error locator polynomial when it is 2 or 3 can be realized with a simpler configuration.
[0092] In this embodiment, the existence of a cube root is guaranteed in GF(2 m ) (m is a value that is not divisible by 2), that is, when m is not divisible by 2 (when m is an odd number).
[0093] The flow of the decryption process in the second embodiment is similar to that in the flowchart of FIG. 4 showing an example of the first embodiment, and therefore a description thereof will be omitted.
[0094] As described above, according to the first and second embodiments, error correction (decoding) can be performed with a simpler configuration.
[0095] Although some embodiments of the present invention have been described, these embodiments are presented as examples and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. These embodiments and their modifications are included in the scope and spirit of the invention, and are included in the scope of the invention and its equivalents described in the claims. [Explanation of symbols]
[0096] 1. Memory System 10 Memory Controller 11 Control section 12 Data Buffer 13 Memory I / F 14 Encoding / Decoding Section 15 Host I / F 16 Internal Bus 17 Encoding section 18, 18-2 Decoding section 20 Non-volatile memory 30 Host 100, 100-2, 210 root calculation circuit 201 Syndrome Calculation Circuit 220, 230 Selection circuit 240 Error location calculation circuit 250 Bit Flip Circuit
Claims
1. a non-volatile memory that stores data encoded with an error correcting code that corrects errors of n bits or less (n is an integer of 3 or more); reading a received word from the non-volatile memory; Calculating a syndrome using the read received word; estimating the number of bits in error using the syndrome; if the number of bits is 2 or 3, performing a variable transformation on a variable of an error locator polynomial corresponding to the number of bits using a calculated value that is one of a first value and a second value calculated based on the syndrome, and performing a calculation of roots of a transformation polynomial obtained by transforming the error locator polynomial according to the variable transformation using the first value and the second value; performing an inverse variable transformation using the calculated value on the roots of the transformation polynomial to obtain roots of the error locator polynomial; correcting errors at error locations corresponding to roots of the error location polynomial; A memory controller; A memory system comprising:
2. The memory controller includes: if the number of bits is 2 or 3, calculating key information using the first value and the second value, and finding the root corresponding to the calculated key information using correspondence information that associates a plurality of values that the key information can take with the roots of the conversion polynomial; 2. The memory system of claim 1.
3. The memory controller includes: Three syndromes s corresponding to the first, third, and fifth powers of α, a primitive element of the Galois field 1 , s 3 , s 5 Calculate β = s 1 3 +s 3 is calculated as the first value, γ = s 1 5 +s 5is calculated as the second value, the second value, which is γ, being the calculated value; When a value expressed by the formula (1) is used as the key information, the variable transformation expressed by the formula (2) and the calculation of the root of the transformation polynomial expressed by the formula (3) are performed. [0010] [0025] [0030] 3. The memory system of claim 2.
4. The memory controller includes: Three syndromes s corresponding to the first, third, and fifth powers of α, a primitive element of the Galois field 1 , s 3 , s 5 Calculate β = s 1 3 +s 3 is calculated as the first value, γ = s 1 5 +s 5 is calculated as the second value, the first value, which is β, being the calculated value; When the value expressed by the formula (4) is used as the key information, the variable transformation expressed by the formula (5) and the calculation of the root of the transformation polynomial expressed by the formula (6) are performed. [0045] [0050] [006] 3. The memory system of claim 2.
5. The memory controller includes: Three syndromes s corresponding to the first, third, and fifth powers of α, a primitive element of the Galois field 1 , s 3 , s 5 Calculate β = s 1 3 +s 3is calculated as the first value, γ = s 1 5 +s 5 is calculated as the second value, the second value, which is γ, being the calculated value; When the key information is β, the variable transformation expressed by the formula (7) and the calculation of the root of the transformation polynomial expressed by the formula (8) are performed. [0070] [0080] 3. The memory system of claim 2.
6. A method for controlling a non-volatile memory, comprising: storing data encoded with an error correcting code capable of correcting errors of n bits or less (n is an integer of 3 or more) in the non-volatile memory; reading a received word from the non-volatile memory; Calculating a syndrome using the read received word; estimating the number of bits in error using the syndrome; if the number of bits is 2 or 3, performing a variable transformation on a variable of an error locator polynomial corresponding to the number of bits using a calculated value that is one of a first value and a second value calculated based on the syndrome, and performing a calculation of roots of a transformation polynomial obtained by transforming the error locator polynomial according to the variable transformation using the first value and the second value; performing an inverse variable transformation using the calculated value on the roots of the transformation polynomial to obtain roots of the error locator polynomial; correcting errors at error locations corresponding to roots of the error location polynomial; The control method includes:
Citation Information
Patent Citations
Error correction method, error correction device and recording medium in which error correction program is recorded
WO2001084719A1
Error number estimate method and bch code correction method
JP1995231261A
Efficient error correction of multi-bit errors
US9362953B2
