Abstract:
The present invention includes an error correction circuit with a data memory, a control circuit, a parity memory, and a recorder. The data memory is configured to receive and store a set of data. The control circuit is configured to receive the set of data and to generate parity bits in response thereto. A parity memory is coupled to the control circuit and configured to receive and hold parity bits. The control circuit is further configured to combine the parity bits from the parity memory with the set of data from the data memory to determine whether an error occurred in the set of data. The recorder is coupled to the control circuit and configured to record an indication of whether an error occurred in the set of data.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS  
       [0001]     This Utility Patent Application is related to U.S. patent application Ser. No. ______ filed on even date herewith entitled, “OPTIMIZED TESTING OF ON-CHIP ERROR CORRECTION CIRCUIT,” having Docket Number 2005P50752US/1331.213.101, commonly assigned to the same assignee as the present invention, and hereby incorporated by reference.  
       BACKGROUND  
       [0002]     The present invention relates to an error correction circuit and method. In particular, a system and method are provided for an error correction circuit used in association with a dynamic random access memory (DRAM) system.  
         [0003]     Memory systems, such as DRAM systems, have large memory arrays with large numbers of individual memory cells. During fabrication of the memory arrays, or in subsequent packaging of the memory, it is possible for single cell failures to be introduced in the memory. In some cases, introduction of such failures can result in the need to scrap the entire package afterwards.  
         [0004]     Consequently, many memory systems utilize error correction circuits (ECC) to compensate for single cell failures in memory arrays. ECC generate parity codes and utilize a parity memory to detect, and in some cases correct, errors or failures in memory cells. In some cases, such ECC are built directly onto a memory chip in order to achieve superior quality for a customer.  
         [0005]     Typically, memory chips are tested after fabrication and assembly to determine whether they are operating properly. In cases where ECC are integrated into the memory chip, testing of these memory systems can become cumbersome. If the testing must also test whether the ECC has corrected errors or failures in memory cells, extra testing time and processing resources are sometimes needed.  
         [0006]     For these and other reasons, there is a need for the present invention.  
       SUMMARY  
       [0007]     One aspect of the present invention provides an error correction circuit including a data memory, a control circuit, a parity memory, and a recorder. The data memory is configured to receive and store a set of data. The control circuit is configured to receive the set of data and to generate parity bits in response thereto. A parity memory is coupled to the control circuit and configured to receive and hold parity bits. The control circuit is further configured to combine the parity bits from the parity memory with the set of data from the data memory to determine whether an error occurred in the set of data. The recorder is coupled to the control circuit and configured to record an indication of whether an error occurred in the set of data. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0008]     The accompanying drawings are included to provide a further understanding of the present invention and are incorporated in and constitute a part of this specification. The drawings illustrate the embodiments of the present invention and together with the description serve to explain the principles of the invention. Other embodiments of the present invention and many of the intended advantages of the present invention will be readily appreciated, as they become better understood by reference to the following detailed description. The elements of the drawings are not necessarily to scale relative to each other. Like reference numerals designate corresponding similar parts.  
         [0009]      FIG. 1  illustrates a tester coupled to a memory chip with error correction circuitry.  
         [0010]      FIG. 2  illustrates a portion of data memory system including an error correction circuit in accordance with one embodiment of the present invention.  
         [0011]      FIG. 3  is a table illustrating an error correction code used in a data memory system.  
     
    
     DETAILED DESCRIPTION  
       [0012]     In the following Detailed Description, reference is made to the accompanying drawings, which form a part hereof, and in which is shown by way of illustration specific embodiments in which the invention may be practiced. In this regard, directional terminology, such as “top,” “bottom,” “front,” “back,” “leading,” “trailing,” etc., is used with reference to the orientation of the Figure(s) being described. Because components of embodiments of the present invention can be positioned in a number of different orientations, the directional terminology is used for purposes of illustration and is in no way limiting. It is to be understood that other embodiments may be utilized and structural or logical changes may be made without departing from the scope of the present invention. The following detailed description, therefore, is not to be taken in a limiting sense, and the scope of the present invention is defined by the appended claims.  
         [0013]      FIG. 1  illustrates a block diagram of memory system  10  in accordance with one embodiment of the present invention. Memory system  10  includes memory chip  12 , which is illustrated coupled to memory tester  14 . Memory chip  12  includes error correction circuit (ECC)  16  built directly onto the memory chip  12 . In one embodiment, memory chip  12  is a dynamic random access memory (DRAM) chip.  
         [0014]     In operation, tester  14  is used to test operability of memory chip  12 . Typically, during a test pass, data is written to and then read from the various memory arrays within memory chip  12 . Tester  14  can then determine the operability of the memory chip  12  after the test pass to determine whether or not there were failures within memory chip  12 .  
         [0015]     In one embodiment, ECC  16  uses so-called Hamming codes to detect and correct errors internally to memory chip  12 . During a write operation, DQ data from the DQ bus is received in memory chip  12  and stored in a main memory array. Control circuitry within ECC  16  also calculates parity bits from this DQ data using exclusive or (“XOR”) logic functions. These parity bits are then stored within a separate parity memory array. Then, during a read operation, this stored parity data is combined with the corresponding main data read from the main memory array (again via XOR gates) to detect and correct errors in the main data before it is sent to the DQ bus.  
         [0016]     ECC  16  presents challenges to tester  14 . For example, the information stored in the parity memory array is not typically externally accessible via the DQ bus. Thus, tester  14  does not have direct access to the parity memory array in order to test its functionality. Also, if tester  14  must use additional test time in order to separately test the parity memory array, a memory chip that includes an integrated ECC will have a disadvantage relative to a memory chip that does not include an integrated ECC.  
         [0017]     In this way, if ECC  16  has corrected errors in the main data, these corrections can be transparent to tester  14 . Thus, when memory chip  12  passes a test run by tester  14 , it would not be known whether chip  12  passed because of the intervention of ECC  16 , or whether it passed without any intervention from ECC 16 .  
         [0018]      FIG. 2  illustrates a portion of a memory chip, such as memory chip  12  in  FIG. 1 , in accordance with one embodiment of the present invention. Memory chip  12  includes data memory  32 , parity memory  34 , ECC control circuit  36 , and ECC register  38 . Data memory  32  and ECC control circuit  36  are illustrated coupled to a DQ bus.  
         [0019]     In operation, memory chip  12  may be tested, such as with tester  14  in  FIG. 1 . During a write operation, DQ data from the DQ bus is received in memory chip  12  and stored in memory array  32 . ECC control circuitry  36  also received the DQ data and calculates parity bits from this DQ data. In one embodiment, the parity bits are calculated using XOR functions. These parity bits are then stored within parity memory array  34 .  
         [0020]     During a read operation, the parity data stored within parity memory array  34  is combined with the corresponding main data read from main memory array  32  in order to detect and correct errors in the main data before it is sent back onto the DQ bus. In one embodiment, the combination of the parity data and main data is also accomplished using XOR gates.  
         [0021]     For most applications, the width of the DQ bus is driven by the application or user to be only as wide as needed for driving the main data. Thus, there will not typically be enough width to drive both the main data and any generated parity data at the same time on the DQ bus. For example, in an application where the DQ bus is eight bits wide, it will not be possible to drive both eight bits of data and four additional parity bits at once. In most applications, it would add unreasonable overhead to add width to the DQ bus in order to simultaneously drive main data and parity data.  
         [0022]     In this way, as illustrated in the portion of memory chip  12  in  FIG. 2 , a tester does not have direct access to parity memory  34  in order to determine its operability during testing. In accordance with one embodiment of the invention, however, ECC register  38  is provided coupled to ECC control circuit  36  and is configured to collect ECC corrected and un-corrected results.  
         [0023]     In this way, when a test is performed in one test pass, such that data is written and read via the DQ bus, ECC control circuit  36  generates parity bits as described. During this same test pass, ECC register  38  also monitors and records the occurrence of any correction events. In this way, ECC register  38  stores an ECC flag. This ECC register  38  is an on-chip register, which can then be read via a special test mode. In one embodiment, ECC register  38  is coupled to the DQ bus for reading during the special test mode.  
         [0024]     In one embodiment, for each read operation performed, the ECC flag in ECC register  38  is checked. If an error is detected and corrected, the ECC flag in ECC register  38  is set to “fail”. Each test item is performed on memory chip  12  as it would be for a non-ECC memory chip. At the end of each test (or wherever desired) the ECC flag can be read and ECC register  38  can be reset to “pass”, such that it is ready for collection of the next test result.  
         [0025]     In this way, with ECC register  38  each test item performed by a tester on the memory chip obtains three possible outcomes. In a first instance where no errors occur, the tester will indicate that data memory  32  is a “pass” and the ECC flag will also indicate a “pass”. In a second instance where an error in data memory  32  does occur, but is successfully corrected by ECC control circuit  36 , the tester will indicate that data memory  32  is a “pass” and the ECC flag will indicate a “fail”. In a third instance where an error in data memory  32  does occur, and is not corrected by ECC control circuit  36 , the tester will indicate that data memory  32  is a “fail” and the ECC flag will also indicate a “fail”. It may be noted that there could be an instance where the ECC flag is “pass” and the tester indicates that data memory  32  is a “fail”. In this case, the ECC control circuit  36  may be malfunctioning or the ECC control circuit  36  may have corrected so many errors that data could not adequately be corrected.  
         [0026]     Consequently, a memory chip with an ECC including an ECC register integrated on the chip, can be tested in essentially the same way as a memory chip that does not have an on-chip ECC. The results of the testing will not only determine whether there were internal memory fails, but also determine whether there were internal fails that were ECC-corrected. In this way, the test results allow the tester to balance between increasing yield and increasing quality of the tested chips.  
         [0027]     For example, in one extreme case all die that pass external testing can be shipped, whether they have internal, ECC-correctable fails or not (increased yield, decreased quality). In another extreme, all die with any fails will be rejected and not shipped, whether they are ECC-correctable or not (decreased yield, increased quality). In other examples, a selection is made between the two extremes such that full flexibility is utilized to decide on a test-by-test basis, so that quality and cost can be tailored to individual customer&#39;s needs.  
         [0028]     In an alternative embodiment, a variety of components can be used in place of ECC register  38 . For example, in one embodiment ECC register  38  is replaced by a counter. In that case, the counter records the number of correction events for later read-out via a test mode. In yet other embodiments, more circuitry can be provided to log and output the entire result of the ECC control circuit. In this way, not only would it be known that ECC correction occurred, but the position where the fail occurred would also be recorded and collected in the special test mode.  
         [0029]     With the ECC circuit of the present invention, full flexibility for quality trade-offs of devices with on-chip ECC is achieved, while still maintaining virtually the same test time as for a non-ECC device.  
         [0030]     One example of an application in a test on a memory chip  12  is illustrated with reference to the Hamming code in  FIG. 3 . Essentially, the Hamming code is configured to detect and correct bit errors by inserting error correction or parity bits into a data stream, thereby increasing the overall number of bits. The parity bits can be examined after data is extracted to determine whether a bit error has occurred.  
         [0031]     The Hamming code illustrated in  FIG. 3 , can be considered a modified (15,11) Hamming code or an (8,12) Hamming code. In this case, an 11-bit data stream has four parity bits inserted to bring the total number of bits to 15. However, since most data streams have 8 bits, 3 of the eleven are not used (indicated by the “X” in the columns), and thus, the code will be referred to as an (8,12) Hamming code.  
         [0032]     The second row in the table of the (8,12) Hamming code lists the bit locations  1 - 15 . As indicated, after insertion of the four parity bits, there are 15 total bit locations. The first row in the table lists the bit definitions. Data bits from an 8-bit data stream are indicated with D 0 , D 1 , D 2 , D 3 , D 4 , D 5 , D 6 , and D 7 . The three unused data bits are indicated with an “X”. The four parity bits are indicated with P 0 , P 1 , P 2 , and P 3 . As may be apparent, the parity bits are located in each of the locations that are powers of 2, or at locations 2 n , such that they will be in positions  1 ,  2 ,  4 , and  8 .  
         [0033]     A general ECC algorithm within EEC control circuit  36  works according to this table in  FIG. 3 . Each parity bit calculates the parity for some of the bits in the code word. The position of the parity bit determines the sequence of bits that it alternatively checks and skips. For P 1 , the sequence of bits will be to check every other one bit location, that is, check one, skip one, check one skip one, etc. In the third row of the table, a “1” is placed under the data bit that is checked with parity bit P 1 . For P 3 , the sequence of bits will be to check every other two bit locations, that is, check two, skip two, check two skip two, etc. Again, in the fourth row of the table, a “1” is placed under the data bit that is checked with parity bit P 3 . For P 4 , the sequence of bits will be to check every other four bit locations, that is, check four, skip four, check four skip four, etc. Again, in the fifth row of the table, a “1” is placed under the data bit that is checked with parity bit P 4 . Finally, for P 0 , the sequence of bits will be to check every other eight bit locations, that is, check eight, skip eight, check eight skip eight, etc. In the fifth row of the table, a “1” is placed under the data bit that is checked with parity bit P 0 .  
         [0034]     For a write operation, the parity bit is then set to 1 if the total number of ones in the sequence of positions is odd and will be set to 0 is the total number of ones in the sequence of positions is even. This may be accomplished by performing an XOR operation on the data bits in the sequence associated with each parity bit (excluding the parity bit from the XOR operation). The result of the XOR operation determines the value of the associated parity bit.  
         [0035]     Then, for a read operation, a XOR operation of the data bits along with the associated parity bit determines whether there is bit failure. If the result of the XOR operation is zero, then there was no bit failure. Where the result is not zero, however, it indicates a failure or error in the bit position associated with the parity bit.  
         [0036]     In one embodiment, when an error code of zero indicates no fail, the ECC flag in ECC register  38  is not set. When an error code different from zero occurs, however, this triggers the correction of one of the DQ data bits, and the ECC flag in ECC register  38  will be set to “fail” for later read-out. In another embodiment, the parity bit that indicates the bit position where a failure or error occurred is stored for later retrieval.  
         [0037]     Although specific embodiments have been illustrated and described herein, it will be appreciated by those of ordinary skill in the art that a variety of alternate and/or equivalent implementations may be substituted for the specific embodiments shown and described without departing from the scope of the present invention. Thus, this application is intended to cover any adaptations or variations of the specific embodiments discussed herein. Therefore, it is intended that this invention be limited only by the claims and the equivalents thereof.