Abstract:
A method for error detection and correction of a memory, preferably a flash memory that utilizes existing on-chip circuitry to implement the error correction and detection process is disclosed. The present invention is able to detect and correct single bit errors, while detecting multi-bit errors in data storage circuitry. The method is embodied in a software routine, which when actively operative, uses a multiply accumulate circuit (MAC) and on chip cache located on memory controller circuitry for error correction of errors incurred through the storage of data to a storage device.

Description:
FIELD OF THE INVENTION 
   The present invention relates to the field of testing semiconductor memories. More particularly, the present invention relates to a testing methodology for a storage device that uses multiply accumulate and compare techniques for memory error detection and correction to optimize testing and usage of a storage device. 
   BACKGROUND 
   Over the years, multitudes of memory testing methods have been developed. One such method makes use of a microprocessor coupled to a flash memory. The flash memory is programmed on a word-by-word basis. After each programming operation, the word just programmed is verified by the microprocessor. The verification operation is initiated by the microprocessor writing a program verify command into a command register of the flash memory. The program verify operation stages the flash memory for verification of the word last programmed. The flash memory applies an internally-generated margin voltage to the word. The microprocessor then performs a read cycle to output the word from the flash memory to the microprocessor. The microprocessor then compares the data word read from the flash memory to the data word that the microprocessor intended to program into the flash memory. A successful comparison between the programmed word and the time data means that the word was successfully programmed. If the data was not successfully programmed, then the program and verify steps are repeated with a limit of, for example, 25 attempts to program the word. 
   A secondary method of flash memory verification includes placing a flash memory system into a special programming mode. The special programming mode includes programming a plurality of words, by means of hashing, into the memory without the memory performing internal program verification. Hashing is a scheme for providing rapid access to data items which are distinguished by some key. A key is a value used to identify a record in a database, derived by applying some fixed function to the record, and is often simply one of the fields. The key may also be obtained by applying some function, e.g. a hash function, to one or more of the fields, and each data item to be stored is associated with a key. 
   The special programming mode allows the host processor to program a series of words by means of hashing and then store the words with their keys in the memory. Copies of the hash values are stored in the processor. A comparison is made between the memory stored hash values and the processor stored hash values to see whether the hash values are the same or different. The special programming mode is then exited and internal program verification by the memory is enabled. The comparison of the hash values allows the system to detect if the words were stored properly. 
   These and other methods of prior art memory verification tend to have the drawback that, while storage errors can be recognized (through the use of special circuits not typically found in processors), they can not be corrected. Furthermore, prior art memory correction systems and methods require separate error detection circuitry to be implemented, which can often be costly and take up valuable circuit area. 
   SUMMARY OF THE INVENTION 
   In accordance with preferred embodiments, an error detection and correction method that includes at least: receiving a series of bit data groupings, D n ; and generating a first value S 0 , determined by a relationship 
             (       S   0     =       ∑     i   =   0       n   -   1       ⁢           ⁢       X   i     *     D   i           )     ,         
wherein n preferably includes a total number of bit data groupings, D i  preferably represents each bit data grouping of the bit data groupings D n  is provided. Further included in a preferred embodiment, X i  is preferably a weighted coefficient; and storing the bit data groupings, D n , and the first value, S 0  are steps included in the preferred method, wherein the weighted coefficient, X i , is preferably determined by a relationship [(k*i)+A], in which “k” comprises a predetermined constant, “i” comprises an integer index value increasing from 0→n−1, and in which “A” comprises a predetermined offset value. Also preferably included the preferred embodiment is a step of storing a copy of the first value, S 0 , as a second value, S 1 . It is recognized other methods may be used to guarantee a known good copy of S 0 .
 
   In an alternate preferred embodiment, a device that includes at least: a circuit configured to receive a series of bit data groupings, D n ; a multiply accumulator configured to generate a first value S 0 ; and a storage circuit configured to store the bit data groupings, D n , and the first value, S 0  is provided. 
   In the alternate preferred embodiment, S 0  is preferably determined by a relationship 
             (       S   0     =       ∑     i   =   0       n   -   1       ⁢           ⁢       X   i     *     D   i           )     ,         
wherein n comprises a total number of bit data groupings, D i  comprises each bit data grouping of the bit data groupings D n , and X i  comprises a weighted coefficient preferably determined by the relationship [(k*i)+A], wherein “k” comprises a predetermined constant, “i” comprises an integer index value increasing from 0→n−1, and in which “A” comprises a predetermined offset value, and within the alternate preferred embodiment the storage circuit is preferably configured to store a copy of the first value, S 0 , as a second value, S 1 .
 
   In accordance with an alternative preferred embodiment, an error detection and correction method includes at least the steps of: receiving a series of bit data groupings, D n ; generating a first value S 0 ; and storing the bit data groupings, D n , and the first value, S 0 . For the alternative preferred embodiment, S 0  is preferably determined by a relationship 
             (       S   0     =         ∑     i   =   0       n   -   1       ⁢           ⁢       C   i     *     Wt   ⁡     (     B   i     )           +     G   ⁡     (     B   i     )           )     ,         
wherein “n” comprises a total number of bit data groupings, “i” comprises an integer index value increasing from 0→n−1, Wt(B i ) represents the weight of the data being acted upon, G(B i ) represents the sum of the bit positions, and “C i ” comprises an offset value.
 
   In further accordance with the alternative preferred embodiment, “C i ” is initially set to a predetermined offset value “A”, and subsequently, C i  is preferably increased through each iteration of S 0  calculation, by the generating function (C i =C i +k*m), where “m” is the total number of bits in the selected data grouping, where Wt(B i ) is selected from values stored in a lookup table and corresponds to the bit weight of the received data stream, and G(B i ) is determined by the relationship, 
               G   ⁡     (     B   i     )       ⁢   k   *       ∑     j   =   0       m   -   1       ⁢           ⁢     (       b     (     i   ,   j     )       *   j     )         ,         
where “j” is a positive index value, “m” is the total number of bits in the selected data grouping, and b (i,j)  corresponds to the bit value in the bit position, and “k” comprises a predetermined constant.
 
   In accordance with an additional preferred embodiment, a device is provided that preferably includes at least: a circuit configured to receive a series of bit data groupings, D n ; a multiply accumulator configured to generate a first value S 0 ; and a storage circuit configured to store the bit data groupings, D n , and the first value, S 0 . S 0  is preferably determined by a relationship 
             (       S   0     =         ∑     i   =   0       n   -   1       ⁢           ⁢       C   i     *     Wt   ⁡     (     B   i     )           +     G   ⁡     (     B   i     )           )     ,         
wherein “n” comprises a total number of bit data groupings, “i” comprises an integer index value increasing from 0→n−1, Wt(B i ) represents the weight of the data being acted upon, G(B i ) represents the sum of the bit positions, and “C i ” comprises an offset value.
 
   For the additional preferred embodiment, “C i ” is initially set to a predetermined offset value “A”, and subsequently, C i  is preferably increased through each iteration of S 0  calculation, by a preferred generating function (C i =C i +k*m), where “m” is the total number of bits in the selected data grouping, where Wt(B i ) is selected from values stored in a lookup table and corresponds to the bit weight of the received data stream. G(B i ) is preferably determined by the relationship, 
               G   ⁡     (     B   i     )       =     k   *       ∑     j   =   0       m   -   1       ⁢     (       b     (     i   ,   j     )       *   j     )           ,         
where “j” is a positive index value, “m” is the total number of bits in the selected data grouping, and b (i,j)  corresponds to the bit value in the bit position, and said weighted coefficient, X i , is determined by [(k*i)+A], wherein “k” comprises a predetermined constant, “i” comprises an integer index value increasing from 0→n−1, and in which “A” comprises a predetermined offset value. Of course G(B i ) may be stored in a look up table.
 
   These and various other features and advantages which characterize the claimed invention will be apparent from reading the following detailed description and a review of the associated drawings. 

   
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The present invention is illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements and in which: 
       FIG. 1  is a schematic of the circuitry utilized in the present invention. 
       FIG. 2  is a block diagram illustrating the initial calculation and storage of the data and check values. 
       FIG. 3  is a block diagram illustrating the receiving of the stored data symbols, the generation of S 2 , and the determination of whether received S 0  and S 1  are equivalent. 
       FIG. 4  is a block diagram illustrating the steps taken if S 0  and S 1  were equivalent. 
       FIG. 5  is a block diagram illustrating the steps taken if S 0  and S 1  were determined to not be equivalent. 
   

   DETAILED DESCRIPTION 
   It will be readily understood that elements of the present invention, as generally described and illustrated in the Figures herein, could be arranged and designed in a wide variety of different configurations and may be presented in either software or hardware implementations. 
   Flash memory presents one environment in which the present invention has been found useful. Flash is normally written in blocks of data. A group of bytes are sent to the flash by the micro processor. The flash stores the group in one operation. For example, in a preferred embodiment, a block of data, say 512 one byte readings, collected from, for example, an analog to digital converter, is used by a processor to generate a sum of say 4 bytes. The sum is appended to the end of the block, twice, creating a total stored block size of 520 bytes. All 520 bytes are passed to the flash. The flash stores all 520 bytes to its permanent memory in one operation. 
   Later, the data is read from the flash by requesting the particular block and sequentially reading all 520 bytes from the data block in the flash. The processors regenerates a new sum over the 512 bytes read from the flash, and compares it with the stored sums to see if any bits have changed. Upon comparing the stored sums to the newly generated sum, and utilizing the techniques described below, a single bit data error in the block can be detected and corrected, and a two bit error in the data block can be detected. 
   The following more detailed description of the embodiments of the system of the present invention, as represented in  FIG. 1  through  FIG. 5 , is not intended to limit the scope of the invention, as claimed, but is merely representative of certain embodiments of the system in accordance with the invention. 
   The embodiments of system in accordance with the invention will be best understood by reference to the drawings. Those of ordinary skill in the art will, of course, appreciate that various modifications may be made without departing from the essential characteristics of the invention. 
   The method for error detection and correction of a data storage device (also referred to herein as flash memory) ( 102 ), shown by circuitry ( 100 ) of  FIG. 1 , includes receiving a series of bit data groupings, D n , into a processing unit. One embodiment of the method is applicable to a flash memory. This embodiment will be discussed below with regards to the method of error detection and correction described below. 
   Data bit groupings, D n , are an array of data, typically grouped into bytes, however, the data groups can be of any size. For example, the data grouping may be a single bit, and the array of data is a block of data to which the bit is a member. The memory processor unit includes a multiply accumulator circuit (MAC) ( 103 ), a coprocessor (also referred to herein as processor) ( 101 ), and cache storage ( 104 ). In a preferred embodiment, the processor ( 101 ) and the MAC ( 103 ) cooperate to implement the methods described below. 
   Method flow chart ( 200 ) of  FIG. 2 , shows the bit data is received at process step ( 201 ) by a processor (such as  101 ) and is sent to a MAC (such as  103 ). At process step ( 202 ), the MAC generates a first value S 0 , determined by a relationship 
             (       S   0     =       ∑     i   =   0       n   -   1       ⁢       X   1     *     D   i           )     ,         
wherein “n” comprises the positive integer corresponding to the total number of elements in the array of bit data groupings to be processed, and D i  represents the i th  element in the array of data. When each data bit grouping is a single bit, “n” comprises the positive integer corresponding to the total number of single bits in the block of data to be processed, and D i  represents the i th  single bit in the data block.
 
   X i  comprises a weighted coefficient and represents a list of numbers that do not contain certain prime factors, e.g. 2 and 3. X i  is determined by the generating function [(k*i)+A], wherein “k” comprises a predetermined constant, “A” comprises a predetermined offset value, and “i” comprises an integer index value that indicates which data value is being acted upon in the array of data. The integer index value increases from 0→n−1. 
   One embodiment of this invention sets “k” to 6 and “A” to 7. For example, setting “k” to 6 and the offset value “A” to 7 would yield multipliers of 7, 13, 19, 25, . . . , [6*(n−1)+7]. Therefore, each weighted coefficient generated by the generating function is multiplied by the selected data, i.e., either the i th  element in the array of data, or the i th  single bit in the data block. 
   In another embodiment of this invention, where the bit grouping is a single bit; n is the number of bits in D, k=1, and A≧n, each bit is processed one at a time as the sum S 0  is accumulated. If one of the bits in D changes from 0 to 1 then S 0  will increase by A to (A+n−1) depending on which bit changes. If one of the bits in D changes from 1 to 0 then S 0  will decrease by (−A−n+1) to −A. If two bits in D change from 0 to 1 then S 0  will change from (2A+1) to (2A+2n−3). If two bits in D change from 1 to 0 then S 0  will change from (−2A−2n+3) to (−2A−1). If two bits in D change, one bit going from 1 to 0 and the other going from 0 to 1 then, the change in S 0  from (−n+1) to (n−1). It should be noted the change in S 0  can not be 0 for a 2 bit change. In addition if A≧n then these ranges do not over lap! Hence, it is possible to tell the difference between a one and two bit change just by the size of the change in S 0 . 
   The sum of these operations, i.e. 
             (       S   0     =       ∑     i   =   0       n   -   1       ⁢       X   1     *     D   i           )     ,         
is taken and constitutes, S 0 , which at process step ( 203 ), is stored with the bit data groupings, D n , in a memory (such as  102 ), and at process step ( 204 ), a copy of S 0 , is also stored in the memory as S 1 .
 
   As shown by process ( 300 ) of  FIG. 3 , after storage of D n , S 0 , and S 1  into a storage device (such as  102 ), a processor (such as  101 ) retrieves D n , S 0 , and S 1  from a memory (such as  102 ) at process step ( 301 ). Hereafter, received D n , S 0 , and S 1  will be designated D n ′, S 0 ′, and S 1 ′ for clarity. D n ′ is processed by a MAC (such as  103 ) to generate a check value S 2 , as shown by process step ( 302 ), which is determined by a relationship 
             (       S   2     =       ∑     i   =   0       n   -   1       ⁢       X   1     *     D   i           )     ,         
wherein “n” comprises the positive integer corresponding to the total number of elements in the array number of bit data groupings to be processed and D i  represents the i th  element in the array of data. Again, X i  is determined by the generating function [(k*i)+A], wherein “k” comprises a predetermined constant, “A” comprises a predetermined offset value, and “i” comprises an integer index value that indicates which data grouping is being acted upon in the array of data. The integer index value increases from 0→n−1.
 
   Continuing with process step ( 303 ), once S 2  has been generated, retrieved S 0 ′ and S 1 ′ are compared. At process step ( 304 ), if there is no difference between the retrieved S 0 ′ and S 1 ′ values, the process continues to flow process ( 400 ) of  FIG. 4 . At process step ( 305 ), if there is a difference between the retrieved S 0 ′ and S 1 ′ values, the process continues to flow process ( 500 ) of  FIG. 5 . 
   At process step ( 401 ) of flow process ( 400 ) of  FIG. 4 , a processor (such as  101 ) calculates a result between S 0 ′ and S 2  producing a difference ΔS, given by the equation ΔS=S 0 ′−S 2 . At Process step ( 402 ) the processor determines whether ΔS falls into a correctable or a non-correctable error range, by determining if no error occurred, a single bit error occurred, or if a multi-bit error occurred. The range of ΔS determines the number of errors that have occurred. If ΔS lies within the correctable range, i.e. a single bit error occurred, the processor begins an error correction algorithm at process step ( 403 ). 
   For single bit errors, the processes advances to process step ( 404 ). At process step ( 404 ), the error correction algorithm comprises; determining a bit position, B, of the data error by a relationship 
             B   =       (            Δ   ⁢           ⁢   S          -   A     )     k       ,         
in other words (for single bit errors), solving for B yields the position of the bit in error. The values of “A” and “k” are identical to those used in the calculation of X i  above, and accordingly, all of the rightmost zeros of ΔS have been discarded by the processor. The process of discarding the zeros identifies the bit position that is in error, while the remaining value determines which byte the bit is located in. Thus, this formula gives the bit location of the bit in error. However, if the bit grouping is a single bit, it is noted that the step of discarding the rightmost zeros of ΔS is not necessary, because there no rightmost zeros to discard. It is also noted that if B is not an integer, the error is not a single bit error, and process step ( 405 ) can not be relied on to reliably correct the error.
 
   At process step ( 405 ), this bit location is “flipped,” that is, the bit value of the bit in position B is increased when ΔS has a negative value, i.e. 0→1 ( 405 ). Likewise, the bit value of the bit in position B is decreased when ΔS has a positive value, i.e. 1→0. In this manner, a single bit error is corrected. After the bit correction, the data, D n , is transmitted from the processor at process step ( 406 ). 
   If however, at process step ( 402 ), ΔS is equal to zero then no error occurred and the data, D n , is transmitted from the processor at process step ( 407 ). If at process step ( 402 ), ΔS lies within a non-correctable error range, then a multi-bit error occurred and the processor issues a non-correctable error signal at process step ( 408 ). 
   Returning to  FIG. 3 , at process step ( 305 ) once S 2  has been generated and retrieved S 0 ′ and S 1 ′ have been compared, if there exists a difference between S 0 ′ and S 1 ′ when the received values are compared, the process proceeds to process step ( 501 ) of flow process ( 500 ) of  FIG. 5 . At process step ( 501 ) a processor (such as  101 ) generates a ΔS 1 , and at process step ( 511 ) the processor generates a ΔS 2 , wherein ΔS 1 =S 0 ′−S 2 , and ΔS 2 =S 1 ′−S 2 . 
   At process steps ( 502  and  512 ), the processor determines whether the respective ΔS values (ΔS 1  and ΔS 2 ) fall into a correctable or a non-correctable error range, by determining if no error occurred, a single bit error occurred, or if a multi-bit error occurred. The ranges of the respective ΔS values determine the number of errors that have occurred. If ΔS 1  or ΔS 2  is equal to zero then no error occurred the data, D n , is transmitted from the processor at process step ( 509 ). 
   At process steps ( 508  and  518 ), if ΔS 1  and ΔS 2  both fall into a non-correctable error range, or both fall into a correctable range, then a multi-bit error occurred and the processor issues a non-correctable error signal. If, however, ΔS 1  falls into a correctable error range and ΔS 2  falls into a non-correctable range, or if ΔS 2  falls into a correctable error range and ΔS 1  falls into a non-correctable range, a single bit error occurred and the processor begins an error correction algorithm at process step ( 503 ). 
   For the case where ΔS 1  falls into a correctable error range and ΔS 2  falls into a non-correctable range, at process step ( 504 ) a error correction algorithm commences by determining a bit position, B, of the data error by a relationship 
           B   =         (            Δ   ⁢           ⁢     S   1            -   A     )     k     .           
The values of “A” and “k” are identical to those used in the calculation of X i  above, and for this embodiment, ΔS, has had all its rightmost zeros discarded by the processor. The process of discarding the zeros identifies the bit position that is in error, while the remaining value determines which byte the bit is located in. Thus, this relationship,
 
           B   =       (            Δ   ⁢           ⁢     S   1            -   A     )     k           
gives the bit location of the bit in error. However, if the bit grouping is a single bit, it is noted that the step of discarding the rightmost zeros of ΔS is not necessary, because there no rightmost zeros to discard.
 
   At process step ( 505 ), the bit location determined at process step ( 504 ) is “flipped”, that is, the bit value of the bit in position B is increased when ΔS 1  has a negative value, i.e. 0→1, or the bit value of the bit in position B is decreased when ΔS 1  has a positive value, i.e. 1→0 at process step ( 505 ). In this manner, a single bit error is corrected. After the bit correction, the data, D n , is transmitted from the processor at process step ( 506 ). 
   At process step ( 513 ) ΔS 1  and ΔS 2  are analyzed to determine whether or not ΔS 2  falls into a correctable error range and ΔS 1  falls into a non-correctable range. If ΔS 2  falls into a correctable error range and ΔS 1  falls into a non-correctable range, the process continues with process step ( 514 ) with determining a bit position, B, of the data error, through use of an error correction algorithm in the form of a relationship 
           B   =         (            Δ   ⁢           ⁢     S   2            -   A     )     k     .           
In a preferred embodiment, the values of “A” and “k” are identical to those used in the calculation of X i  above, and all the rightmost zeros of ΔS 2  have been discarded by the processor.
 
   The process of discarding the zeros identifies the bit position that is in error, while the remaining value determines which byte the bit is located in. Thus, this formula gives the bit location of the bit in error. At process step ( 515 ), the bit location determined at process step ( 214 ) is “flipped” at process step ( 516 ), that is, the bit value of the bit in position B is increased when ΔS 2  has a negative value, i.e. 0→1, or the bit value of the bit in position B is decreased when ΔS 1  has a positive value, i.e. 1→0. In this manner, a single bit error is corrected. After the bit correction, the data, D n , is transmitted from the processor at process step ( 517 ). 
   A second embodiment of the invention makes use of lookup tables for accelerated generation of the data verification value, S 0 . It generates the same S 0  as the single bit grouping described above, with the advantage of processing the data in groups (bytes) instead of a bit at a time. One embodiment of the method is applicable to a flash memory. The flash memory embodiment will be discussed below with regard to the method of error detection and correction described below. 
   This embodiment for a method for error detection and correction of a memory (such as  102 ) of a storage circuit (such as  100 ), commences at process step ( 201 ) of flow process ( 200 ) of  FIG. 2  and includes receiving a series of bit data groupings, D n , into a memory processor unit (such as  100 ). The data bit groupings, D n , are an array of data, typically grouped into bytes, however, the data groups can be of any size, including a single bit. The memory processor unit includes a multiply accumulator circuit (MAC) (such as  103 ), a processor (such as  101 ), and cache storage (such as  104 ). The bit data groupings are processed by the MAC. At process step ( 202 ), the MAC generates a first value S 0 , determined by a relationship 
             (       S   0     =         ∑     i   =   0       n   -   1       ⁢       C   i     *   W   ⁢           ⁢     t   ⁡     (     B   i     )           +     G   ⁡     (     B   i     )           )     ,         
relationship wherein “n” comprises the total number of bit data groupings to be processed, “i” comprises an integer index value that corresponds with which data grouping is being acted upon in the data grouping array, Wt(B i ) represents the weight of the data grouping currently being acted upon, G(B i ) represents the sum of the bit positions, and “C i ” comprises a calculated offset value. “C i ” is initially set to a predetermined offset value “A.” Subsequently, C i  is increased through each iteration of S 0  calculation, by the generating function (C i =C i +k*m), where “m” is the total number of bits in the selected data grouping. In the instant embodiment, “k”, which comprises a predetermined constant just as in the prior embodiment, is set to 1. Thus, “k” disappears from the calculation of S 0 .
 
   Wt(B i ) is selected from values stored in the first lookup table, T 1 , and corresponds to the bit weight of the received data stream, that is, the number of bits equal to 1 in the data grouping. For example, Wt(B i ) for 10101010=4, while Wt(B i ) for 11111111=8. Therefore, the data grouping is examined and the weight value corresponding to the data grouping is retrieved from the first lookup table, T 1 , and applied by the MAC into the calculation of S 0 . The lookup table can, in one embodiment, be stored in the cache unit ( 104 ). 
   G(B i ) is extracted from a secondary lookup table T 2 , which can be, but is not necessarily stored in circuitry separate from T 1 . G(B i ) is determined by the relationship, 
               G   ⁡     (     B   i     )       =     k   *       ∑     j   =   0       m   -   1       ⁢     (       b     (     i   ,   j     )       *   j     )           ,         
where “j” is a positive index value, “m” is the total number of bits in the selected data grouping, and b (i,j)  corresponds to the bit value in the bit position. For example, G(B i ) for 10000001==&gt;k*(1*7+0*6+0*5+0*4+0*3+0*2+0*1+1*0)=k*7. A second example is, G(B i ) for 10000100==&gt;k*(1*7+0*6+0*5+0*4+0*3+1*2+0*1+0*0)=k*9. The secondary lookup table can, in one embodiment, be stored in the cache ( 104 ).
 
   At process step ( 203 ), the sum of the operations utilizing values stored in lookup tables for the data groupings constitutes S 0 . S 0  is stored with the bit data groupings, D n , in the storage circuit, and at process step ( 204 ) a copy of S 0 , is also stored in the storage circuit as S 1 . 
   Continuing with flow process ( 300 ) of  FIG. 3 , after storing D n , S 0 , and S 1  into the flash memory, the processor retrieves D n , S 0 , and S 1 , from the memory at process step ( 301 ). D n , S 0 , and S 1  will hereafter be designated D n ′, S 0 ′, and S 1 ′ for clarity. At process step ( 302 ), D n ′ is processed again by the MAC to generate a check value S 2 ′ determined by a relationship 
             (       S   2     =         ∑     i   =   0       n   -   1       ⁢       C   i     *   W   ⁢           ⁢     t   ⁡     (     B   i     )           +     G   ⁡     (     B   i     )           )     ,         
wherein “n”, “i”, and “C i ”, represent the same values as outlined above and used in the calculation of S 0 . Wt(B i ) and G(B i ) are extracted using the identical method to that described above, and are used in the calculation of S 2  as they were used above in the calculation of S 0 .
 
   Once S 2  has been generated, retrieved S 0 ′ and S 1 ′ are compared at process step ( 303 ). At process step ( 304 ), if there is no difference between the retrieved S 0 ′ and S 1 ′ values, the process proceeds to flow process  400 , of  FIG. 4 , and the processor calculates a result between S 0 ′ and S 2  producing a difference ΔS at process step ( 401 ), given by the equation ΔS=S 0 ′−S 2 . At process step ( 402 ), the processor determines whether ΔS falls into a correctable or a non-correctable error range, by determining if no error occurred, a single bit error occurred, or if a multi-bit error occurred. The range of ΔS determines the number of data errors present. If ΔS is equal to zero then no error occurred and the data, D n , is transmitted from the memory processor unit at process step ( 407 ). If ΔS falls into a non-correctable error range, a multi-bit error occurred and the processor issues a non-correctable error signal at process step ( 408 ). However, if ΔS falls into the correctable range, i.e. a single bit error occurred, the coprocessor begins an error correction algorithm at process step ( 403 ). 
   At process step ( 404 ), a bit position, B, is preferably determined by an error correction algorithm that comprises a determination of the data error by a relationship 
           B   =         (            Δ   ⁢           ⁢   S          -   A     )     k     .           
The values of “A” and “k” are identical to those used in the calculation of S 0  above, and since “k”=1, the equation becomes B=(|ΔS|−A). ΔS has its rightmost zeros discarded by the processor. At process step ( 405 ), the process of discarding the zeros identifies the bit position that is in error, while the remaining value determines which byte the bit is located in. Thus, this formula gives the bit location of the bit in error. This bit location is then “flipped,” that is, the bit value of the bit in position B is increased when ΔS has a negative value, i.e. 0→1. Likewise, the bit value of the bit in position B is decreased when ΔS has a positive value, i.e. 1→0. In this manner, a single bit error is corrected. After the bit correction, the data, D n , is transmitted from the processor unit at process step ( 406 ). Again it is noted that for the case that the bit grouping is a single bit, the step of discarding the rightmost zeros of ΔS is not necessary, because there no rightmost zeros to discard.
 
   Alternatively, once S 2  has been generated, and retrieved S 0 ′ and S 1 ′ have been compared at process step ( 303 ), if at process step ( 305 ) there exists a difference between S 0 ′ and S 1 ′ when the received values are compared, the process proceeds to flow process ( 500 ) of  FIG. 5 , and the processor generates both a ΔS 1  and a ΔS 2  at process steps ( 501  and  511 ) respectively, wherein ΔS 1 =S 0 ′−S 2  and ΔS 2 =S 1 ′−S 2 . At process steps ( 502  and  512 ) respectively, the processor determines whether the ΔS values fall into a correctable or a non-correctable error range, by determining if no error occurred, a single bit error occurred, or if a multi-bit error occurred. 
   The ranges of ΔS determine the number of errors that have occurred. If ΔS 1  or ΔS 2  is equal to zero then no error occurred and the data, D n , is transmitted from the processor at process step ( 509 ). At process steps ( 507  and  517 ) respectively, if ΔS 1  and ΔS 2  both fall into either a correctable or non-correctable error range, a multi-bit error occurred and the processor issues a non-correctable error signal at process steps ( 508 ,  518 ) respectively. 
   If, however, ΔS 1  falls into a correctable error range and ΔS 2  falls into a non-correctable range, or if ΔS 2  falls into a correctable error range and ΔS 1  falls into a non-correctable range, then a single bit error occurred and the coprocessor begins an error correction algorithm at respective process steps ( 503  and  513 ). 
   For the case where ΔS 1  falls into a correctable error range and ΔS 2  falls into a non-correctable range, at process step ( 504 ) the error correction algorithm consists of determining a bit position, B, of the data error by a relationship 
           B   =         (            Δ   ⁢           ⁢     S   1            -   A     )     k     .           
The values of “A” and “k” are identical to those used in the calculation of S 0  above, and so the equation becomes B=(|ΔS 1 |−A). At process step ( 505 ), ΔS 1  has its rightmost zeros discarded by the coprocessor. The process of discarding the zeros identifies the bit position that is in error, while the remaining value determines which byte the bit is located in. Thus, this formula gives the bit location of the bit in error. This bit location is then flipped, that is, the bit value of the bit in position B is increased when ΔS 1  has a negative value, i.e. 0→1. Likewise, the bit value of the bit in position B is decreased when ΔS 1  has a positive value, i.e. 1→0. In this manner, a single bit error is corrected, and after the bit correction, the data, D n , is transmitted from the memory by the processor at process step ( 506 ).
 
   For the case where ΔS 2  falls into a correctable error range and ΔS 1  falls into a non-correctable range, at process step ( 514 ), the error correction algorithm consists of determining a bit position, B, of the data error by a relationship 
           B   =         (            Δ   ⁢           ⁢     S   2            -   A     )     k     .           
The values of “A” and “k” are identical to those used in the calculation of S 0  above, so the equation becomes B=(|ΔS 2 |−A). At process step ( 515 ), ΔS 2  has its rightmost zeros discarded by the coprocessor. The process of discarding the zeros identifies the bit position that is in error, while the remaining value determines which byte the bit is located in. Thus, this formula gives the bit location of the bit in error. This bit location is “flipped”, that is, the bit value of the bit in position B is increased when ΔS 2  has a negative value, i.e. 0→1. Likewise, the bit value of the bit in position B is decreased when ΔS 2  has a positive value, i.e. 1→0. In this manner, a single bit error is corrected, and after the bit correction, the data, D n , is transmitted from the memory by the processor at process step ( 516 ).
 
   As will be apparent to those skilled in the art, a number of modifications could be made to the preferred embodiments which would not depart from the spirit or the scope of the present invention. While the presently preferred embodiments have been described for purposes of this disclosure, numerous changes and modifications will be apparent to those skilled in the art. In particular, it is recognized that the error detection and correction methodologies disclosed herein may be implemented, with equal effectiveness, in either hardware or software implementations. Accordingly, such changes, modifications, or selected implementations are encompassed within the spirit of this invention.