Data processing device and data processing method

By using two different ECC generation matrices and a method of replacing data bits, the problems of insufficient even-numbered error detection and odd-numbered error misidentification in the existing technology are solved, and the accuracy and performance of data error detection are improved.

CN109947674BActive Publication Date: 2024-08-30RENESAS ELECTRONICS CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN201811557353.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-12-19
Publication Date
2024-08-30
Estimated Expiration
2038-12-19

AI Technical Summary

Technical Problem

Existing ECC technology cannot effectively detect 4 or more even-numbered bit errors when detecting data errors, and may misidentify 3 or more odd-numbered bit errors as single-bit errors, resulting in inaccurate error correction.

Method used

By using two different ECC generation matrices to generate two ECC encoder units, which are used to generate ECC for single error correction and double error detection, and generating the second ECC by replacing data bits, the error detection performance is improved.

Benefits of technology

It improves the accuracy and performance of data error detection, reduces the occurrence of miscorrections and missed errors, and enhances the detection capability of multi-bit errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN109947674B_ABST
    Figure CN109947674B_ABST
Patent Text Reader

Abstract

The present application relates to a data processing device and a data processing method. The present invention is used to improve the detection performance in data error detection using ECC. The data processing device 1 includes an encoder device 2, which includes: an encoder unit for generating ECC by performing operations according to a first ECC generation matrix; and an encoder unit 5 for generating ECC by performing operations according to a second ECC generation matrix, the second ECC generation matrix being obtained by replacing the columns of the first ECC generation matrix. The encoder unit 4 generates a first ECC for the first data. The encoder unit 5 generates a second ECC for the second data obtained by replacing the bits of the first data.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] The disclosure of Japanese Patent Application No. 2017-243558 filed on December 20, 2017 including specification, drawings and abstract is incorporated herein by reference in its entirety. Technical Field

[0003] The present invention relates to a data processing device and a data processing method, and in particular to a data processing device and a data processing method for detecting data errors. Background Art

[0004] As a characteristic of ECC (error correction code) having single-bit error correction and double-bit error detection functions (so-called SEC-DED (single error correction and double error detection)), it is well known that 4 or more even-numbered bit errors cannot be detected, and there are cases where 3 or more odd-numbered bit errors are mistakenly identified as single-numbered errors, resulting in erroneous correction of normal bits (non-patent document 1).

[0005] On the other hand, Patent Document 1 discloses a technology for realizing multi-bit (3 or more bits) error detection at a relatively high rate in an error detection circuit using ECC capable of single error correction and double error detection. The error detection circuit uses ECC and a count of occurrences of "1" in each data bit, and can correctly detect an error even when a data error cannot be successfully detected by checking using only ECC.

[0006] (Patent Document 1) Japanese Unexamined Patent Application Publication No. 2005-4288

[0007] (Non-patent document 1) MY Hsiao; "A Class of Optimal Minimum Odd-weight-column SEC-DED Codes", IBM Journal of Research and Development, Vol. 14, No. 4, published by IBM, July 1970. Summary of the invention

[0008] However, according to the technology disclosed in Patent Document 1, it is necessary to provide a counter circuit for counting the number of "1" included in the data, and the counting process requires a plurality of clock cycles. Therefore, it takes extra time to write and read the memory, or it is necessary to increase the clock frequency. Therefore, it is desirable to develop a new method for improving detection performance in data error detection using ECC.

[0009] Other problems and novel features of the present invention will become apparent from the description of this specification and the accompanying drawings.

[0010] According to one embodiment, a data processing device includes: an encoder device provided with a first encoder unit generating an ECC by performing an operation according to a first ECC generation matrix and a second encoder unit generating an ECC by performing an operation according to a second ECC generation matrix, the second ECC generation matrix being obtained by permuting columns of the first ECC generation matrix. The first encoder unit generates a first ECC for first data. The second encoder unit generates a second ECC for second data obtained by permuting bits of the first data.

[0011] According to one embodiment, ECC may be used to improve detection performance in error detection of data. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 is a block diagram showing a configuration example of a data processing device 1 according to an outline of the embodiment;

[0013] Figure 2 is a block diagram showing an encoder device 90 according to a comparative example;

[0014] Figure 3 is a diagram showing an ECC generation matrix for the ECC encoder circuit 21;

[0015] Figure 4 Shown is the representation of Figure 3 The equations for the operations performed by the ECC generator matrix shown in;

[0016] Figure 5 is a block diagram showing an example of a specific circuit configuration of the ECC encoder circuit 21;

[0017] Figure 6 is a block diagram showing a decoder device 91 according to a comparative example;

[0018] Figure 7 is a diagram showing an ECC check matrix used for the ECC decoder circuit 31;

[0019] Figure 8 Shown is the representation represented by Figure 7 The equations for the operations performed by the ECC check matrix shown in;

[0020] Fig. 9 is a block diagram showing an example of a specific circuit configuration of the ECC decoder circuit 31;

[0021] Fig.10 is a table summarizing false detection misses occurring in the false detection algorithm according to the comparative example;

[0022] Fig.11 is a table summarizing the number of times a miscorrection occurs in an error detection algorithm according to a comparative example;

[0023] Fig.12 is a block diagram showing an example of a data processing device according to an embodiment;

[0024] Fig.13 is a block diagram showing an encoder device 20;

[0025] Fig.14 is a diagram showing an ECC generation matrix for the ECC encoder circuit 22;

[0026] Fig.15 is a block diagram showing an example of a specific circuit configuration of the ECC encoder circuit 22;

[0027] Fig.16 is a block diagram showing a decoder device 30;

[0028] Fig.17 is a diagram indicating an ECC check matrix for an ECC decoder circuit 31 of a decoder device 30;

[0029] Fig.18 is a diagram showing an ECC check matrix for an ECC decoder circuit 32 of a decoder device 30;

[0030] Fig.19 is a block diagram showing an example of a specific circuit configuration of the ECC decoder circuit 32 .

[0031] Fig. 20A is a diagram showing an example of an ECC generation matrix for generating 8-bit ECC from 64-bit input data;

[0032] Fig. 20B is a diagram showing an example of an ECC generation matrix for generating 8-bit ECC from 64-bit input data;

[0033] Fig.21 is a block diagram showing the configuration of a decoder device 30A;

[0034] Fig. 22 is a table summarizing the error detection misses that occur in the error detection algorithm according to Embodiment 2;

[0035] Fig.23 is a table summarizing the number of times miscorrection occurs in the error detection algorithm according to Embodiment 2;

[0036] Fig.24 is a block diagram showing an encoder device 20A;

[0037] Fig.25is a diagram showing an example of an ECC generation matrix used for the ECC encoder circuit 23;

[0038] Fig.26 is a block diagram showing a decoder device 30B;

[0039] Fig. 27 is a diagram showing an ECC check matrix for an ECC decoder circuit 31 of a decoder device 30B;

[0040] Fig.28 is a diagram showing an ECC check matrix for the ECC decoder circuit 34 of the decoder device 30B;

[0041] Fig.29 is a block diagram showing a decoder device 30C;

[0042] Fig.30 is a table summarizing error detection misses occurring in the error detection algorithm according to the modified example of Embodiment 3;

[0043] Fig.31 is a table summarizing the number of times a miscorrection occurs in the error detection algorithm according to the modified example of Embodiment 3;

[0044] Fig.32 is a block diagram showing an encoder device 20B;

[0045] Fig.33 Examples of an ECC generation full matrix, an ECC generation sub-matrix, and a check bit generation matrix are shown;

[0046] Fig.34 is a block diagram showing an example of a specific circuit structure of the check bit generating circuit 24;

[0047] Fig.35 is a block diagram showing the configuration of a decoder device 30D;

[0048] Fig.36 Examples of an ECC check full matrix, an ECC check sub-matrix, and a check bit check matrix are shown;

[0049] Fig.37 is a block diagram showing an example of a specific circuit configuration of a symptom generating circuit 303 and a symptom decoder circuit 312 of a decoder device 30D;

[0050] Fig.38 is a table summarizing the error detection misses that occurred in the error detection algorithm according to Embodiment 4; and

[0051] Fig.39 is a table summarizing the number of times miscorrection occurs in the error detection algorithm according to Embodiment 4. DETAILED DESCRIPTION

[0052] In the following description and drawings, for the sake of clarity of explanation, abbreviations and simplifications are appropriately performed. In each drawing, the same symbol or reference numeral is attached to the same element, and its repeated description is appropriately omitted.

[0053] <Overview of Embodiment>

[0054] First, an outline of the embodiment is explained before describing the embodiment in detail. Figure 1 1 is a block diagram showing a configuration example of a data processing device 1 according to an overview of an embodiment. The data processing device 1 includes an encoder device 2 and a decoder device 3.

[0055] The encoder device 2 includes an encoder unit 4 and an encoder unit 5. First data is input into the encoder device 2. Then, the first data is input into the encoder unit 4, and second data is input into the encoder unit 5. Here, the first data is data to be stored in the memory 6. The second data is data obtained by replacing bits of the first data. For example, the second data may be data obtained by rotating each bit of the first data by a specified number of steps in a predetermined direction, or may be data obtained by replacing a plurality of predetermined bits of the first data with each other.

[0056] The encoder unit 4 generates an ECC (i.e., SEC-DED code) capable of single error correction and double error detection by performing operations according to the first ECC generation matrix. The encoder unit 5 generates an ECC (i.e., SEC-DED code) capable of single error correction and double error detection by performing operations according to the second ECC generation matrix obtained by permuting the columns of the first ECC generation matrix. The above-mentioned permutation in the second data corresponds to the above-mentioned permutation in the second ECC generation matrix. That is, the bit position of the permutation source in the permutation of the bits for deriving the second data from the first data corresponds to the column number of the permutation source in the permutation of the columns for deriving the second ECC generation matrix from the first ECC generation matrix. The bit position of the permutation destination in the permutation of the bits for deriving the second data corresponds to the column number of the permutation destination in the permutation of the columns for deriving the second ECC generation matrix.

[0057] The encoder unit 4 generates a first ECC for the first data. The encoder unit 5 generates a second ECC for the second data. Then, the encoder device 2 stores the first data as a storage object, the first ECC generated from the first data, and the second ECC generated from the second data in the memory 6.

[0058] The decoder device 3 generates a notification signal indicating an error occurrence state of the first data based on the first data read from the memory 6 , the first ECC, and the second ECC.

[0059] As described above, two different ECCs are generated in the data processing device 1. The occurrence pattern of the error that causes the miss depends on the ECC generation matrix. When described in detail, even for the occurrence pattern of the error that causes the miss in the detection process using the first ECC, the error can be found in the detection process using the second ECC different from the first ECC. Noting this, in the present embodiment, the first ECC and the second ECC generated from different ECC generation matrices are used. Therefore, according to the data processing device 1, the detection performance can be improved compared with the data error detection by using only the first ECC.

[0060] <Comparison example>

[0061] Next, comparative examples are explained to facilitate understanding of the details of the embodiment. Figure 2 is a block diagram showing an encoder device 90 according to a comparative example. As an example, the encoder device 90 generates a 5-bit ECC (E0-E4) from 8-bit input data (D0-D7). Then, the encoder device 90 outputs the input data (D0-D7) and the generated ECC as write data. The encoder device 90 includes an ECC encoder circuit 21, and generates ECC by the ECC encoder circuit 21.

[0062] For example, the ECC encoder circuit 21 is configured according to Figure 3 The ECC generation matrix shown performs operations to generate ECC capable of single error correction and double error detection. Figure 3 The ECC generation matrix shown in is a matrix for generating 5-bit ECC (E0-E4) from 8-bit input data (D0-D7) to be written in the memory 6 as write data. Figure 3 Each column of the ECC generation matrix shown in has a different bit pattern from each other, and each column includes an odd number of 1s. Therefore, Figure 3 The ECC generation matrix shown in is a matrix for generating an ECC capable of single error correction and double error detection. Each column of the ECC generation matrix corresponds to each bit of input data, and each row corresponds to each bit of the ECC to be generated.

[0063] Specifically, the ECC encoder circuit 21 performs Figure 4 The operations shown in . Figure 4 Shown is the representation represented by Figure 3, and the like. The equation for the operation performed by the ECC generation matrix shown in . That is, the ECC encoder circuit 21 generates ECC by multiplying the input data by the ECC generation matrix. When expressed in another way, the ECC encoder circuit 21 generates ECC by performing an XOR (exclusive OR logical sum) operation on the bit values ​​of the input data with respect to the combination of the bit positions specified by the ECC generation matrix. For example, the combination of the bit positions specified by the first row of the ECC generation matrix is ​​(D0, D1, D2, D3, D4), and the ECC encoder circuit 21 calculates E0 by performing an XOR operation on these values.

[0064] Figure 5 21 is a block diagram showing an example of a specific circuit configuration of the ECC encoder circuit 21. As described above, the ECC encoder circuit 21 Figure 3 The ECC generation matrix shown in FIG. 1 performs an XOR operation to generate 5-bit ECC (E0-E4) from 8-bit input data (D0-D7). The ECC encoder circuit 21 includes an ECC generation circuit 200, and the ECC is generated by the ECC generation circuit 200. Figure 5 As shown, the ECC generation circuit 200 is configured with five XOR circuits 200a-200e. The XOR circuits 200a-200d are 5-input XOR circuits, and the XOR circuit 200e is a 4-input XOR circuit. The XOR circuits 200a-200e correspond to Figure 4 The arithmetic expression shown in , and each circuit determines the value of one bit in the 5-bit ECC (E0-E4).

[0065] E0 is obtained as the output of the XOR circuit 200a. Specifically, the XOR circuit 200a calculates the XOR of D0, D1, D2, D3 and D4, and outputs the calculation result as E0. In the same manner, E1 is obtained as the output of the XOR circuit 200b. E2 is obtained as the output of the XOR circuit 200c. E3 is obtained as the output of the XOR circuit 200d. E4 is obtained as the output of the XOR circuit 200e. The data (D0-D7) and the ECC (E0-E4) output from the ECC encoder circuit 21 are stored in the memory 6.

[0066] Figure 6is a block diagram showing a decoder device 91 according to a comparative example. The data (D0-D7) read from the memory 6 and the ECC (E0-E4) similarly read from the memory 6 are input to the ECC decoder circuit 31 of the decoder device 91. Based on the read data (D0-D7) and the ECC (E0-E4) that have been input, the ECC decoder circuit 31 determines the presence or absence of an error of the read data (D0-D7) and the ECC (E0), and outputs an error notification signal. When it is detected that a unit error is included in the read data, the ECC decoder circuit 31 of the decoder device 91 outputs data in which the unit error has been corrected as output data (D'0-D'7). In other cases, the ECC decoder circuit 31 outputs the input read data as output data (D'0-D'7).

[0067] The ECC decoder circuit 31 outputs an error notification signal according to the presence or absence of an error. Specifically, the ECC decoder circuit 31 outputs a "single bit error notification signal" indicating whether a single bit error is included in a bit string consisting of read data and ECC, and a "double bit error notification signal" indicating whether two or more bit errors are included in the bit string. When the single bit error notification signal is 1 and the double bit error notification signal is 0, the ECC decoder circuit 31 notifies that the bit string has a single bit error, and error correction data for the read data is output as output data (D'0-D'7). When the single bit error notification signal is 0 and the double bit error notification signal is 1, the ECC decoder circuit 31 notifies that data that may have an error is output as output data (D'0-D'7). When the single bit error notification signal is 0 and the double bit error notification signal is also 0, the ECC decoder circuit 31 notifies that read data without errors is output as output data (D'0-D'7).

[0068] For example, the ECC decoder circuit 31 performs Figure 7 The illustrated ECC check matrix performs an operation to generate a symptom code, and generates an error notification signal based on the generated symptom code and corrects the error. Figure 7 The ECC check matrix shown in is a matrix for generating a 5-bit symptom code (S0-S4) from 8-bit read data (D0-D7) and 5-bit ECC (E0-E4) read from the memory 6. The ECC check matrix is ​​a matrix that combines a cell matrix with an ECC generation matrix. Each column of the ECC check matrix corresponds to each bit of the input data (read data and ECC), and each row corresponds to each bit of the symptom code to be generated.

[0069] Specifically, the ECC decoder circuit 31 performs Figure 8 The operations shown in . Figure 8 Shown is the representation represented by Figure 7The equation for the operation performed by the ECC check matrix in . That is, the ECC decoder circuit 31 generates the symptom code by multiplying the input data (read data and ECC) by the ECC check matrix. When expressed in another way, the ECC decoder circuit 31 generates the symptom code by performing an XOR operation on the bit values ​​of the input data with respect to the combination of the bit positions specified by the ECC check matrix. For example, the combination of the bit positions specified by the first row of the ECC check matrix is ​​(D0, D1, D2, D3, D4, E0), and the ECC decoder circuit 31 calculates S0 by performing an XOR operation on these values.

[0070] Fig. 9 3 is a block diagram showing an example of a specific circuit configuration of the ECC decoder circuit 31. The ECC decoder circuit 31 includes a syndrome generating circuit 300, a syndrome decoder circuit 310, and an error correcting circuit 320.

[0071] The syndrome generation circuit 300 generates and outputs a 5-bit syndrome code (S0-S4) from the 8-bit read data (D0-D7) and the 5-bit ECC (E0-E4). Fig. 9 As shown, the symptom generation circuit 300 is configured with five XOR circuits 300a-300e. The XOR circuits 300a-300d are 6-input XOR circuits, and the XOR circuit 300e is a 5-input XOR circuit. The XOR circuits 300a-300e correspond to Figure 8 The arithmetic expressions shown in , and each determines the value of one bit in the 5-bit symptom code (S0-S4).

[0072] S0 is obtained as the output of the XOR circuit 300a. Specifically, the XOR circuit 300a calculates the XOR of D0, D1, D2, D3, D4 and E0, and outputs the calculation result as S0. In the same manner, S1 is obtained as the output of the XOR circuit 300b. S2 is obtained as the output of the XOR circuit 300c. S3 is obtained as the output of the XOR circuit 300d. S4 is obtained as the output of the XOR circuit 300e. The symptom code (S0-S4) output from the symptom generation circuit 300 is input to the symptom decoder circuit 310.

[0073] The symptom decoder circuit 310 decodes the 5-bit symptom code (S0-S4) and generates and outputs a 13-bit "error bit position flag" (C0-C7, CE0-CE4) and a 1-bit "no error flag" (Cxx). Fig. 9 As shown, the syndrome decoder circuit 310 is configured with 13 AND (logical product) circuits 310a-310m and a NOR (non-inverter) circuit 310n attached with INVs (inverters).

[0074] The INV-attached AND circuits 310a-310m are 5-input INV-attached AND circuits. Figure 7 The 5-bit bit pattern that appears in each column of the ECC check matrix shown (specifically, Figure 7 13 columns D0-D7 and E0-E4 shown in the figure) and the 5-bit symptom code (S0-S4) (corresponding to Figure 7 When the bit pattern of the AND circuits 310a-310m attached to INV matches, the AND circuits 310a-310m attached to INV respectively output 1. This operation of the symptom decoder circuit 310 on the AND circuits 310a-310h attached to INV for outputting the error bit position flag (C0-C7) is equivalent to checking the error bit position flag (C0-C7) present in the error bit position flag. Figure 3 Each column of the ECC generation matrix shown (specifically, Figure 3 The 5-bit bit pattern in the eight columns D0-D7) and the bit pattern of the 5-bit symptom code (S0-S4) (corresponding to Figure 3 When the bit pattern of the symptom code matches the bit pattern of any column of the ECC check matrix (specifically, Figure 7 When the 13 columns of D0-D7 and E0-E4 shown in the figure match, it is determined that a unit error occurs in the bit position corresponding to the column (any one of the bits of D0-D7 and E0-E4). Each AND circuit 310a-310h attached with INV outputs an error bit position flag (C0-C7). Each AND circuit 310i-310m attached with INV outputs an error bit position flag (CE0-CE4). The error bit position flag (C0-C7) is a flag indicating the position of the unit error that occurs in the read data (D0-D7), and the error bit position flag (CE0-CE4) is a flag indicating the position of the unit error that occurs in the ECC (E0-E4).

[0075] The error bit position flag has the following two output modes.

[0076] The first output pattern indicates that all C0-C7 and CE0-CE4 are 0. This is the output pattern in the case where no error is detected or two or more bit errors are detected.

[0077] The second output pattern indicates that any one of C0-C7 and CE0-CE4 is 1. This is an output pattern in the case where a single-bit error is detected.

[0078] When reference Figure 7When checking the first column of the ECC check matrix shown in , the bit pattern is (11100). Correspondingly, in the symptom decoder circuit 310, an AND circuit 310a attached to INV is provided to generate an error bit position flag C0. Specifically, in the input port of the AND circuit 310a attached to INV, S0, S1 and S2 of the symptom code are coupled to three input ports not attached to INV, and S3 and S4 of the symptom code are coupled to two input ports attached to INV. Similar coupling is performed on the AND circuits 310b-310m attached to INV.

[0079] The NOR circuit 310n is a 5-input NOR circuit. When the values ​​of all bits of the 5-bit symptom code (S0-S4) are 0, the NOR circuit 310n outputs 1. When the values ​​of all bits of the symptom code (S0-S4) are 0, it is determined that there is no bit error. The NOR circuit 310n outputs a no error flag (Cxx). The no error flag has the following two output modes.

[0080] The first output mode is an output mode of Cxx = 1. This is an output mode in the case where no error is detected, as described above.

[0081] The second output mode is an output mode of Cxx = 0. This is an output mode in the case where one or more bit errors are detected.

[0082] In this way, in the SEC-DED code, a single-bit error can be detected by detecting that the bit pattern of the symptom code matches any bit pattern of the ECC generation matrix. It is also possible to detect two or more bit errors by detecting that the bit pattern of the symptom code does not match any bit pattern of the ECC generation matrix and is not completely zero.

[0083] The error correction circuit 320 includes: a correction unit 320A configured as a circuit for correcting an error when a single-bit error of read data is detected; and a notification processing unit 320B configured as a circuit for generating an error notification signal.

[0084] The correction unit 320A performs error correction based on the 8-bit read data (D0-D7) and the 8-bit error bit position flag (C0-C7), and outputs 8-bit output data (D'0-D'7). When error correction is performed, the output data (D'0-D'7) is corrected data, and when error correction is not performed, the output data (D'0-D'7) is the same as the read data (D0-D7). Fig. 9As shown, the correction unit 320A is configured with eight XOR circuits 320a-320h. The XOR circuits 320a-320h are 2-input XOR circuits. Each XOR circuit 320a-320h corrects a single error by performing an XOR operation of an error bit position flag and a bit of the read data corresponding to the error bit position flag. That is, the correction unit 320A performs single error correction by inverting the value of the corresponding bit position (any one of the bits D0-D7) of the read data (D0-D7) when any one of the 8-bit error bit position flags (C0-C7) is 1.

[0085] The notification processing unit 320B outputs a "single bit error notification signal" and a "double bit error notification signal" as error notification signals based on the 13-bit error bit position flags (C0-C7 and CE0-CE4) and the 1-bit no error flag (Cxx). Fig. 9 As shown, the notification processing unit 320B is configured with an OR (logical addition) circuit 320i and a NOR circuit 320j. The OR circuit 320i is a 13-input OR circuit and receives a 13-bit bit position flag (C0-C7 and CE0-CE4). The NOR circuit 320j is a 2-input NOR circuit and receives the output of the OR circuit 320i and a no error flag (Cxx).

[0086] When any one of the input 13-bit bit position flags (C0-C7 and CE0-CE4) is 1, the OR circuit 320i outputs 1 as a single-bit error notification signal. When the output of the OR circuit 320i and the no-error flag (Cxx) are both 0, the NOR circuit 320j outputs 1 as a double-bit error notification signal. There are the following three output modes of the error notification signal notifying the processing unit 320B.

[0087] The first output mode is an output mode in which the single-bit error notification signal and the double-bit error notification signal are both 0. The error notification signal of this output mode indicates the read data (D0-D7), and thus the output data (D'0-D'7) does not include an error.

[0088] The second output mode is an output mode in which the single-bit error notification signal is 1 and the double-bit error notification signal is 0. The error notification signal of this output mode indicates that the bit string composed of read data and ECC includes a single-bit error and the output data (D'0-D'7) does not include an error.

[0089] The third output mode is an output mode in which the single-bit error notification signal is 0 and the double-bit error notification signal is 1. The error notification signal of this output mode indicates that the bit string composed of read data and ECC includes two or more bit errors and the output data (D'0-D'7) may include the error.

[0090] Fig.10 is a table summarizing the false detection misses that occur in the false detection algorithm according to the comparative example. Specifically, Fig.10 It is a verification result table showing the number of times a bit error cannot be detected and a bit error is missed (a false detection indicating that no bit error occurs) occurs by simulating a bit error in a total of 13 bits of data of read data (D0-D7) and ECC (E0-E4). Here, a bit error means an error in which the value of any one bit is reversed (the value of the bit changes from 0 to 1 or from 1 to 0). In this table, n is the total number of bits (i.e., n=13), k is the number of bits where an error occurs (k=0,1,...,13), C(n,k) is the total number of combinations where a k-bit error occurs in n bits, W(k) is the number of times a miss occurs in a k-bit error, and Pk is the probability of missed detection for a k-bit error.

[0091] In error detection using ECC, odd-numbered bit errors can be detected 100% theoretically. In the case of no bit error (k=0) and in the case of double bit error (k=2), bit errors can be detected 100% theoretically. Therefore, W(0) and W(2) are zero on the detection miss count of the table. On the other hand, the table shows that even-numbered bit errors of 4 or more bits cannot be detected and missed with a certain probability (percentage), for example, the detection miss count W(4) (k=4) of 4-bit errors is 55.

[0092] Fig.11 is a table summarizing the number of cases where miscorrection occurs in the error detection algorithm according to the comparative example (i.e., a case where a multi-bit error occurs but the error is misdetected as a single-bit error and some normal bits are miscorrected). Specifically, Fig.11 The following table summarizes the following when a bit error occurs in a total of 13 bits of read data (D0-D7) and ECC (E0-E4), Fig.10 The results shown derive the number of instances of miscorrection. Fig.11 In the table shown, X(k) is the number of times a miscorrection occurs when a k-bit error occurs, and Qk is the miscorrection probability of a k-bit error.

[0093] In error detection using ECC, odd-numbered bit errors can be detected 100% theoretically, that is, there will be no undetected errors and no missed errors. However, such miscorrection may occur. Fig.10As shown, an even number of bit errors may be missed; therefore, for example, the following miscorrection may occur. Consider as an example a case where a 4-bit error (k=4) with a detection miss number W(4)=55 is missed. Here, when an error occurs simultaneously in a total of 4 bits of the b1th bit, the b2th bit, the b3th bit, and the b4th bit in the 13-bit data, it is assumed that it is determined that no error occurs. The values ​​of b1, b2, b3, and b4 are naturally defined by how each column of the ECC generation matrix is ​​established.

[0094] In this case, when there is an error in only the bit position of any three bits among b1, b2, b3 and b4 in some data, it will be erroneously determined that an error has occurred only in the bits of the remaining bit positions. For example, when there are errors in the b1th bit, the b2th bit and the b3th bit and there are no errors in the remaining 10 bits including the b4th bit, it will be erroneously determined that only the b4th bit has an error. That is, it will be erroneously determined that a single-bit error has occurred, and the one bit determined to have an error (the b4th bit in the above example) will be corrected. That is, the normal bit will be miscorrected. At this time, the fact that an error has occurred in the remaining three bits will be missed. Therefore, the number of miscorrections X(3) for three bits (k=3) is 4 times the number of W(4), that is, 220.

[0095] Consider the case where another unit error occurs and the detection of a 4-bit error (k=4) is missed. That is, consider the case where errors occur simultaneously in a total of 5 bits, namely, the b1th bit, the b2th bit, the b3th bit, the b4th bit, and the b5th bit, in the 13-bit data. In this case, it is erroneously judged that an error has occurred only in the b5th bit, in other words, a unit error has occurred. Therefore, the b5th bit is correctly corrected, but the fact that errors occurred in 4 bits (the b1th bit, the b2th bit, the b3th bit, and the b4th bit) is missed. This is also considered a miscorrection. Therefore, in Fig.11 In the table shown, 9 (=13-4) times W(4), i.e., 495, is added to the number of miscorrections X(5) for 5-bit errors (k=5). As the number of miscorrections that contribute to X(5) in addition, in a similar way to the above, 6 times W(6), i.e., 576, may occur. Therefore, the number of miscorrections X(5) is given by 1071 (=495+576). The number of miscorrections other than X(5) is obtained in a similar way. From Fig.11 It can be seen from the table shown in that, in the case of three or more odd-numbered bit errors, miscorrection occurs with a considerable probability (percentage).

[0096] <Example 1>

[0097] Next, Embodiment 1 is described. Fig.12 is a block diagram showing an example of a data processing device according to Embodiment 1. Fig.12 In the example, the input / output interface 10 corresponds to Figure 1 The data processing device 1 shown in FIG. 1 is an interface for input and output of a memory 6. For example, the input / output interface 10 is provided in an SOC (System on Chip) and is provided between a bus system of the SOC and a memory 6 such as a DDR (Double Data Rate) memory as an external memory. Obviously, the error detection / correction function of the input / output interface 10 can be applied not only to the external memory 6 but also to a memory 6 built in the SOC and the like.

[0098] like Fig.12 As shown, the input / output interface 10 includes an encoder device 20 and a decoder device 30. The encoder device 20 corresponds to Figure 1 The encoder device 2 shown in FIG. The encoder device 20 performs processing described later on the input data to be written to the memory 6 and stores the processing result in the memory 6. The decoder device 30 corresponds to Figure 1 The decoder device 30 performs processing described later on the data read from the memory 6, and outputs output data and an error notification signal.

[0099] Fig.13 is a block diagram showing the encoder device 20. Fig.13 As shown, the encoder device 20 includes an ECC encoder circuit 21 and an ECC encoder circuit 22. The ECC encoder circuit 21 generates an ECC capable of single error correction and double error detection by performing an operation according to a first ECC generation matrix. The ECC encoder circuit 22 generates an ECC as a check bit capable of single error correction and double error detection by performing an operation according to a second ECC generation matrix obtained by permuting the columns of the first ECC generation matrix. The ECC encoder circuit 21 and the ECC encoder circuit 22 have the same circuit configuration; however, they generate different ECCs because the bit order of the input data is different.

[0100] The ECC encoder circuit 21 of the encoder device 20 is the same as the ECC encoder circuit 21 included in the encoder device 90 according to the comparative example. Therefore, the ECC encoder circuit 21 uses, for example, Figure 3 The ECC generation matrix shown in FIG. 1 is used to perform the operation, and a 5-bit ECC (E0-E4) is generated from the 8-bit input data (D0-D7). An example of a specific circuit configuration of the ECC encoder circuit 21 of the encoder device 20 is shown in FIG. Figure 5 shown.

[0101] The ECC encoder circuit 22 generates a 5-bit ECC (F0-F4) based on the data (D7, D0-D6) obtained by rotating the bit position of the 8-bit input data. That is, the data input to the ECC encoder circuit 22 is the data obtained by rotating each bit of the data to be input to the ECC encoder circuit 21. The ECC generated by the ECC encoder circuit 22 is used to supplement the error detection and correction of the ECC generated by the ECC encoder circuit 21. Therefore, the ECC generated by the ECC encoder circuit 22 is called a "check bit" to distinguish it from the ECC generated by the ECC encoder circuit 21. The ECC encoder circuit 22 has the same circuit configuration as the ECC encoder circuit 21, except that the ECC generation matrix to be used is different. That is, the specific circuit configuration of the ECC encoder circuit 22 is different from the specific circuit configuration of the ECC encoder circuit 21 in that the data (D7, D0-D6) obtained by rotating the bit position of the 8-bit input data is input to the ECC encoder circuit 22, and the output of the ECC encoder circuit 22 becomes a 5-bit check bit (F0-F4) instead of a 5-bit ECC (E0-E4).

[0102] When the ECC encoder circuit 21 is based on Figure 3 When the ECC generation matrix shown in FIG. 1 is executed, the ECC encoder circuit 22 performs operations by performing, for example, Fig.14 The operation of the ECC generation matrix shown generates ECC (check bits) capable of single error correction and double error detection. Fig.14 The ECC generation matrix shown in is a matrix for generating 5 check bits (F0-F4) from 8-bit input data (D0-D7), and is generated by Figure 3 Each column of the ECC generation matrix shown is obtained by rotating one column to the left. In this way, the rotation in the ECC generation matrix used for the ECC encoder circuit 22 corresponds to the rotation of the data input to the ECC encoder circuit 22. That is, the bit position after the rotation in the bit rotation for deriving the bit string to be input to the ECC encoder circuit 22 corresponds to the column number after the rotation in the column rotation for deriving the ECC generation matrix used by the ECC encoder circuit 22. Fig.14 The ECC generation matrix shown in is simply rotated Figure 3 The ECC generator matrix shown in is obtained. Therefore, with Figure 3 As in the case of the ECC generation matrix shown in , the bit pattern of each column is different from each other and each column includes an odd number of 1s. Therefore, Fig.14 The ECC generation matrix shown in is also a matrix for generating an ECC capable of single error correction and double error detection.

[0103] Fig.152 is a block diagram showing an example of a specific circuit configuration of the ECC encoder circuit 22. As described above, the ECC encoder circuit 22 performs Fig.14 The ECC generation matrix shown performs an XOR operation to generate 5 check bits (F0-F4) from 8-bit input data (D7, D0-D6). The ECC encoder circuit 22 includes an ECC generation circuit 201, and generates the check bits through the ECC generation circuit 201. Figure 5 As in the case of the circuit shown in FIG. 1 , the ECC generation circuit 201 is configured with five XOR circuits 201a-201e. The XOR circuits 201a-201d are 5-input XOR circuits, and the XOR circuit 201e is a 4-input XOR circuit. Each of the XOR circuits 201a-201e performs an operation with Fig.14 The operation corresponding to the ECC generation matrix shown in is performed, and the value of one of the 5 check bits (F0-F4) is determined.

[0104] F0 is obtained as the output of the XOR circuit 201a. Specifically, the XOR circuit 201a performs an XOR operation on D0, D1, D2, D3, and D7, and outputs the operation result as F0. Similarly, F1 is obtained as the output of the XOR circuit 201b. F2 is obtained as the output of the XOR circuit 201c. F3 is obtained as the output of the XOR circuit 201d. F4 is obtained as the output of the XOR circuit 201e.

[0105] In the example described here, the ECC encoder circuit 22 uses a matrix obtained by rotating each column of the ECC generation matrix used by the ECC encoder circuit 21 to the left by one column. However, the rotation direction and the number of rotations are not limited to the above example. However, in this case, as described above, the data to be input to the ECC encoder circuit 22 needs to be data obtained by performing the same rotation as the rotation performed on the ECC generation matrix on the data input to the ECC encoder circuit 21.

[0106] The encoder device 20 stores the input data as 8-bit write data ( D0 - D7 ) into the memory 6 together with the generated 5-bit ECC ( E0 - E4 ) and the generated 5-bit check bit ( F0 - F4 ).

[0107] Next, the decoder device 30 is explained. Fig.16is a block diagram showing a decoder device 30. The decoder device 30 includes an ECC decoder circuit 31, an ECC decoder circuit 32, and an error notification check circuit 33. The ECC decoder circuit 31 and the ECC decoder circuit 32 have the same circuit configuration. However, the bit order of the data to be input is different; therefore, the objects to be decoded are different. The ECC decoder circuit 31 receives the read data (D0-D7) and the ECC (E0-E4) read from the memory 6. The ECC decoder circuit 32 receives data (D7, D0-D6) obtained by replacing the bits of the read data (D0-D7) read from the memory 6 in the same manner as the data input to the ECC encoder circuit 22, and the check bits (F0-F4) read from the memory 6.

[0108] The ECC decoder circuit 31 is the same as the ECC decoder circuit 31 included in the decoder device 91 according to the comparative example. Therefore, the ECC decoder circuit 31 performs single error correction and double error detection on the 8-bit read data (D0-D7) and 5-bit ECC (E0-E4) read from the memory 6. When a single error is detected, the error of the bit is corrected. The ECC decoder circuit 32 performs single error correction and double error detection on the data (D7, D0-D6) and 5-bit check bits (F0-F4) obtained by rotating the bit position of the 8-bit read data read from the memory 6. The ECC decoder circuit 32 has the same circuit configuration as the ECC decoder circuit 31, except that the ECC check matrix to be used is different. That is, when the ECC decoder circuit 31 performs an operation according to the first ECC check matrix, the ECC decoder circuit 32 performs an operation according to the second ECC check matrix.

[0109] Fig.17 There is shown an ECC check matrix for the ECC decoder circuit 31 of the decoder device 30. As in the case of the ECC check matrix for the ECC decoder circuit 31 of the decoder device 91 according to the comparative example, the ECC check matrix for the ECC decoder circuit 31 of the decoder device 30 is a matrix for generating a 5-bit symptom code (S0-S4) from 8-bit read data (D0-D7) and 5-bit ECC (E0-E4). Fig.17 The ECC check matrix shown in FIG. 1 includes columns corresponding to the check bits (F0-F4) (drawn with diagonal lines), where the elements are filled with 0 because they are not used for operation. The 13 columns on the left side that are not drawn with diagonal lines have the same Figure 7 The ECC check matrix has the same contents as shown.

[0110] Fig.18An ECC check matrix is ​​shown for the ECC decoder circuit 32 of the decoder device 30. The ECC check matrix for the ECC decoder circuit 32 of the decoder device 30 is a matrix for generating a 5-bit syndrome code (R0-R4) from 8-bit read data (D0-D7) and 5-bit check bits (F0-F4). Fig.18 The ECC check matrix shown in FIG. 1 includes columns corresponding to ECC (E0-E4) (drawn with oblique lines), in which elements are filled with 0 because they are not used for operation. The left eight columns (corresponding to the columns D0-D7) of the columns drawn with oblique lines have the following structure: Fig.17 Each of the eight columns on the left side of the ECC check matrix (corresponding to the columns of D0-D7) shown is obtained by rotating one column to the left. In this way, for the ECC check matrix used for the ECC decoder circuit 32, the column permutation is performed corresponding to the permutation of the columns of the ECC generation matrix used for the ECC encoder circuit 22 in the encoder device 20.

[0111] Fig.18 1 shows an ECC check matrix used by the ECC decoder circuit 32 when the ECC encoder circuit 22 uses a matrix obtained by rotating each column of the ECC generation matrix used by the ECC encoder circuit 21 to the left by one column. Therefore, the ECC check matrix used by the ECC decoder circuit 32 is different corresponding to the rotation direction and the number of rotation stages.

[0112] An example of a specific circuit configuration of the ECC decoder circuit 31 of the decoder device 30 is as follows: Fig. 9 As shown, the ECC decoder circuit 31 includes a symptom generating circuit 300, a symptom decoder circuit 310 and an error correction circuit 320. That is, according to Fig.17 The operation of the ECC check matrix shown in Fig. 9 The symptom generation circuit 300 shown is implemented.

[0113] The specific circuit configuration of the ECC decoder circuit 32 of the decoder device 30 is the same as that of the ECC decoder circuit 31 except that the ECC check matrix to be used is different. Fig.19 30 is a block diagram showing an example of a specific circuit configuration of the ECC decoder circuit 32. The ECC decoder circuit 32 includes a syndrome generating circuit 301, a syndrome decoder circuit 311, and an error correcting circuit 321.

[0114] The symptom generation circuit 301 is the same as the symptom generation circuit 300 except for the following three points. First, the symptom generation circuit 301 receives data (D7, D0-D6) obtained by rotating the bit positions of the 8-bit read data. Second, the symptom generation circuit 301 does not receive 5-bit ECC but receives 5-bit check bits (F0-F4). Third, the symptom generation circuit 301 does not output 5-bit symptom codes (S0-S4) but outputs 5-bit symptom codes (R0-R4).

[0115] Therefore, the symptom generation circuit 301 generates and outputs a 5-bit symptom code (R0-R4) from the 8-bit data (D7, D0-D6) and the 5-bit check bit (F0-F4). Fig. 9 As in the case of the circuit shown in FIG. 1 , the symptom generation circuit 301 is configured with five XOR circuits 301a-301e. The XOR circuits 301a-301d are 6-input XOR circuits, and the XOR circuit 301e is a 5-input XOR circuit. Each of the XOR circuits 301a-301e is based on Fig.18 The ECC check matrix shown in performs operations and determines the value of one bit in the 5-bit syndrome code (R0-R4).

[0116] R0 is obtained as the output of the XOR circuit 301a. Specifically, the XOR circuit 301a performs an XOR operation on D0, D1, D2, D3, D7 and F0, and outputs the operation result as R0. Similarly, R1 is obtained as the output of the XOR circuit 301b. R2 is obtained as the output of the XOR circuit 301c. R3 is obtained as the output of the XOR circuit 301d. R4 is obtained as the output of the XOR circuit 301e. The symptom code (R0-R4) output from the symptom generation circuit 300 is input to the symptom decoder circuit 311.

[0117] The symptom decoder circuit 311 is the same as the symptom decoder circuit 310 except for the following two points. First, the symptom decoder circuit 311 does not receive the symptom code (S0-S4) but receives another symptom code (R0-R4). Second, the symptom decoder circuit 311 does not output the error bit position flag (C0-C7, CE0-CE4) and the no error flag (Cxx) but outputs another error bit position flag (B0-B7, BF0-BF4) and the no error flag (Bxx).

[0118] Therefore, the syndrome decoder circuit 311 decodes the 5-bit syndrome code (R0-R4) and generates and outputs a 13-bit error bit position flag (B0-B7, BF0-BF4) and a 1-bit error-free flag (Bxx). Fig.19 As shown, the syndrome decoder circuit 311 is configured with 13 INV-attached AND circuits 311a-311m and a NOR circuit 311n.

[0119] The INV-attached AND circuits 311a-311m are 5-input INV-attached AND circuits. Fig.18 Each column of the ECC check matrix shown (specifically, Fig.18 5-bit bit pattern (corresponding to D0-D7 and F0-F4 of columns 13 shown in FIG. Fig.18 When the bit pattern of the 5-bit symptom code (R0-R4) is matched with the bit pattern of the 5-bit symptom code (R0-R4), the AND circuits 311a-311m attached to INV respectively output 1. A unit error is detected by detecting that the bit pattern of the symptom code matches the bit pattern of any column of the ECC check matrix. The AND circuits 311a-311h attached to INV respectively output error bit position flags (B0-B7). The AND circuits 311i-311m attached to INV respectively output error bit position flags (BF0-BF4). The output mode of the error bit position flag (B0-B7, BF0-BF4) is the same as the output mode of the error bit position flag (C0-C7, CE0-CE4), and there are the following two types.

[0120] The first output pattern is an output pattern in which all of B0-B7 and BF0-BF4 are 0. This is an output pattern in the case where no error is detected and in the case where two or more bit errors are detected.

[0121] The second output pattern is an output pattern in which any one of B0-B7 and BF0-BF4 is 1. This is an output pattern in the case where a single-bit error is detected.

[0122] When observed Fig.18 When the first column of the ECC check matrix shown in FIG. 1 is used, the bit pattern is (1, 1, 0, 1, 0). In order to correspond to this, the symptom decoder circuit 311 is provided with an AND circuit 311a attached to INV to generate an error bit position flag B0. Specifically, in the input port of the AND circuit 311a attached to INV, R0, R1 and R3 of the symptom code are coupled to three input ports not attached to INV, and R2 and R4 of the symptom code are coupled to two input ports attached to INV. Similar coupling is performed on the AND circuits 311b-311m attached to INV.

[0123] The NOR circuit 311n is a 5-input NOR circuit. When the values ​​of all bits of the 5-bit symptom code (R0-R4) are 0, the NOR circuit 311n outputs 1. When the values ​​of all bits of the symptom code (R0-R4) are 0, it is determined that no bit error has occurred. The NOR circuit 311n outputs a no error flag (Bxx). As an output mode of the no error flag (Bxx), there are the following two types that are the same as the output mode of the no error flag (Cxx).

[0124] The first output pattern is that Bxx is 1. This is the output pattern in the case where no error is detected as described above.

[0125] The second output pattern is Bxx = 0. This is the output pattern in the event that one or more bit errors are detected.

[0126] The error correction circuit 321 is the same as the error correction circuit 320 except for the following two points. First, in the error correction circuit 321, the input is not the error bit position flag (C0-C7, CE0-CE4) nor the no-error flag (Cxx), but another error bit position flag (B0-B7, BF0-BF4)) and the no-error flag (Bxx). Second, the output data (D'0-D'7) after the single-bit error correction as the output of the error correction circuit 321 is not used, but only the single-bit error notification signal and the double-bit error notification signal are used. As the output data of the decoder device 30, the output data of the ECC decoder circuit 31 is used.

[0127] The error correction circuit 321 includes: a correction unit 321A constituting a circuit for correcting an error when a single-bit error of read data is detected; and a notification processing unit 321B constituting a circuit for generating an error notification signal indicating an error occurrence state of the read data.

[0128] The correction unit 321A performs error correction based on the 8-bit read data (D7, D0-D6) and the 8-bit error bit position flag (B0-B7). Fig. 9 As in the case of the correction unit 320A shown in , the correction unit 321A is configured with eight XOR circuits 321a-321h. The XOR circuits 321a-321h are 2-input XOR circuits. Each XOR circuit 321a-321h corrects a unit error by performing an XOR operation of an error bit position flag and a bit of the read data corresponding to the error bit position flag. That is, when any one of the flags of the 8-bit error bit position flag (B0-B7) is 1, the correction unit 321A performs a unit error correction (D0-D7) by inverting the value at the corresponding bit position of the read data. In the present embodiment, an ECC decoder circuit 32 having the same circuit configuration as the ECC decoder circuit 31 is used, so that the decoder device 30 can be easily configured. Therefore, the error correction circuit 321 includes the correction unit 321A. However, as described above, in the present embodiment, the correction function of the ECC decoder circuit 32 is not used. Therefore, the error correction circuit 321 may not include the correction unit 321A.

[0129] The notification processing unit 321B outputs a single-bit error notification signal and a double-bit error notification signal as an error notification signal based on the 13-bit error bit position flags (B0-B7, BF0-BF4) and the 1-bit no-error flag (Bxx). Fig. 9 As in the case of the notification processing unit 320B shown in , the notification processing unit 321B is configured with an OR circuit 321i and a NOR circuit 321j. The OR circuit 321i is a 13-input OR circuit and receives a 13-bit bit position flag (B0-B7, BF0-BF4). The NOR circuit 321j is a 2-input NOR circuit and receives the output of the OR circuit 321i and a no error flag (Bxx).

[0130] When any one of the input 13-bit bit position flags (B0-B7, BF0-BF4) is 1, the OR circuit 321i outputs 1 as a single-bit error notification signal. When both the output of the OR circuit 321i and the no-error flag (Bxx) are 0, the NOR circuit 321j outputs 1 as a double-bit error notification signal. As in the case of the output mode of the error notification signal of the notification processing unit 320B, there are the following three output modes of the error notification signal of the notification processing unit 321B.

[0131] The first output pattern is that the single-bit error notification signal and the double-bit error notification signal are both 0. This output pattern of the error notification signal indicates that the read data (D7, D0-D6) does not include any error.

[0132] The second output pattern is that the single bit error notification signal is 1 and the double bit error notification signal is 0. This output pattern of the error notification signal indicates that the bit string consisting of the read data (D7, D0-D6) and the check bits (F0-F4) includes a single bit error.

[0133] The third output pattern is that the single-bit error notification signal is 0 and the double-bit error notification signal is 1. This output pattern of the error notification signal indicates that the bit string consisting of the read data (D7, D0-D6) and the check bits (F0-F4) includes two or more bit errors.

[0134] like Fig.16 As shown, the error notification signal (single-bit error notification signal and double-bit error notification signal) output from the error correction circuit 320 of the ECC decoder circuit 31 and the error notification signal (single-bit error notification signal and double-bit error notification signal) output from the error correction circuit 321 of the ECC decoder circuit 32 are input to the error notification check circuit 33. The error notification signal output from the error correction circuit 320 and the error notification signal output from the error correction circuit 321 are both signals for generating a final notification signal by the error notification check circuit 33.

[0135] The unit error notification signal generated by the error correction circuit 320 may also be referred to as a signal indicating whether there is a correctable unit error in the bit string consisting of the read data (D0-D7) and the ECC (E0-E4). The unit error notification signal output from the error correction circuit 320 is also referred to as a first determination signal.

[0136] The double-bit error notification signal generated by the error correction circuit 320 can also be referred to as a signal indicating whether there are two or more bit errors in the bit string composed of the read data (D0-D7) and the ECC (E0-E4). The double-bit error notification signal output from the error correction circuit 320 is also referred to as a second determination signal.

[0137] The unit error notification signal generated by the error correction circuit 321 can also be referred to as a signal indicating whether there is a correctable unit error in the bit string consisting of the read data (D7, D0-D6) and the check bits (F0-F4). The unit error notification signal output from the error correction circuit 321 is also referred to as a third determination signal.

[0138] The double-bit error notification signal generated by the error correction circuit 321 can also be referred to as a signal indicating whether there are two or more bit errors in the bit string consisting of the read data (D7, D0-D6) and the check bits (F0-F4). The double-bit error notification signal output from the error correction circuit 321 is also referred to as a fourth determination signal.

[0139] The error notification check circuit 33 generates a final error notification signal indicating an error occurrence state based on the above-mentioned first to fourth determination signals. The error notification check circuit 33 outputs a "single bit error notification signal" indicating whether a single bit error is included in the read data (D0-D7) and a "double bit error notification signal" as error notification signals, the single bit error notification signal indicating whether a single bit error is included in the read data (D0-D7), and the double bit error notification signal indicating whether a double bit error or more is included in the read data (D0-D7). However, in practice, when both the ECC (E0-E4) and the check bit (F0-F4) include a single bit error, the single bit error notification signal is also set to 1. In addition, when the ECC (E0-E4) or the check bit (F0-F4) includes a double bit error or more, the double bit error notification signal is set to 1. When the error notification check circuit 33 outputs a single bit error notification signal of 1 and a double bit error notification signal of 0, the decoder device 30 notifies that the bit string has a single bit error and data obtained by correcting the error of the read data is output as output data (D'0-D'7). When the error notification check circuit 33 outputs a single-bit error notification signal of 0 and a double-bit error notification signal of 1, the decoder device 30 notifies that data that may include an error is output as output data (D'0-D'7). In the present case, an error may occur only in the ECC or the check bit. Therefore, the output data (D'0-D'7) does not necessarily include an error. In addition, when the decoder device 30 outputs a single-bit error notification signal of 0 and a double-bit error notification signal of 0, the decoder device 30 notifies that read data without an error is output as output data (D'0-D'7).

[0140] In this manner, the decoder device 30 generates a notification signal indicating that the read bit string includes no error, the bit string includes a single-bit error, or the bit string includes two or more bit errors based on the read data, ECC, and check bits read from the memory 6 .

[0141] like Fig.16 As shown, the error notification check circuit 33 is configured with an AND circuit 33a, an XOR circuit 33b, and an OR circuit 33c. The AND circuit 33a is a 2-input AND circuit, the XOR circuit 33b is a 2-input XOR circuit, and the OR circuit 33c is a 3-input OR circuit.

[0142] The AND circuit 33a receives the unit error notification signal (first determination signal) generated by the ECC decoder circuit 31 and the unit error notification signal (third determination signal) generated by the ECC decoder circuit 32. The AND circuit 33a performs an AND operation on these inputs and outputs the obtained signal as a final unit error notification signal.

[0143] The XOR circuit 33b receives the single-bit error notification signal (first determination signal) generated by the ECC decoder circuit 31 and the single-bit error notification signal (third determination signal) generated by the ECC decoder circuit 32. The XOR circuit 33b performs an XOR operation on these inputs and outputs the obtained signal to the OR circuit 33c.

[0144] The OR circuit 33c receives the double-bit error notification signal (second determination signal) generated by the ECC decoder circuit 31, the double-bit error notification signal (fourth determination signal) generated by the ECC decoder circuit 32, and the output signal of the XOR circuit 33b. The OR circuit 33c performs an OR operation on these inputs and outputs the obtained signal as a final double-bit error notification signal.

[0145] According to such a configuration, when one of the single-bit error notification signal of the ECC decoder circuit 31 and the single-bit error notification signal of the ECC decoder circuit 32 is 1 (i.e., when indicating the presence of a correctable single-bit error), the error notification check circuit 33 outputs 1 as a double-bit error notification signal. That is, when only one of the single-bit error notification signal of the ECC decoder circuit 31 and the single-bit error notification signal of the ECC decoder circuit 32 is 1, the error notification check circuit 33 generates a notification signal indicating that the bit string (D0-D7, E0-E4, F0-F4) read from the memory 6 includes two or more bit errors. When at least one of the double-bit error notification signal of the ECC decoder circuit 31 and the double-bit error notification signal of the ECC decoder circuit 32 is 1 (i.e., when indicating the presence of two or more bit errors), the error notification check circuit 33 outputs 1 as a double-bit error notification signal. That is, when at least one of the double-bit error notification signal of the ECC decoder circuit 31 and the double-bit error notification signal of the ECC decoder circuit 32 is 1, the error notification check circuit 33 generates a notification signal indicating that the bit string (D0-D7, E0-E4, F0-F4) read from the memory 6 includes two or more bit errors.

[0146] As described above, in the present embodiment, the ECC of the ECC encoder circuit 21 and the check bit are generated as the ECC of the ECC encoder circuit 22. They are ECCs based on different ECC generation matrices. Even in the occurrence mode of an error missed in the detection process using the ECC generated by the ECC encoder circuit 21, the error can be found in the detection process using the check bit generated by the ECC encoder circuit 22. Therefore, compared with the error detection of data, the detection performance can be improved based only on the ECC generated by the ECC encoder circuit 21.

[0147] In Embodiment 1, an example of adding 5-bit ECC and 5-bit check bits to 8-bit data is explained. However, the number of bits of data (data as a storage object) to which ECC (check bits) is added and the number of bits of ECC (check bits) can be arbitrary. For example, 8-bit ECC and 8-bit check bits can also be added to 64-bit data.

[0148] Fig. 20A and Fig. 20B An example of an ECC generation matrix is ​​shown, which generates 8-bit ECC (E0-E7) from 64-bit input data (D0-D63) to be written into a memory as write data. Corresponding to the ECC generation matrix, an ECC check matrix for generating 8-bit symptom codes (S0-S7) is determined based on the 64-bit read data (D0-D63) and 8-bit ECC (E0-E7) read from the memory. The left 64 columns of the ECC check matrix have the same contents as the 64 columns of the ECC generation matrix, and a unit matrix of 8 rows × 8 columns is added to the right 8 columns of the ECC check matrix.

[0149] For the ECC generation matrix for generating the check bit, a matrix obtained by performing an arbitrary rotation can be used, as in the case of Embodiment 1. The ECC check matrix for the check bit is determined corresponding to the ECC generation matrix for the check bit. The encoder circuit and the decoder circuit for the check bit can receive data obtained by performing the same rotation as the ECC generation matrix.

[0150] In addition, when 8-bit ECC and 8-bit check bits are attached to 64-bit data, the detection performance of multi-bit errors can be improved. The total number of bits of ECC and check bits to be attached to 64-bit data can be 16 bits. That is, the total number of bits of check bits and ECC can be 2 bytes, which is a size suitable for data communication.

[0151] <Example 2>

[0152] Next, Embodiment 2 is described. In Embodiment 2, the same encoder device 20 as that used in Embodiment 1 is used. However, as for the decoder device, a decoder device 30A is used instead of the decoder device 30.

[0153] Fig.21 is a block diagram illustrating the configuration of a decoder device 30A according to Embodiment 2. The decoder device 30A includes symptom generation circuits 300 and 301 , symptom decoder circuits 310 and 311 , a symptom check circuit 330 , and an error correction circuit 320 .

[0154] The symptom generation circuit 300 of the decoder device 30A and the ECC decoder circuit 31 (refer to Fig. 9) is the same as the syndrome generation circuit 300 of , and generates and outputs a 5-bit syndrome code (S0-S4) based on the 8-bit read data (D0-D7) and the 5-bit ECC (E0-E4).

[0155] The symptom generation circuit 301 of the decoder device 30A and the ECC decoder circuit 32 (refer to Fig.19 ) is the same as the symptom generation circuit 301, and generates and outputs a 5-bit symptom code (R0-R4) based on the data (D7, D0-D6) obtained by rotating the bit position of the 8-bit read data and the 5-bit check bit (F0-F4).

[0156] The symptom decoder circuit 310 of the decoder device 30A is similar to the ECC decoder circuit 31 (see Fig. 9 ) is the same as the syndrome decoder circuit 310, decodes the 5-bit syndrome code (S0-S4), and generates and outputs a 13-bit error bit position flag (C0-C7, CE0-CE4) and a no error flag (Cxx).

[0157] The symptom decoder circuit 311 of the decoder device 30A and the ECC decoder circuit 32 (see Fig.19 )'s syndrome decoder circuit 311 decodes the 5-bit syndrome code (R0-R4) and generates and outputs a 13-bit error bit position flag (B0-B7, BF0-BF4) and a no error flag (Bxx).

[0158] The symptom generation circuit 300 and the symptom decoder circuit 310 of the decoder device 30A are also referred to as the first symptom unit. The first symptom unit generates the first symptom code (S0-S4) based on the read data (D0-D7) and the ECC (E0-E4) read from the memory 6. The first symptom unit generates a first flag (C0-C7, CE0-CE4) and a second flag (Cxx). The first flag (C0-C7, CE0-CE4) indicates whether the first symptom code matches the bit pattern of any column of the ECC check matrix (first ECC check matrix), and the ECC check matrix is ​​composed of an ECC generation matrix (first ECC check matrix) and a cell matrix for generating ECC (E0-E4). The second flag (Cxx) indicates whether all bits of the first symptom code are 0.

[0159] The symptom generation circuit 301 and the symptom decoder circuit 311 of the decoder device 30A are also referred to as a second symptom unit. The second symptom unit generates a second symptom code (R0-R4) based on the data (D7, D0-D6) obtained by replacing the read data (D0-D7) read from the memory 6 and the check bits (F0-F4) read from the memory 6. The second symptom unit generates a third flag (B0-B7, BF0-BF4) and a fourth flag (Bxx). The third flag (B0-B7, BF0-BF4) indicates whether the second symptom code matches the bit pattern of any column of the ECC check matrix (second ECC check matrix), and the ECC check matrix is ​​composed of an ECC generation matrix (second ECC generation matrix) and a unit matrix for generating the check bits (F0-F4). The fourth flag (BXX) indicates whether all bits of the second symptom code are 0.

[0160] The symptom check circuit 330 is also referred to as a symptom check unit, and compares the first flag (C0-C7, CE0-CE4) with the third flag (B0-B7, BF0-BF4), and compares the second flag (Cxx) with the fourth flag (Bxx). That is, the symptom check circuit 330 checks the matching of the two error bit position flags (C0-C7 and B0-B7), generates the error bit position flag (C'0-C'7) whose accuracy (reliability) is improved, and outputs the result of performing an OR operation on the error bit position flag (CE0-CE4) and the error bit position flag (BF0-BF4) as the error bit position flag (CE'0-CE'4). Similarly, the symptom check circuit 330 checks the matching of the two error-free flags (Cxx and Bxx), and generates the error-free flag (C'xx) whose accuracy (reliability) is improved.

[0161] The symptom check circuit 330 is configured with AND circuits 330a-330h, OR circuits 330i-330m and an AND circuit 330n. Fig.21As shown. AND circuits 330a-330h are 2-input AND circuits. OR circuits 330i-330m are 2-input OR circuits. AND circuits 330a-330h receive the error bit position flag (C0-C7) output from symptom decoder circuit 310 and the error bit position flag (B0-B7) output from symptom decoder circuit 311. When both input values ​​are 1, AND circuits 330a-330h output 1, otherwise they output 0. That is, when interpreted with reference to the first flag (C0-C7), the third flag (B0-B7), the first symptom code (S0-S4), the second symptom code (R0-R4), the first ECC check matrix, and the second ECC check matrix, the symptom check circuit 330 outputs flags (C'0-C'7) as follows. The symptom check circuit 330 outputs a fifth flag (C'0-C'7) indicating that the first symptom code (S0-S4) matches the bit pattern of the t-th column of the first ECC check matrix (here, t is a positive integer and is the column number corresponding to any column of the first ECC generation matrix included in the first ECC check matrix) only when both the first condition and the second condition are met. Here, the first condition is that the first flag (C0-C7) indicates that the first symptom code (S0-S4) matches the bit pattern of the t-th column of the first ECC check matrix. The second condition is that the third flag (B0-B7) indicates that the second symptom code (R0-R4) matches the bit pattern of the t-th column of the second ECC check matrix.

[0162] The OR circuits 330i-330m receive the error bit position flags (CE0-CE4) output from the syndrome decoder circuit 310 and the error bit position flags (BF0-BF4) output from the syndrome decoder circuit 311. When at least one of the input values ​​is 1, the OR circuits 330i-330m output 1, and otherwise output 0. That is, when interpreted with reference to the first flags (CE0-CE4), the third flags (BF0-BF4), the first syndrome code (S0-S4), the second syndrome code (R0-R4), the first ECC check matrix, and the second ECC check matrix, the syndrome check circuit 330 outputs flags (CE'0-CE'4) as follows. When the first flag (CE0-CE4) indicates that the first syndrome code (S0-S4) matches the bit pattern of the s-th column of the first ECC check matrix (here, s is a positive integer and is the column number corresponding to any column of the unit matrix included in the first ECC check matrix) or when the third flag (BF0-BF4) indicates that the second syndrome code (R0-R4) matches the bit pattern of the s-th column of the second ECC check matrix, the symptom check circuit 330 outputs a fifth flag (CE'0-CE'4) indicating that the first syndrome code (S0-S4) matches the bit pattern of the s-th column of the first ECC check matrix.

[0163] The AND circuit 330n receives the error-free flag (Cxx) output from the symptom decoder circuit 310 and the error-free flag (Bxx) output from the symptom decoder circuit 311. When both input values ​​are 1, the AND circuit 330n outputs 1, otherwise it outputs 0. That is, when interpreted with reference to the second flag (Cxx), the fourth flag (Bxx), the first symptom code (S0-S4), and the second symptom code (R0-R4), the symptom check circuit 330 outputs the flag (C'xx) as follows. Only when the second flag indicates that all bits of the first symptom code are 0 and the fourth flag indicates that all bits of the second symptom code are 0, the symptom check circuit 330 outputs the sixth flag (C'xx) indicating that all bits of the first symptom code are 0.

[0164] The error bit position flag (C'0-C'7, CE'0-CE'4) and the error-free flag (C'xx) output from the symptom check circuit 330 are input to the error correction circuit 320. The error correction circuit 320 of the decoder device 30A is connected to the ECC decoder circuit 31 (refer to Fig. 9 ) is the same as the error correction circuit 320 of the symptom check circuit 330, and performs error correction and error notification using the error bit position flag (C'0-C'7, CE'0-CE'4) and the no-error flag (C'xx) output from the symptom check circuit 330. When any one of the error bit position flags (C'0-C'7) is 1, the error correction circuit 320 performs single-bit error correction by inverting the value of the bit at the bit position (any one of D0-D7) corresponding to the read data (D0-D7), and outputs the output data (D'0-D'7) after the single-bit error correction. The error correction circuit 320 generates an error notification signal consisting of a single-bit error notification signal and a double-bit error notification signal based on the error bit position flag (C'0-C'7, CE'0-CE'4) and the no-error flag (C'xx). In this manner, the configuration and operation of the error correction circuit 320 of the decoder device 30A are the same as those of the symptom decoder device 310, except that the error bit position flags (C'0-C'7, CE'0-CE'4) and the no-error flag (C'xx) output by the symptom check circuit 330 are used instead of the error bit position flags (C0-C7, CE0-CE4) and the no-error flag (Cxx) output by the symptom decoder circuit 310. Fig. 9 The configuration and operation of the error correction circuit 320 shown in FIG. 1 are the same.

[0165] In this way, in the present embodiment, the decoder device 30A performs single-bit error correction and error notification based on the comparison result of the symptom check circuit 330. That is, the decoder device 30A performs single-bit error correction on the read data (D0-D7) read from the memory 6 based on the value of the error bit position flag (C'0-C'7) whose accuracy is improved by the symptom check circuit 330. The decoder device 30A performs error notification based on the value of the error bit position flag (C'0-C'7, CE'0-CE'4) whose accuracy is improved by the symptom check circuit 330 and the value of the error-free flag (C'xx). This error notification is performed by unifying the error detection result by ECC and unifying the error detection result by the check bit. Therefore, the error detection performance can also be improved in the present embodiment.

[0166] As described above, the symptom check circuit 330 checks the error bit position flag (C0-C7) and the error bit position flag (B0-B7) by using AND circuits 330a-330h. Therefore, for example, when the value of the error bit position flag C0 is different from the value of the error bit position flag B0, the value of C'0 is set to 0. In this case, the value of the bit at the bit position corresponding to C0 is not corrected in the error correction circuit 320. That is, in the present embodiment, the correction process is performed only when the value of the error bit position flag (C0-C7) matches the value of the error bit position flag (B0-B7). That is, according to the present embodiment, miscorrection can be avoided. The symptom check circuit 330 checks the error-free flag (Cxx) and the error-free flag (Bxx) by using AND circuits 330n. Therefore, when the value of the error-free flag Cxx is different from the value of the error-free flag Bxx, the value of C'xx is set to 0. That is, in this case, 1 indicating that there is no error is not output as the output of C'xx. Therefore, it is possible to avoid missing the detection of the error.

[0167] Fig. 22 : is a table summarizing the false detection misses that occur in the false detection algorithm according to Embodiment 2. Fig.23 is a table summarizing the number of times miscorrection occurs in the error detection algorithm according to Embodiment 2. The explanation of these tables is the same as Fig.10 and Fig.11 The explanation is the same. However, in Embodiment 2, 8 bits of write data (D0-D7), 5 bits of ECC (E0-E4), and 5 bits of check bits (F0-F4) are stored in the memory 6. Therefore, Fig. 22 and Fig.23 Results from k=1 to k=18 are shown.

[0168] like Fig.10 and Fig. 22As shown in FIG. 1 , the total number of false detection misses is the same; however, in the comparative example, 55 false detection misses occur when k=4; on the contrary, it becomes zero in Embodiment 2. In the comparative example, a total of 96 false detection misses occur when k=5 and k=6; on the contrary, it becomes 28 in Embodiment 2. Thus, in Embodiment 2, when k is relatively small, the number of misses can be reduced. Fig.11 and Fig.23 As shown, in this regard, when k is relatively small, the number of miscorrections also decreases.

[0169] <Example 3>

[0170] Next, Example 3 is explained. Example 3 is different from Example 1 in that the number of check bits is reduced by using part of the bits of the ECC as check bits. Specifically, in Example 1, 5 check bits are used compared to 5-bit ECC. However, in Example 3, 3 check bits are used. The input / output interface 10 according to Example 3 includes an encoder device 20A instead of the encoder device 20, and includes a decoder device 30B instead of the decoder device 30.

[0171] Fig.24 is a block diagram showing an encoder device 20A. Fig.24 As shown, the encoder device 20A includes an ECC encoder circuit 21 and an ECC encoder circuit 23. The ECC encoder circuit 21 of the encoder device 20A is the same as the ECC encoder circuit 21 of the encoder device 20, and generates an ECC capable of single error correction and double error detection by performing operations according to a first ECC generation matrix. The ECC encoder circuit 23 generates an ECC capable of single error correction and double error detection as a check bit by performing operations according to a second ECC generation matrix obtained by replacing a plurality of columns having the same value of a predetermined row in the first ECC generation matrix. The ECC encoder circuit 21 and the ECC encoder circuit 23 have the same circuit configuration. However, the ECC encoder circuit 21 and the ECC encoder circuit 23 generate different ECCs because the bit order of the input data is different.

[0172] Fig.25 An example of an ECC generation matrix for the ECC encoder circuit 23 is shown. Fig.25 As shown, the ECC generation matrix generates 5 check bits (F0-F4) from 8 bits of input data (D0-D7) and has the following arrangement: Figure 3 The ECC generation matrix shown is rotated leftward by one column in the portion (the portion of F2-F4) on the left side of the lower three rows (the portion of D0-D2). Figure 3In the ECC generation matrix shown in , the three columns on the left (the portion of D0-D2) have the same element value in the first row and the same element value in the second row. Therefore, Fig.25 The ECC generation matrix shown in Figure 3 The matrix that wherein the first row and the second row in the ECC generation matrix shown have three columns (three columns on the left side) of the same value is permuted and obtained. In the ECC generation matrix that has performed this permutation, the value of the first row and the second row does not change in any column before and after the permutation. That is to say, the ECC (E0) generated for the first row of the ECC generation matrix before permutation is identical with the check position (F0) generated for the first row of the ECC generation matrix after permutation. Similarly, the ECC (E1) generated for the second row of the ECC generation matrix before permutation is identical with the check position (F1) generated for the second row of the ECC generation matrix after permutation. Therefore, it is not necessary to store the check position (F0, F1) generated in the ECC encoder circuit 23 in the memory 6.

[0173] The ECC encoder circuit 23 receives data on which a bit permutation has been performed. The permutation corresponds to the bit permutation used to derive Fig.25 That is, the ECC encoder circuit 23 receives data that has been permuted to rotate only D0-D2. Specifically, as Fig.24 As shown, the ECC encoder circuit 23 receives data (D2, D0, D1, D3-D7) obtained by rotating the bit positions of only the lower three bits in the 8-bit input data, and the ECC encoder circuit 23 generates 5-bit check bits (F0-F4).

[0174] The encoder device 20A writes the input data as 8-bit write data (D0-D7) together with the generated 5-bit ECC (E0-E5) and the upper 3 bits (F2-F4) of the generated 5-bit check bits in the memory 6. As described above, the lower 2 bits (F0-F1) of the 5-bit check bits generated by the ECC encoder circuit 23 become exactly the same as the lower 2 bits (E0-E1) of the 5-bit ECC generated by the ECC encoder circuit 21. Therefore, it is not necessary to repeat writing in the memory 6. In this way, the encoder device 20A stores the input data, all the bits of the ECC generated by the ECC encoder circuit 21, and part of the bits of the ECC generated by the ECC encoder circuit 23 in the memory 6. The part of the bits involved is a bit obtained by an operation using a row other than the above-mentioned predetermined row in the ECC generation matrix used by the ECC encoder circuit 23.

[0175] Next, the decoder device 30B is explained. Fig.26is a block diagram showing the decoder device 30B. The decoder device 30B includes an ECC decoder circuit 31 , an ECC decoder circuit 34 , and an error notification check circuit 33 .

[0176] The ECC decoder circuit 31 of the decoder device 30B is the same as the ECC decoder circuit 31 of the decoder device 30, and performs single error correction and double error detection on the 8-bit read data (D0-D7) and 5-bit ECC (E0-E4) read from the memory 6, and corrects the error of the bit where the unit error is detected. The ECC decoder circuit 34 reads from the memory 6 and uses the data (D2, D0, D1, D3-D7) obtained by rotating the bit position of only the lower 3 bits in the 8-bit read data, the lower 2 bits of the 5-bit ECC (E0=F0, E1=F1), and the upper 3 bits (F2-F4) of the 5-bit check bit, and performs single error correction and double error detection. The ECC decoder circuit 31 and the ECC decoder circuit 34 have the same circuit configuration; however, they have different decoding objects because the bit order of the input data is different.

[0177] Fig. 27 An ECC check matrix for the ECC decoder circuit 31 of the decoder device 30B is shown. The ECC check matrix for the ECC decoder circuit 31 of the decoder device 30B is a matrix for generating a 5-bit syndrome code (S0-S4) from 8-bit read data (D0-D7) and 5-bit ECC (E0-E4). Fig. 27 The ECC check matrix shown in FIG. 1 includes columns (drawn with diagonal lines) corresponding to the upper 3 bits (F2-F4) of the 5-bit check bits whose elements are filled with 0 (because they are not used for operation). The 13 columns on the left side that are not drawn with diagonal lines have the same Figure 7 The same contents as the ECC check matrix shown in .

[0178] Fig.28 The ECC check matrix of the ECC decoder circuit 34 of the decoder device 30B is shown. The ECC check matrix of the ECC decoder circuit 34 of the decoder device 30B is a matrix for generating a 5-bit syndrome code (R0-R4) from 8-bit read data (D0-D7), the lower 2 bits (E0=F0, E1=F1) of the 5-bit ECC, and the upper 3 bits (F2-F4) of the 5-bit check bits. Fig.28 The ECC check matrix shown in FIG. 1 includes columns (drawn with diagonal lines) corresponding to the upper 3 bits (E2-E4) of the 5-bit ECC whose elements are filled with 0 (because they are not used for operation). The eight columns on the left (corresponding to the columns of D0-D7) have the same value as those of D0-D7 by rotating the left side. Fig. 27The arrangement obtained by checking some of the eight columns (corresponding to the columns of D0-D7) on the left side of the ECC check matrix shown in . Here, the upper 2 rows are all 1; therefore, when described in detail, Fig.28 The eight columns on the left (corresponding to columns D0-D7) have Fig. 27 The arrangement is obtained by rotating each of a part of the left eight columns (corresponding to columns D0-D7) of the ECC check matrix shown (3 columns (corresponding to columns D0-D2) to the left of the lower 3 rows (corresponding to rows R2-R4)) to the left by one column.

[0179] The error notification check circuit 33 of the decoder device 30B is the same as the error notification check circuit 33 of the decoder device 30 , and generates a final error notification signal based on the error notification output by the ECC decoder circuit 31 and the error notification output by the ECC decoder circuit 34 .

[0180] In this manner, the decoder device 30B generates a notification signal based on the read data ( D0 - D7 ), the ECC ( E0 - E4 ), and the partial bits ( F2 - F4 ) of the check bits read from the memory 6 .

[0181] In the above, embodiment 3 is explained. As in the case of embodiment 1, in this embodiment, error detection by ECC and error detection by check bits are performed. Therefore, compared with error detection of data based on only one ECC, detection performance can be improved. As mentioned above, the low 2 bits of ECC can be shared with the low 2 bits of check bits. Therefore, the total number of bits of data, ECC and check bits can be set to 16 bits. That is, the total number of bits can be set to 2 bytes, which is a size suitable for data communication.

[0182] Hereinafter, a modified example of Embodiment 3 is described. In Embodiment 2, it is also preferable to share the bits of the ECC and the check bits as in Embodiment 3. That is, the encoder device 20A according to Embodiment 3 and Fig.29 The decoder device 30C shown in FIG. Fig.29 The decoder device 30C shown in FIG. Fig.21 The decoder device 30A according to Embodiment 2 shown is the same except that the symptom generating circuit 301 is replaced with a symptom generating circuit 302. The symptom generating circuit 302 has the same circuit configuration as the symptom generating circuit 301. However, the bit order of the inputted data is different; therefore, the symptom code to be generated is different.

[0183] As in the case of the above-mentioned ECC decoder circuit 34, the syndrome generation circuit 302 receives data (D2, D0, D1, D3-D7) obtained by rotating the bit positions of the lower 3 bits of the 8-bit read data read from the memory 6, the lower 2 bits of the 5-bit ECC (E0=F0, E1=F1), and the upper 3 bits (F2-F4) of the 5-bit check bits, and generates a syndrome code based on these inputs.

[0184] By adopting such a configuration, also in Embodiment 2, the total number of bits can be set to 2 bytes, which is a size suitable for data communication.

[0185] Fig.30 : is a table summarizing the false detection misses occurring in the algorithm of false detection according to the modification example of Embodiment 3. Fig.31 is a table summarizing the number of cases of miscorrection occurring in the error detection algorithm according to the modified example of Embodiment 3. The explanation of these tables is the same as Fig.10 and Fig.11 However, in the modified example of Embodiment 3, 8 bits of write data (D0-D7), 5 bits of ECC (E0-E4), and 3 bits of check bits (F2-F4) are stored in the memory 6. Therefore, Fig.30 and Fig.30 Results from k=1 to k=16 are shown.

[0186] like Fig.10 and Fig.30 As shown, although the total number of false detection misses does not change, in the comparative example, 55 false detection misses occur when k=4; however, in the modified example of Example 3, the false detection misses become 4. In the comparative example, a total of 96 false detection misses occur when k=5 and k=6. However, in the modified example of Example 3, the number of detection misses is 59. In this way, in the modified example of Example 3, when the value of k is relatively small, the number of misses can be reduced. In connection with this, when the value of k is relatively small, the number of miscorrections is also reduced, as shown in FIG. Fig.11 and Fig.31 What I see.

[0187] <Example 4>

[0188] Next, Embodiment 4 is described. In Embodiments 1 to 3, the encoder device includes two ECC encoder circuits having the same circuit configuration, and one of the ECC encoder circuits is used as a circuit for generating a check bit. In contrast, an encoder device 20B according to Embodiment 4 includes an ECC encoder circuit 21 and a check bit generating circuit 24 having circuit configurations different from each other.

[0189] The input / output interface 10 according to Embodiment 4 includes an encoder device 20B instead of the encoder device 20 and a decoder device 30D instead of the decoder device 30 .

[0190] Fig.32 is a block diagram showing an encoder device 20B. Fig.32 As shown, the encoder device 20B includes an ECC encoder circuit 21 and a check bit generation circuit 24. The ECC encoder circuit 21 of the encoder device 20B is, for example, the same as the ECC encoder circuit 21 according to Embodiment 1, and generates an ECC capable of single error correction and double error detection by performing operations according to a predetermined ECC generation matrix. In Embodiment 4, the ECC generation matrix used by the ECC encoder circuit 21 is referred to as an ECC generation sub-matrix. The check bit generation circuit 24 generates a check bit by performing operations according to a predetermined check bit generation matrix.

[0191] Here, the ECC generation submatrix used by the ECC encoder circuit 21 and the check bit generation matrix used by the check bit generation circuit 24 are described. The ECC generation submatrix and the check bit generation matrix are submatrices of a predetermined ECC generation matrix (hereinafter referred to as the ECC generation full matrix). Here, it is assumed that the ECC generation full matrix is ​​an ECC generation matrix for generating p-bit ECC (p is a positive integer) capable of single error correction and double error detection. In this case, the check bit generation matrix is ​​a submatrix of q rows of the ECC generation full matrix (q is a positive integer less than p), and the ECC generation submatrix is ​​an r-row submatrix (r=pq) of the ECC generation full matrix from which the q-row submatrix is ​​removed. The ECC encoder circuit 21 generates an r-bit ECC capable of single error correction and double error detection by performing operations according to such an ECC generation submatrix. The check bit generation circuit 24 generates q-bit check bits by performing operations according to the check bit generation matrix. The specific example of Embodiment 4 assumes p=8, q=3 and r=5.

[0192] Fig.33 Examples of an ECC generation matrix, an ECC generation sub-matrix, and a check bit generation matrix are shown. Fig.33 , the 5-row×8-column matrix shown in the upper portion is an ECC generation sub-matrix, the 3-row×8-column matrix shown in the lower portion is a check bit generation matrix, and the entire 8-row×8-column matrix is ​​an ECC generation full matrix. Fig.33 The ECC generation full matrix shown in is an ECC generation matrix that can generate 8-bit ECC capable of single error correction and double error detection from 8-bit input data (D0-D7). Fig.33 The ECC generation submatrix shown in is an ECC generation matrix that can generate 5-bit ECC (E0-E4) capable of single error correction and double error detection from 8-bit input data (D0-D7). Fig.33 The check bit generation matrix shown in is a matrix that can generate 3 check bits (G5-G7) from 8-bit input data (D0-D7). It should be noted that Fig.33 In the check bit generation matrix shown in , the bit patterns of each column are not eight but only four. Therefore, the check bit is not a SEC-DED code.

[0193] The 8-bit data (D0-D7) is input to the ECC encoder circuit 21 of the encoder device 20B. The ECC encoder circuit 21 uses Fig.33 The ECC generation submatrix shown in the upper part of performs the operation and generates 5-bit ECC (E0-E4) corresponding to the 8-bit input data (D0-D7). An example of a specific circuit configuration of the ECC encoder circuit 21 of the encoder device 20B is shown in FIG. Figure 5 shown.

[0194] The 8-bit data (D0-D7) is input to the check bit generation circuit 24 of the encoder device 20B. The check bit generation circuit 24 uses Fig.33 The check bit generation matrix shown in the lower part of performs the operation and generates 3-bit check bits (G5-G7) corresponding to 8-bit input data (D0-D7). Fig.34 2 is a block diagram showing an example of a specific circuit configuration of the check bit generation circuit 24. The check bit generation circuit 24 generates a check bit by Fig.33 The check bit generation matrix shown performs an XOR operation to generate 3 check bits (G5-G7) from 8-bit input data (D0-D7). The check bit generation circuit 24 is configured with three XOR circuits 24a-24c. The XOR circuits 24a-24c are 4-input XOR circuits. Each of the XOR circuits 24a-24c is based on Fig.33 The check bit generation matrix shown in performs the operation and determines the value of one of the 3 check bits (G5-G7).

[0195] G5 is obtained as the output of the XOR circuit 24a. Specifically, the XOR circuit 24a performs an XOR operation on D1, D2, D4, and D5, and outputs the operation result as G5. Similarly, G6 is obtained as the output of the XOR circuit 24b. G7 is obtained as the output of the XOR circuit 24c.

[0196] The encoder device 20B stores the input data as 8-bit write data (D0-D7) together with the generated 5-bit ECC (E0-E4) and the generated 3-bit check bit (G5-G7) in the memory 6.

[0197] Next, the decoder device 30D is explained. Fig.35is a block diagram showing a configuration of a decoder device 30D according to Embodiment 4. The decoder device 30D includes syndrome generation circuits 300 and 303 , syndrome decoder circuits 310 and 312 , an error notification signal generation circuit 331 , and an error correction circuit 320 .

[0198] The symptom generation circuit 300 of the decoder device 30D and the ECC decoder circuit 31 (refer to Fig. 9 ) and generates and outputs a 5-bit symptom code (S0-S4) from 8-bit read data (D0-D7) and 5-bit ECC (E0-E4). The symptom generation circuit 300 outputs the generated symptom code to the symptom decoder circuit 310.

[0199] The decoder device 30D has a symptom decoder circuit 310 and an ECC decoder circuit 31 (see Fig. 9 ) and decodes the 5-bit symptom code (S0-S4) to generate and output a 13-bit error bit position flag (C0-C7, CE0-CE4) and a no-error flag (Cxx). The error bit position flag (C0-C7) output from the symptom decoder circuit 310 of the decoder device 30D is input to the error correction circuit 320. However, the error bit position flag (CE0-CE4) and the no-error flag (Cxx) output from the symptom decoder circuit 310 are input to the error notification signal generation circuit 331 instead of the error correction circuit 320. The error bit position flag (C0-C7) output from the symptom decoder circuit 310 of the decoder device 30D is also input to the error notification signal generation circuit 331.

[0200] The symptom generation circuit 303 of the decoder device 30D generates and outputs a 3-bit symptom code (Q5-Q7) from the 8-bit read data (D0-D7) and the 3-bit check bits (G5-G7). The symptom generation circuit 303 outputs the generated symptom code to the symptom decoder circuit 312.

[0201] The symptom decoder circuit 312 of the decoder device 30D decodes the 3-bit symptom code (Q5-Q7) and generates and outputs t-bit error bit position specifying auxiliary flags (A0-A3, AG5-AG7). The symptom decoder circuit 312 outputs the generated error bit position specifying auxiliary flags to the error notification signal generating circuit 331.

[0202] The error correction circuit 320 of the decoder device 30D is the same as the error correction circuit 320 of the ECC decoder circuit 31 (refer to Fig. 9). In Embodiment 4, the error correction circuit 320 uses only the error correction function, and does not use the error notification function. Therefore, as described above, the bit position flag (C0-C7) is input to the error correction circuit 320; however, the no-error flag (Cxx) is not input. In this way, in Embodiment 4, only the correction unit 320A of the error correction circuit 320 is used, and the notification processing unit 320B is not used. Therefore, in Embodiment 4, a circuit including only the correction unit 320A can be used instead of the error correction circuit 320.

[0203] The error notification signal generating circuit 331 of the decoder device 30D generates and outputs an error notification signal composed of a single-bit error notification signal and a double-bit error notification signal from 13-bit position flags (C0-C7, CE0-CE4), 1-bit no-error flag (Cxx), and 7-bit error bit position specifying auxiliary flags (A0-A3, AG5-AG7). The specific circuit configuration of the error notification signal generating circuit 331 will be described later.

[0204] Symptom generation circuits 300 and 303 are implemented according to Fig.36 The check matrix shown performs operations to generate symptom codes. In the following description, the check matrix used in the symptom generation circuit 300 is referred to as an ECC check submatrix, and the check matrix used in the symptom generation circuit 303 is referred to as a check bit check matrix. The ECC check matrix and the check bit check matrix are submatrices of a predetermined ECC check matrix (hereinafter referred to as an ECC check full matrix). Here, the ECC check full matrix is ​​a matrix obtained by combining the ECC generation full matrix with the unit matrix. The ECC check submatrix is ​​an r-row submatrix (in Fig.36 In the example shown, r=5), and the check bit check matrix is ​​the q-row submatrix of the ECC check matrix with the r-row submatrix removed (in Fig.36 In the example shown in , q=3). The syndrome generation circuit 300 generates an r-bit syndrome code by performing operations according to the ECC check sub-matrix. The syndrome generation circuit 303 generates a q-bit syndrome code by performing operations according to the check bit check matrix.

[0205] Fig.36 The 8-row×16-column matrix shown in is the ECC check full matrix, the upper 5-row×16-column matrix is ​​the ECC check sub-matrix used in the symptom generation circuit 300 , and the 3-row×16-column matrix is ​​the check bit check matrix used in the symptom generation circuit 303 .

[0206] Fig.36 The ECC check sub-matrix shown in is a matrix that generates a 5-bit syndrome code (S0-S4) from 8-bit read data (D0-D7) and 5-bit ECC (E0-E4). Fig.36The ECC check submatrix shown in FIG. 1 includes columns corresponding to the check bits (G5-G7) (drawn with diagonal lines), where the elements are filled with 0 (because they are not used for operation). The 13 columns on the left side that are not drawn with diagonal lines have the same Figure 7 The ECC check matrix has the same contents as shown.

[0207] Fig.36 The check bit check matrix shown in is a matrix that generates a 3-bit symptom code (Q5-Q7) from 8-bit read data (D0-D7) and 3-bit check bits (G5-G7). Fig.36 The check bit check matrix shown in includes columns (drawn with slashes) corresponding to ECC (E0-E4), in which the elements are filled with 0 (because they are not used for the operation).

[0208] Fig.37 is a block diagram showing an example of a specific circuit configuration of the symptom generation circuit 303 and the symptom decoder circuit 312 of the decoder device 30D.

[0209] like Fig.37 As shown, the symptom generation circuit 303 is configured with three XOR circuits 303a-303c. The XOR circuits 303a-303c are 5-input XOR circuits. Each XOR circuit 303a-303c is based on Fig.36 The check bit check matrix shown determines the value of one bit in the 3-bit syndrome code (Q5-Q7).

[0210] Q5 is obtained as the output of the XOR circuit 303a. Specifically, the XOR circuit 303a performs an XOR operation on D1, D2, D4, D5 and G5, and outputs the operation result as Q5. Similarly, Q6 is obtained as the output of the XOR circuit 303b. Q7 is obtained as the output of the XOR circuit 303c. The symptom code (Q5-Q7) output from the symptom generation circuit 303 is input to the symptom decoder circuit 312.

[0211] The symptom decoder circuit 312 is configured with a NOR circuit 312a and six INV-attached AND circuits 312b-312g, as shown in FIG. Fig.37 As shown. NOR circuit 312a is a 3-input NOR circuit. AND circuits 312b-312g attached to INV are 3-input AND circuits attached to INV. Fig.36 The check bits shown check the 3-bit pattern that appears in each column of the matrix (which corresponds to Fig.36 When the Q5-Q7 shown in FIG. 1 matches the 3-bit bit pattern (Q5-Q7) of the syndrome code, the NOR circuit 312a and the AND circuits 312b-312g attached with INV respectively output 1.

[0212] like Fig.36As shown, there are seven 3-bit bit patterns appearing in each column of the check bit check matrix (000, 110, 101, 011, 100, 010, 001). The operation of the symptom decoder circuit 312 for outputting the error bit position specifying auxiliary flags (A0-A3) with respect to the NOR circuit 312a and the AND circuits 312b-312d attached to INV is equivalent to: Checking the error bit position in Fig.33 The check bit generator matrix shown in FIG. 8 checks the match between the 3-bit bit pattern appearing in each column of the matrix and the bit pattern (Q5-Q7) of the 3-bit symptom code.

[0213] Each of the NOR circuit 312a and the AND circuits 312b-312g attached to INV outputs an error bit position specifying auxiliary flag (A0-A3, AG5-AG7). As output modes of the error bit position specifying auxiliary flag, there are the following two. The first output mode is an output mode in which all of A0-A3 and AG5-AG7 are 0. The second output mode is an output mode in which any one of A0-A3 and AG5-AG7 is 1.

[0214] The symptom decoder circuit 310 outputs the flag Cxx set to 1 separately from C0-C7 only when all bits of the symptom code (S0-S4) are 0. On the other hand, in the symptom decoder circuit 312, the error bit position specifying auxiliary flag (A0) generated by the NOR circuit 312a is a flag that is set to 1 only when all bits (Q5-Q7) of the symptom code are 0. Therefore, the symptom decoder circuit 312 outputs only the error bit position specifying auxiliary flag (A0-A3, AG5-AG7). The symptom decoder circuit 312 outputs the error bit position specifying auxiliary flag (A0-A3, AG5-AG7) to the error notification signal generating circuit 331.

[0215] The symptom generation circuit 300 and the symptom decoder circuit 310 of the decoder device 30D are also referred to as a first symptom unit. The first symptom unit generates a first symptom code (S0-S4) based on the read data (D0-D7) and the ECC (E0-E4) read from the memory 6. The first symptom unit generates: a first flag (C0-C7, CE0-CE4) indicating whether the first symptom code matches the bit pattern of a column of the ECC check submatrix; and a second flag (Cxx) indicating whether all bits of the first symptom code are 0.

[0216] The symptom generation circuit 303 and the symptom decoder circuit 312 of the decoder device 30D are also referred to as a second symptom unit. The second symptom unit generates a second symptom code (Q5-Q7) based on the read data (D0-D7) and the check bits (G5-G7) read from the memory 6. The second symptom unit generates a third flag (A0-A3, AG5-AG7) indicating whether the second symptom code matches the bit pattern of a column of the check bit check matrix.

[0217] The error notification signal generating circuit 331, also referred to as a notification unit, compares the flag (C0-C7, CE0-CE4, Cxx) generated by the first symptom unit with the flag (A0-A3, AG5-AG7) generated by the second symptom unit, and generates an error notification signal according to the comparison result. That is, the error notification signal generating circuit 331 checks the match between the flag generated by the first symptom unit and the flag generated by the second symptom unit, and generates an error bit position flag (C'0-C'7, CE'0-CE'4) and an error bit position specifying auxiliary flag (AG'5-AG'7) with improved accuracy (reliability). In a similar manner, the error notification signal generating circuit 331 checks the match between the error-free flag (Cxx) and the error bit position specifying auxiliary flag (A0), and generates an error-free flag (C'xx) with improved accuracy (reliability).

[0218] like Fig.35 As shown, the error notification signal generating circuit 331 is configured with 17 AND circuits 331a-331q, an OR circuit 331r, and a NOR circuit 331s. The AND circuits 331a-331q are 2-input AND circuits.

[0219] When the bit pattern of the symptom code (Q5-Q7) is Fig.36 When the bit pattern of the column corresponding to D0 or D7 in the check bit check matrix shown matches, the error bit position specifying auxiliary flag (A0) is set to 1. When the bit pattern of the symptom code (S0-S4) matches Fig.36 When the bit pattern of the column corresponding to D0 in the ECC check submatrix shown matches, the error bit position flag (C0) is set to 1.

[0220] When the bit pattern of the correction code (S0-S4) is Fig.36 When the bit pattern of the column corresponding to D7 in the ECC check submatrix shown matches, the error bit position flag (C7) is set to 1. Therefore, the error notification signal generating circuit 331 compares C0 with A0 and compares C7 with A0. Therefore, C0 and A0 are input to the AND circuit 331a, and the AND circuit 331a outputs C'0. C7 and A0 are input to the AND circuit 331h, and the AND circuit 331h outputs C'7.

[0221] The error notification signal generating circuit 331 performs similar comparisons with respect to other error bit position flags. That is, C1 and A1 are input to the AND circuit 331b, and the AND circuit 331b outputs C'1. C2 and A2 are input to the AND circuit 331c, and the AND circuit 331c outputs C'2. C3 and A3 are input to the AND circuit 331d, and the AND circuit 331d outputs C'3. C4 and A1 are input to the AND circuit 331e, and the AND circuit 331e outputs C'4. C5 and A2 are input to the AND circuit 331f, and the AND circuit 331f outputs C'5. C6 and A3 are input to the AND circuit 331g, and the AND circuit 331g outputs C'6.

[0222] When the bit pattern of the symptom code (S0-S4) is Fig.36 When the bit pattern of the column corresponding to E0 in the ECC check submatrix shown matches, the error bit position flag (CE0) is set to 1. Here, as shown from Fig.36 As is clear, when the bit pattern of the symptom code (S0-S4) matches the bit pattern of the column corresponding to E0, the bit pattern of the symptom code (Q5-Q7) should be set to the pattern (0,0,0). By using A0, it can be determined whether the bit pattern of the symptom code (Q5-Q7) is equal to the pattern (0,0,0). Therefore, the error notification signal generating circuit 331 compares CE0 with A0. That is, CE0 and A0 are input to the AND circuit 331i, and the AND circuit 331i outputs CE'0.

[0223] AG'5 is input to the AND circuit 331n, and the AND circuit 331n outputs AG'6. AG7 and Cxx are input to the AND circuit 331p, and the AND circuit 331p outputs AG'7.

[0224] When the values ​​of both input flags are 1, AND circuits 331a-331p output 1, otherwise output 0. That is, when explained according to the first flag (C0-C7, CE0-CE4), the third flag (A0-A3, AG5-AG7), the first symptom code (S0-S4), the second symptom code (Q5-Q7), the ECC check submatrix and the check bit check matrix, the error notification signal generation circuit 331 generates the flag as follows. Only when both the first condition and the second condition are met, the error notification signal generation circuit 331 generates a fifth flag (C'0 to C'7, CE'0-CE'4) indicating that the first symptom code (S0-S4) matches the bit pattern of the tth column (t is a positive integer) of the ECC check submatrix. Here, the first condition is that the first flag (C0-C7, CE0-CE4) indicates that the first symptom code (S0-S4) matches the bit pattern of the tth column of the ECC generation submatrix. The second condition is that the third flag (A0-A3, AG5-AG7) indicates that the second syndrome code (Q5-Q4) matches the bit pattern of the t-th column of the check bit check matrix.

[0225] When the bit pattern of the symptom code (Q5-Q7) matches Fig.33 When the bit pattern corresponding to the column of D0 or D7 in the check bit generation matrix shown, i.e., (0,0,0), matches, the error bit position specifying auxiliary flag (A0) is set to 1. Therefore, the error-free flag (Cxx) output from the symptom decoder circuit 310 and the error bit position specifying auxiliary flag (A0) output from the symptom decoder circuit 312 are input to the AND circuit 331q. When both input values ​​are 1, the AND circuit 331q outputs 1, otherwise it outputs 0. That is, when explained based on the second flag (Cxx), the third flag (A0-A3, AG5-AG7), the first symptom code (S0-S4) and the second symptom code (Q5-Q7), the error notification signal generation circuit 331 generates the flag (C'xx) as follows. The error notification signal generating circuit 331 generates a sixth flag (C'xx) indicating that all bits of the first symptom code (S0-S4) are 0 only when the second flag (Cxx) indicates that all bits of the first symptom code (S0-S4) are 0 and the predetermined third flag (A0) indicates that all bits of the second symptom code (Q5-Q7) are 0.

[0226] The flags (C'0-C'7, CE'0-CE'4, AG'5-AG'7) are input to the OR circuit 331r, and the flag (C'xx) is input to the NOR circuit 331s. A circuit similar to the notification processing unit 320B is configured with the OR circuit 331r and the NOR circuit 331s. That is, the OR circuit 331r corresponds to Fig. 9 The OR circuit 320i and the NOR circuit 331s correspond to Fig. 9By adopting such a configuration, the error notification signal generating circuit 331 generates an error notification signal consisting of a single-bit error notification signal and a double-bit error notification signal based on the error bit position flag (C'0-C'7, CE'0-CE'4) and the no-error flag (C'xx).

[0227] According to Embodiment 4, the decoder device 30D performs error notification based on the comparison result of the output of the symptom decoder circuit 310 and the output of the symptom decoder circuit 312. That is, the decoder device 30D performs error notification based on the value of the error-free flag (C'xx) and the value of the error bit position flag (C'0-C'7, CE'0-CE'4) whose accuracy is improved by the error notification signal generating circuit 331. This error notification is performed by combining the error detection result of the ECC and the error detection result of the check bit. Therefore, also in Embodiment 4, the error detection performance can be improved.

[0228] Fig.38 is a table summarizing the error detection misses that occur in the error detection algorithm according to Embodiment 4. Fig.39 is a table summarizing the number of cases of miscorrection occurring in the error detection algorithm according to Embodiment 4. The explanation of these tables is the same as Fig.10 and Fig.11 However, in Embodiment 4, 8 bits of write data (D0-D7), 5 bits of ECC (E0-E4), and 3 bits of check bits (G5-G7) are stored in the memory 6. Therefore, Fig.38 and Fig.39 Results from k=1 to k=16 are shown.

[0229] from Fig.10 and Fig.38 It can be seen that the total number of false detection misses does not change, but in the comparative example, 55 false detection misses occur when k=4, but in Example 4, 9 detection misses occur. In the comparative example, a total of 96 false detection misses occur when k=5 and k=6; however, 76 detection misses occur in Example 3. Therefore, in Example 4, when the value of k is relatively small, the number of misses can be reduced. In this regard, as Fig.11 and Fig.39 As shown, the number of miscorrections also decreases when the value of k is relatively small.

[0230] <Modification Example of Embodiment>

[0231] Finally, a modified example of the embodiment is described. In the above embodiment, the rotation of the bit position of the input data input to the circuit generating the ECC (check bit) is performed. However, other methods can be used. For example, data obtained by replacing some bit positions can be used to generate the check bit.

[0232] The combination of column bit patterns of the two ECC generation matrices applied to the encoder device can be different. That is, when different bit patterns not included in the bit patterns appearing in each column of one of the two ECC generation matrices can be used as ECC, the other of the two ECC generation matrices can be composed by replacing the bit pattern of one column of the two ECC generation matrices by considering the different bit patterns. Rotation of bit positions and replacement of some bit positions can also be used together.

[0233] In Embodiments 1 to 4, as a multi-bit error, for example, an error in which the value of some bits is reversed (the value of the bit is changed from 0 to 1 or from 1 to 0) is assumed. However, multi-bit errors of other modes can be detected. For example, in a multi-bit error that occurs due to a failure of a processing circuit of a data signal system or a failure of an input / output terminal, it is assumed that all data of a multi-bit or data of a predetermined bit width depending on a circuit configuration is affected by a fixed-type failure (the value of the bit remains 0 or 1). Even in the case of such an assumption, the detection performance of a multi-bit error can be similarly improved.

[0234] By the way, for example, when using Figure 3 The ECC generation matrix shown in Figure 7 When the ECC check matrix shown in is used, if all data bits are 0, all bits of the ECC are also set to 0. Therefore, in theory, a multi-bit error in which all bits of the ECC and data are affected by a fixed-type fault (keeping 0) will be missed. However, if the inversion value of one bit of the ECC is stored in the memory, it becomes possible to detect the error without missing it. Therefore, when a fixed-type fault (keeping 0 or 1) is assumed, the probability (percentage) of missing a multi-bit error can be reduced by using an ECC (and a check bit) with a specific bit inversion value. That is, by reversing the value of a specific bit of the ECC generated from the data according to the ECC generation matrix and storing it in the memory, and by generating symptoms according to the ECC check matrix after reversing the value of a specific bit of the ECC read from the memory, the probability (percentage) of missing a multi-bit error can be reduced. This is due to the following reasons. The value of each bit of the ECC (and the check bit) used as the input of the symptom generation circuit in the ECC decoder circuit and the value of each bit of the read data are not independent; therefore, the total number of combinations of multi-bit errors caused by fixed-type faults (keeping 0 or 1) is reduced, and the number of multi-bit error misses and miscorrections is also reduced.

[0235] In Embodiments 1 to 4, for example, the detection performance of multi-bit errors caused by failures of the input / output terminals or processing circuits of the data signal system in the interface circuit for reading / writing the memory (as well as failures of the data input / output circuits within the memory) can be improved. However, the above-mentioned configuration for error detection can be used in other modes. For example, error detection can be performed by using a configuration that combines the following configurations: a configuration that performs processing by an ECC (and a check bit) attached for reading / writing data to the memory, and a configuration that performs processing by an EDC (error detection code) attached for data transmission in the internal bus of the SOC.

[0236] By the way, when ECC is added for reading / writing data to the memory, a dual redundant hardware configuration is adopted in some cases to prevent the functions of single error correction and double error detection from stopping normal operation due to a fault in the ECC decoder circuit. In this configuration, an additional ECC decoder circuit (for checking) is provided, and a comparator circuit checks whether the output signal of the original ECC decoder circuit matches the output signal of the additional ECC decoder circuit (for checking). Similarly, in the ECC encoder circuit, a dual redundant hardware configuration is adopted in some cases. In the above-mentioned embodiment, by adopting a configuration that additionally provides an ECC decoder circuit (for checking bits) and an ECC encoder circuit (for checking bits), an effect equivalent to dual redundant hardware will also be obtained to prevent the fault of the ECC decoder circuit or the ECC encoder circuit, but this configuration is different from the dual redundant hardware configuration.

[0237] The above description is directed to a configuration in which the encoder device and the decoder device are implemented by hardware circuits. However, some or all of the encoder device or some or all of the decoder device may be implemented in software by a program including instructions executed by a processor.

[0238] Various types of non-transient computer-readable media can be used to store the above-mentioned program, and it can be provided to the computer. Non-transient computer-readable media include various types of tangible storage media. Examples of non-transient computer-readable media include magnetic recording media (e.g., floppy disks, magnetic tapes, and hard disk drives), optical magnetic recording media (e.g., magneto-optical disks), CD-ROMs (read-only memory), CD-Rs, CD-R / Ws, semiconductor memories (e.g., mask ROMs, PROMs (programmable ROMs), EPROMs (erasable PROMs), flash ROMs, RAMs (random access memories)). The program can be provided to the computer via various types of transient computer-readable media. Examples of transient computer-readable media include electrical signals, optical signals, and electromagnetic waves. Transient computer-readable media can provide programs to the computer via wired communication paths (e.g., wires and optical fibers) or wireless communication paths.

[0239] As mentioned above, the present invention accomplished by the inventor is specifically described based on the embodiments. However, it goes without saying that the present invention is not limited to the embodiments as described above, and various changes can be made without departing from the scope of the present invention. For example, the number of bits of input data, ECC and check bits is an example, and the number of bits may be different from the number of bits mentioned in the above-mentioned embodiments.

[0240] Some or all of the embodiments may also be described as follows in the following additional descriptions; however, they are not limited to the following.

[0241] (Additional Note 1)

[0242] A data processing device, comprising:

[0243] Encoder devices; and

[0244] Decoder device,

[0245] The encoder device comprises:

[0246] a first encoder unit for generating an ECC capable of single error correction and double error detection by performing an operation according to a first ECC (Error Correction Code) generation matrix; and

[0247] a second encoder unit for generating an ECC capable of single error correction and double error detection by performing an operation according to a second ECC generation matrix obtained by permuting columns of the first ECC generation matrix,

[0248] A first encoder unit receives first data to generate a first ECC for the first data,

[0249] a second encoder unit receiving second data obtained by permuting bits of the first data to generate a second ECC for the second data,

[0250] The encoder device stores the first data, the first ECC, and the second ECC in a memory, and

[0251] The decoder device generates a notification signal indicating an error occurrence state of the first data based on the first data read from the memory, the first ECC, and the second ECC.

[0252] (Additional Note 2)

[0253] In the data processing device according to additional statement 1,

[0254] The decoder device comprises:

[0255] a first decoder unit for receiving a first bit string and generating a first determination signal indicating whether a correctable single-bit error exists in the first bit string and a second determination signal indicating whether two or more bit errors exist in the first bit string, the first bit string including the first data read from the memory and the first ECC;

[0256] a second decoder unit for receiving a second bit string, and generating a third determination signal indicating whether a correctable single-bit error exists in the second bit string and a fourth determination signal indicating whether a double-bit or more error exists in the second bit string, the second bit string including third data and the second ECC read from the memory, the third data being obtained by replacing bits of the first data read from the memory as in the second data; and

[0257] A notification unit is configured to generate the notification signal based on the first determination signal, the second determination signal, the third determination signal, and the fourth determination signal.

[0258] (Additional Note 3)

[0259] In the data processing device according to additional statement 2,

[0260] When only one of the first determination signal and the third determination signal indicates the presence of a correctable single-bit error, the notification unit generates the notification signal indicating that a bit string including the first data, the first ECC, and the second ECC read from the memory includes two or more bit errors.

[0261] (Additional Note 4)

[0262] In the data processing device according to additional statement 2,

[0263] When at least one of the second determination signal and the fourth determination signal indicates the presence of two or more bit errors, the notification unit generates the notification signal indicating that a bit string including the first data, the first ECC, and the second ECC read from the memory includes two or more bit errors.

[0264] (Additional Note 5)

[0265] In the data processing device according to additional statement 1,

[0266] The decoder device comprises:

[0267] a first symptom unit for generating a first symptom code according to the first data read from the memory and the first ECC, and generating a first flag indicating whether the first symptom code matches a bit pattern of any column of a first ECC check matrix including the first ECC generation matrix and a cell matrix, and a second flag indicating whether all bits of the first symptom code are 0;

[0268] a second syndrome unit for generating a second syndrome code based on third data and the second ECC read from the memory, and generating a third flag indicating whether the second syndrome code matches a bit pattern of any column of a second ECC check matrix including the second ECC generation matrix and a cell matrix, and a fourth flag indicating whether all bits of the second syndrome code are 0; and

[0269] a symptom checking unit for comparing the first sign and the third sign, and comparing the second sign and the fourth sign, and

[0270] The decoder device generates the notification signal based on the comparison result of the symptom checking unit.

[0271] (Additional Note 6)

[0272] In the data processing device according to additional statement 5,

[0273] the symptom check unit outputs a flag indicating that the first symptom code matches the bit pattern of the t-th column of the first ECC check matrix as a fifth flag only when the first flag indicates that the first symptom code matches the bit pattern of the t-th column of the first ECC check matrix (t is a positive integer indicating a column number corresponding to any column of the first ECC generation matrix included in the first ECC check matrix) and when the third flag indicates that the second symptom code matches the bit pattern of the t-th column of the second ECC check matrix, and

[0274] When the first flag indicates that the first symptom code matches the bit pattern of the sth column of the first ECC check matrix (s is a positive integer indicating the column number corresponding to any column of the unit matrix included in the first ECC check matrix), or when the third flag indicates that the second symptom code matches the bit pattern of the sth column of the second ECC check matrix, the symptom check unit outputs a flag indicating that the first symptom code matches the bit pattern of the sth column of the first ECC check matrix as the fifth flag.

[0275] (Additional Note 7)

[0276] In the data processing device according to additional statement 6,

[0277] The decoder device further comprises:

[0278] An error correction unit is configured to correct the unit error of the first data read from the memory based on the fifth flag.

[0279] (Additional Note 8)

[0280] In the data processing device according to additional statement 6,

[0281] the symptom checking unit outputs a sixth flag indicating that all bits of the first symptom code are 0 only when the second flag indicates that all bits of the first symptom code are 0 and when the fourth flag indicates that all bits of the second symptom code are 0, and

[0282] The decoder device further comprises:

[0283] A notification unit is configured to generate the notification signal based on a value of the fifth flag and a value of the sixth flag.

[0284] (Additional Note 9)

[0285] In the data processing device according to additional statement 1,

[0286] obtaining the second ECC generation matrix by rotating each column of the first ECC generation matrix, and

[0287] The second data is obtained by rotating each bit of the first data.

[0288] (Additional Note 10)

[0289] In the data processing device according to additional statement 1,

[0290] The second ECC generation matrix is ​​obtained by replacing a plurality of columns having the same value in predetermined rows in the first ECC generation matrix,

[0291] the encoder device stores in the memory the first data, all bits of the first ECC generated by the first encoder unit, and part of the bits of the second ECC generated by the second encoder unit,

[0292] The partial bits are obtained by an operation using rows other than the predetermined row in the second ECC generation matrix, and

[0293] The decoder device generates the notification signal based on partial bits of the first data, the first ECC, and the second ECC read from the memory.

[0294] (Additional Note 11)

[0295] A data processing device, comprising:

[0296] Encoder devices; and

[0297] Decoder device,

[0298] The encoder device comprises:

[0299] a check bit generating unit for generating q check bits by performing an operation according to a q-row submatrix of a first ECC generating matrix to generate a p-bit ECC (error correction code) capable of single error correction and double error detection (p and q are positive integers and q is less than p); and

[0300] an ECC generation unit for generating an r-bit ECC capable of single error correction and double error detection by performing an operation based on an r-row second ECC generation matrix (r=pq) from which q-row submatrices are removed as a submatrix of the first ECC generation matrix,

[0301] The ECC generating unit receives first data to generate an ECC for the first data,

[0302] The check bit generating unit receives the first data to generate a check bit for the first data,

[0303] The encoder device stores the first data, the ECC and the check bits in a memory,

[0304] The decoder device comprises:

[0305] a first symptom unit, configured to generate a first symptom code according to the first data read from the memory and the first ECC, and to generate a first flag indicating whether the first symptom code matches a bit pattern of any column of the r-row submatrix in an ECC check matrix including the first ECC generation matrix and a cell matrix, and a second flag indicating whether all bits of the first symptom code are 0;

[0306] a second syndrome unit for generating a second syndrome code according to the first data and the check bit read from the memory, and generating a third flag indicating whether the second syndrome code matches a bit pattern of any column of the q-row submatrix in the ECC check matrix including the first ECC generation matrix and the unit matrix; and

[0307] A notification unit is configured to compare the flag generated by the first symptom unit with the flag generated by the second symptom unit, and generate a notification signal indicating an error occurrence state of the first data based on the comparison result.

[0308] (Additional Note 12)

[0309] A data processing method comprises the following steps:

[0310] generating a first ECC (Error Correction Code) capable of single error correction and double error detection for first data by performing an operation according to a first ECC generation matrix;

[0311] generating a second ECC capable of single error correction and double error detection for second data obtained by permuting bits of the first data by performing an operation according to a second ECC generation matrix obtained by permuting columns of the first ECC generation matrix;

[0312] storing the first data, the first ECC, and the second ECC in a memory; and

[0313] A notification signal indicating an error occurrence state of the first data is generated based on the first data read from the memory, the first ECC, and the second ECC.

[0314] (Additional Note 13)

[0315] A data processing method comprises the following steps:

[0316] generating q-bit check bits by performing an operation according to a q-row submatrix of a first ECC generation matrix to generate a p-bit ECC (error correction code) capable of single error correction and double error detection (p and q are positive integers and q is less than p);

[0317] generating an r-bit ECC capable of single error correction and double error detection by performing an operation based on an r-row second ECC generation matrix (r=pq) as a submatrix of the first ECC generation matrix from which q-row submatrixes are removed;

[0318] storing the first data, the ECC and the check bits in a memory;

[0319] The decoder device comprises:

[0320] generating a first symptom code according to the first data read from the memory and the first ECC, and generating a first flag indicating whether the first symptom code matches a bit pattern of any column of the r-row submatrix in an ECC check matrix including the first ECC generation matrix and a unit matrix, and a second flag indicating whether all bits of the first symptom code are 0;

[0321] generating a second symptom code according to the first data and the check bits read from the memory, and generating a third flag indicating whether the second symptom code matches a bit pattern of any column of the q-row submatrix in the ECC check matrix including the first ECC generation matrix and the unit matrix;

[0322] comparing a flag generated based on the first symptom code with a flag generated based on the second symptom code; and

[0323] A notification signal indicating an error occurrence state of the first data is generated based on the comparison result.

Claims

1. A data processing device, comprising: Encoder device; and Decoder device, The encoder device comprises: a first encoder unit for generating an ECC capable of single error correction and double error detection by performing an operation according to a first ECC (Error Correction Code) generation matrix; and a second encoder unit for generating an ECC capable of single error correction and double error detection by performing an operation according to a second ECC generation matrix obtained by permuting columns of the first ECC generation matrix, wherein the first encoder unit receives first data to generate a first ECC for the first data, wherein the second encoder unit receives second data obtained by permuting bits of the first data to generate a second ECC for the second data, wherein the encoder device stores the first data, the first ECC and the second ECC in a memory, and wherein the decoder device determines the presence of an error in the first data based on 1) the first data and the first ECC read from the memory, and 2) data obtained by replacing the first data read from the memory and the second ECC read from the memory, and generates a notification signal indicating the occurrence status of an error in the first data based on the result of the determination.

2. The data processing device according to claim 1, in, The decoder device comprises: a first decoder unit for receiving a first bit string and generating a first determination signal indicating whether a correctable single-bit error exists in the first bit string and a second determination signal indicating whether two or more bit errors exist in the first bit string, the first bit string including the first data read from the memory and the first ECC; a second decoder unit for receiving a second bit string, and generating a third determination signal indicating whether a correctable single-bit error exists in the second bit string, and a fourth determination signal indicating whether a two-bit or more error exists in the second bit string, the second bit string including third data and the second ECC read from the memory, the third data being obtained by replacing bits of the first data read from the memory as in the second data; and A notification unit is configured to generate the notification signal based on the first determination signal, the second determination signal, the third determination signal, and the fourth determination signal.

3. The data processing device according to claim 2, in, When only one of the first determination signal and the third determination signal indicates the presence of a correctable single-bit error, the notification unit generates the notification signal indicating that a bit string including the first data read from the memory, the first ECC, and the second ECC includes two or more bit errors.

4. The data processing device according to claim 2, in, When at least one of the second determination signal and the fourth determination signal indicates the presence of two or more bit errors, the notification unit generates the notification signal indicating that a bit string including the first data, the first ECC, and the second ECC read from the memory includes two or more bit errors.

5. The data processing device according to claim 1, in, The decoder device comprises: a first symptom unit for generating a first symptom code according to the first data read from the memory and the first ECC, and generating a first flag indicating whether the first symptom code matches a bit pattern of any column of a first ECC check matrix including the first ECC generation matrix and a cell matrix, and a second flag indicating whether all bits of the first symptom code are 0; a second syndrome unit for generating a second syndrome code based on third data and the second ECC read from the memory, and generating a third flag indicating whether the second syndrome code matches a bit pattern of any column of a second ECC check matrix including the second ECC generation matrix and a cell matrix, and a fourth flag indicating whether all bits of the second syndrome code are 0; and a symptom checking unit for comparing the first sign and the third sign, and comparing the second sign and the fourth sign, and Wherein, the decoder device generates the notification signal based on the comparison result of the symptom checking unit.

6. The data processing device according to claim 5, in, the symptom check unit outputs a flag indicating that the first symptom code matches the bit pattern of the t-th column of the first ECC check matrix as a fifth flag only when the first flag indicates that the first symptom code matches the bit pattern of the t-th column of the first ECC check matrix and when the third flag indicates that the second symptom code matches the bit pattern of the t-th column of the second ECC check matrix, wherein t is a positive integer indicating a column number corresponding to any column of the first ECC generation matrix included in the first ECC check matrix, and Wherein, when the first flag indicates that the first symptom code matches the bit pattern of the sth column of the first ECC check matrix, or when the third flag indicates that the second symptom code matches the bit pattern of the sth column of the second ECC check matrix, the symptom check unit outputs a flag indicating that the first symptom code matches the bit pattern of the sth column of the first ECC check matrix as the fifth flag, where s is a positive integer indicating the column number corresponding to any column of the unit matrix included in the first ECC check matrix.

7. The data processing device according to claim 6, in, The decoder device further comprises: An error correction unit is configured to correct a unit error of the first data read from the memory based on the fifth flag.

8. The data processing device according to claim 6, in, the symptom checking unit outputs a sixth flag indicating that all bits of the first symptom code are 0 only when the second flag indicates that all bits of the first symptom code are 0 and when the fourth flag indicates that all bits of the second symptom code are 0, and Wherein, the decoder device further comprises: A notification unit is configured to generate the notification signal based on a value of the fifth flag and a value of the sixth flag.

9. The data processing device according to claim 1, in, The second ECC generation matrix is ​​obtained by rotating each column of the first ECC generation matrix, wherein the second data is obtained by rotating each bit of the first data, and The rotation of the first ECC generation matrix corresponds to the rotation of the first data.

10. The data processing device according to claim 1, in, The second ECC generation matrix is ​​obtained by replacing a plurality of columns having the same value in predetermined rows in the first ECC generation matrix, wherein the encoder device stores in the memory the first data, all bits of the first ECC generated by the first encoder unit, and part of the bits of the second ECC generated by the second encoder unit, wherein the partial bits are obtained by an operation using rows other than the predetermined rows in the second ECC generation matrix, and The decoder device generates the notification signal based on partial bits of the first data, the first ECC, and the second ECC read from the memory.

11. A data processing device, comprising: Encoder device; and Decoder device, The encoder device comprises: a check bit generation unit for generating q check bits by performing an operation according to a q-row submatrix of a first ECC generation matrix to generate a p-bit ECC (error correction code) capable of single error correction and double error detection, wherein p and q are positive integers and q is less than p; and an ECC generating unit, configured to generate an r-bit ECC capable of single error correction and double error detection by performing an operation based on an r-row second ECC generating matrix as a submatrix of the first ECC generating matrix from which q-row submatrices are removed, wherein r=pq, The ECC generating unit receives first data to generate an ECC for the first data, The check bit generating unit receives the first data to generate a check bit for the first data. wherein the encoder device stores the first data, the ECC and the check bit in a memory, Wherein, the decoder device comprises: a first symptom unit, configured to generate a first symptom code according to the first data read from the memory and the first ECC, and to generate a first flag indicating whether the first symptom code matches a bit pattern of any column of an r-row submatrix in an ECC check matrix including the first ECC generation matrix and a cell matrix, and a second flag indicating whether all bits of the first symptom code are 0; a second syndrome unit for generating a second syndrome code according to the first data and the check bit read from the memory, and generating a third flag indicating whether the second syndrome code matches a bit pattern of any column of the q-row submatrix in the ECC check matrix including the first ECC generation matrix and the unit matrix; and A notification unit is configured to compare the flag generated by the first symptom unit with the flag generated by the second symptom unit, and generate a notification signal indicating an error occurrence state of the first data based on the comparison result.

12. A data processing method comprising the following steps: By performing an operation according to a first ECC (error correction code) generation matrix, generating a first ECC capable of single error correction and double error detection for the first data; generating a second ECC capable of single error correction and double error detection for second data obtained by permuting bits of the first data by performing an operation according to a second ECC generation matrix obtained by permuting columns of the first ECC generation matrix; storing the first data, the first ECC, and the second ECC in a memory; determining the presence of an error in the first data based on 1) the first data and the first ECC read from the memory, and 2) data obtained by replacing the first data read from the memory and the second ECC read from the memory; as well as Based on a result of the determination, a notification signal indicating an occurrence status of an error of the first data is generated.

Citation Information

Patent Citations

  • Data processing device and data processing method

    JP2019109806A

  • Apparatus and Method for Correcting at least one Bit Error within a Coded Bit Sequence

    CN104393878A

  • Data processing apparatus

    CN104765650A