DATA INTEGRITY AND CROSS-CHECK CODE WITH LOGICAL BLOCK ADDRESS

Abstract: According to the invention, a data integrity code including logical block address ("LBA") and circuit implementation are provided. The code and implementing circuitry are utilized to enable data block LBA verification during a block transfer and retrieval process. The preferred data integrity code has embedded LBA information and also serves as a cross-check code used to detect miscorrection by an error correction code ("ECC"). In a preferred diskdrive embodiment, data integrity block ("DIB") (118) is provided to verify that the LBA value associated with a given data block in a host interface (101) matches the value associated with that same data block in a buffer memory and in a data sequencer. In a preferred method of use, data integrity/cross-check redundancy with LBA is appended to data blocks transmitted to a buffer memory and verified after the data block has been transferred from the buffer (102). After verification, the LBA is preferably written to the storage medium together with its associated data block to enable later LBA verification for blocks recovered from the storage medium. The LBA may also be verified when the data block is transferred back to a host (100) from the buffer memory.

Description: DATA INTEGRITY AND CROSS-CHECK CODE WITH LOGICAL BLOCK ADDRESS The present invention pertains generally to the field of data coding methods and apparatus for use in data communication and storage systems. More specifically, the present invention pertains to a system architecture that implements a data integrity code with incorporated logical block address ("LBA") information to protect data passed through a buffer memory in a data path and to enable data block LBA verification during a block transfer and retrieval process. Background of the Invention In the past, data formats for peripheral storage devices including, for example, disk drive storage devices, have utilized data block address information embedded within a data record associated with the block to deteπnine the physical location of individual data blocks on the storage medium. The individual block locations could then be determined by decoding a multiple bit block identification code that formed part of the overhead for each block of data written to the storage medium. More recently, data storage and transfer formats have been developed that do not embed data block location information within an identification field in the data record associated with each data block. Instead, internal counters and rimers, typically under the control of a supervisory microprocessor, have been used to track the location of data records without the need for embedded identification information. In addition, certain interface protocols, such as the Small Computer System Interface ("SCSI"), for example, may provide logical block address information to the peripheral storage unit that may be used by counter circuits to aid in tracking the data block location. In disk storage drives utilizing a buffered data path, user data are transferred from the host through the interface to a buffer memory, such as a dynamic random access memory ("DRAM"), for example, where the user data are temporarily stored prior to being transmitted through the recording channel and written to the storage medium. In such systems, it would be desirable to provide a mechanism for verifying the LBA of data blocks as they are passed from the host through the buffer memory to the storage medium and then back to the host through the buffer in the reverse path. In commonly assigned, co-pending patent application Serial No. , entitled "Method and Apparatus to Protect Data Within a Disk Drive Buffer", a system for utilizing the cross-check code as a data integrity code to protect the buffer memory is disclosed. This application, however, does not disclose the incorporation of LBA information in the redundancy information generated in accordance with the data integrity code. Moreover, LBA information has not been incorporated into a data integrity code that also functions as a cross-check code in systems utilizing a block buffer for temporary data storage in the data path where appended cross-check and data integrity code redundancy with incorporated LBA is transferred with the data block to the storage buffer and also to the storage medium. Accordingly, it would be desirable to provide a data integrity code that includes LBA information within generated redundancy to protect the block buffer and also to provide additional protection against LBA errors to enhance the probability that correct blocks of data are transferred between circuit components in the data path and the storage medium. It would also be desirable to provide a data integrity code with embedded LBA information that also served as a cross-check code to lower the miscorrection probability of error correction carried out in accordance with an error correction code ("ECC"). Summary of the Invention The present invention incorporates LBA information in redundancy generated by a data integrity code used to protect data temporarily stored in a block buffer. Advantageously, the data integrity code may also serve as a cross-check code to reduce the miscorrection probability of an error correction process carried out in accordance with an ECC. A general object of the present invention is to provide a data integrity block ("DIB") that incorporates LBA information into redundancy generated in accordance with a data integrity code to protect the integrity of data blocks passed through a buffer memory in a data path and to provide a mechanism to verify the LBA of the transferred blocks at discrete points in the data path. Another object of the invention is to provide a data integrity code having LBA information incorporated into the redundant symbols generated by an encoder block where the generated redundancy symbols optionally serve as part of the cross-check redundancy used to detect miscorrections by the ECC. A more specific object of the invention is to provide a data integrity/cross-check code having LBA information incorporated into redundancy generated according to the code, and an encoder/detector block for implementing the same in both a host interface and multi¬ function sequencer circuit to protect data blocks passed through a block buffer memory in a data storage system, where the encoder block produces a word (two bytes) of redundant information having the LBA of each block incorporated therein. Another more specific object of the invention is to provide a data integrity /cross- check code wherein 16 bits of LBA information are exclusive ORed ("XORed") with a single redundant word to produce a data integrity block word ("DIB word") that is appended to a data block. According to this object of the invention, the DIB word serves three separate functions: (1) to verify the LBA of the data block at different points on a path within the data channel; (2) to protect data blocks temporarily stored in the buffer; and (3) as cross-check redundancy to protect against ECC miscorrection. In accordance with these and other objects, features, and aspects of the present invention, LBA information is incorporated into redundancy information generated by a data integrity block to provide additional protection against misidentification of data blocks in a block data transfer system. In a preferred embodiment, a data integrity block ("DEB") is provided as part of an overall data integrity strategy that includes verifying that the LBA associated with a given data block in a host interface matches the LBA associated with the same data block in a buffer memory and in a data sequencer within a data path. The data integrity redundancy with LBA is appended to data blocks temporarily stored in the buffer to permit verification of the LBA after the data blocks have been received at a point downstream of the buffer in the data path. After this verification, the redundancy with LBA is preferably appended to its associated data block on the storage medium to form part of the cross-check redundancy for the data block and to enable later LBA verification when the block is read back from the storage medium. In the disclosed disk drive example, a DEB word is utilized as one of two cross-check words. The DEB word is generated according to a first cross-check code and is combined with LBA information in the host interface. The DIB word is then appended to the data block from which it was generated to provide data integrity for the buffered data block and a means for LBA verification at different points in the data path. The data integrity and LBA validity for the block may be checked after the block has been communicated to a point downstream of the buffer (in this case the sequencer) by regenerating the redundant word, bitwise XORing the regenerated word with the LBA associated with the data block in the sequencer, and comparing the result to the DEB word received directly from the buffer. Concurrently with this test, the DIB word and the second cross-check word generated in the sequencer are written to the storage medium and appended to the data block on the medium to form two distinct cross-check code words. When the data block is retrieved from the storage medium and transferred to die sequencer, the data recovery process may be tested by comparing the LBA of the recovered data block with the LBA of the data block requested by the sequencer. The cross-check code provides a convenient vehicle for carrying the LBA of each data block with the block to the buffer and to the storage mediαm, thus enabling LBA verification for the block at disparate points in the data path to ensure that correct blocks of data are processed by the system. A particularly desirable feature of this aspect of the invention is the ability to use the existing cross-check code in an overall data integrity and LBA verification strategy. This approach adds LBA monitoring capability to the storage device without adding separate data overhead and without requiring large amounts of additional hardware. In a presently preferred embodiment, the two cross-check words are produced in accordance with different encoder polynomials. The first cross-check codeword is a Reed- Solomon codeword defined by the generator polynomial: G(z) = z - 0, where β is the primitive element in a particular representation of a finite Galois field having 65536 field elements (GF(2 16 )), and is equal to the hexadecimal number 0x101. The second cross-check polynomial is a Reed-Solomon codeword defined by the generator polynomial: G(z) = z - β where β 2 is obtained by squaring β using the arithmetic of GF(2 16 ), and is equal to hexadecimal 0x180. In this preferred embodiment, Galois field mathematical operations are performed in accordance with extension field theory as described herein. One of the primary causes for a mismatch between LBA values is system software coding errors which may cause the misalignment of pointers that determine the location of individual data blocks in the storage medium and in the buffer. Since the system software is typically responsible for maintaining these data pointers, software errors may cause the data pointers to become misaligned, resulting in the erroneous identification and transfer of data blocks. Thus, the incorporation of LBA into a data integrity /cross-check code adds reliability to the data transfer process and at the same time provides a hardware means for the system designer, or field troubleshooter, to use in isolating system software errors that cause erroneous data block identification. These and other aspects, features, objects and advantages of the present invention will be more fully understood and appreciated upon consideration of the following detailed description of a preferred embodiment of the invention, presented in conjunction with the accompanying drawings, wherein like numerals designate corresponding parts in the several figures. Brief Description of the Drawings In the drawings: FIG. 1 is a top level block diagram of the write path in a data storage device utilizing a buffer memory where the write path includes circuitry for implementing a data integrity/cross-check code with incorporated LBA information according to the invention. FIG. 2 is a functional block diagram similar to FIG. 1, illustrating the read path in a data storage device where LBA information is incorporated in data integrity /cross-check code redundancy according to the present invention. FIG. 3 illustrates the format of a data block written to a storage medium in accordance with aspects of the invention. The block includes 512 bytes of data, followed by two pairs of cross-check bytes, XC[513] through XC[516], which form cross-check words XCHKo and XCHK,, respectively, followed by 18 error correction bytes, ECC[5iη through ECC[534]. FIG. 4 is a circuit diagram of a presently preferred implementation of a combined syndromer and checker that may be used to implement the DEB, DEB/XCHKQ and XCHK, function blocks shown in FIGs. 1 and 2. Detailed Description of a Preferred Embodiment Write Path With reference to FIG. 1, data blocks from a host 100, such as a computer for example, are input to a host interface 101 (illustrated by the dashed box) and transmitted over two separate parallel paths within the interface 101 to temporary storage, preferably a first-in-first-out ("FIFO") buffer 102, and a data integrity block ("DEB") 118 (dashed box). The DIB 118 comprises a DE3 encoder 104, LBA counter 105, and a comparison circuit, illustrated as a bitwise modulo 2 adder 103. As shown in FIG. 1, the DD3 118 is preferably implemented together with other elements of the host interface 101 as part of a single Application Specific Integrated Circuit ("ASIC"). The data path into the interface 101, as well as the data paths within the interface 101, may be switched between 8 and 16 bits to accommodate either byte or word size formatting of data from the host 100. Significantly, while the data blocks described herein are formatted as 256 word data sectors (512 bytes), many different block formatting options may be utilized depending on the particular application. In a preferred embodiment, the host 100 outputs data blocks formatted as a sector of N 16 bit data words {u < *., u,, . . . u,-.,} where N = 256 for a 512 byte data sector. The data words from the host 100 are simultaneously clocked into the input of the DEB encoder 104 and into the buffer 108 through FIFO 102 in response to a word clock signal provided to the circuit elements within the host interface 101. The FIFO 102 is used to buffer the incoming data words to accommodate variations in transfer rates between the host 100 and the block buffer 108, while block buffer 108 functions as a cache memory to temporarily store a transferred sequence of data sectors prior to the further transfer of the sectors to the sequencer 109. A dynamic random access memory ("DRAM") of sufficient size to store a number of data sectors, such as a 16 X 64K DRAM, for example, is preferably utilized for the buffer 108. Data transfer to and from the buffer 108 is controlled by a buffer controller 110 which, in turn, is supervised by on-board micro-controller 112. As illustrated in FIGs. 1 and 2, the buffer controller 110 is preferably included within the multi-function sequencer 109 architecture. In this particular example, data sectors clocked into the DEB encoder 104 are encoded according to a 16 bit Reed-Solomon code that operates over a finite Galois field having 65,536 elements (GF(65,536) or GF(2 16 )), represented as an extension field, to produce a single redundant word, do, in response to an incoming sector of data words, {u<), u*, . . . u^ j }. After all the data words in the sector have been clocked through the DIB encoder 104, the encoder 104 outputs d to the input of bitwise modulo 2 adder circuit 103, which in practice may be implemented as a parallel array of 16 XOR gates. The redundant word, do, is then bitwise XORed with the lower 16 bits of the LBA value provided by LBA counter 105 to the input of adder 103. The result of this operation is a single redundant word including LBA information, x^. For the sake of clarity, x*- will also be referred to as the DEB word to distinguish it from the redundant word do provided at the output of the DEB encoder circuit 104, which does not include LBA information. As will be explained further below, x N serves a dual function as the DIB word for data integrity and LBA checking, and as the first cross-check word, XCHKg, for cross-checking data correction carried out by the ECC 114. (The DEB word will be referred to as DEB/XCHKo or simply as XCHKo in connection with the cross-check function). In order to implement both a data integrity code and a cross-check code, the DEB encoder 104 encodes the incoming data sectors according to the same cross-check code implemented in the DIB/XCHKo encoder 113 located in the sequencer 109. Since the DIB encoder 104 in the host interface 101 and the DIB/XCHKo encoder 113 in the sequencer 109 implement the same codes, the same encoder circuits may be utilized in both places. During the clock periods when the data words {UQ, U. , . . . u^} are transferred to the buffer 108, the select line 107 of multiplexer 106 is set to a logic level that connects the data path from the FIFO 102 to die buffer 108. After all the data words of the data sector being transferred have passed through the multiplexer 106 to the buffer 108, the logic level of the select line 107 is switched to connect the output of adder 103 to the buffer 108. This causes the adder 103 output, which in the illustrated example is the DEB word , to be appended to the sector of data in the buffer 108 to produce a DIB codeword B = {bo, b,, . . ., b,,} of length N+l where b j = IL, for i = 0 to N-l, and where b^, = x„. The LBA block 118 includes a sequential counter circuit 105 that receives an initialization value from a storage register (not shown). In the case of a SCSI interface operating in conjunction with a SCSI host, for example, the storage register may receive an initial LBA value through the Command Description Block ("CDB") sent by the SCSI host 100 when a read or write command is initiated. Alternatively, the storage register may be accessed and initialized by the micro-controller 112. The LBA counter 105 reads the initialization value from the register and then increments the LBA count as each sector of data is received from the host 100 and transferred to the buffer 108. After the single redundant word x N has been appended to the data sector stored in the buffer 108, DEB codewords are transferred from the buffer 108 to a sequencer circuit 109 through the buffer controller 110. After entering the sequencer 109, DIB codewords from the buffer 108 pass through multiplexer 120 and are serially written to the storage medium 122 by a data transducing head in conventional fashion. When written to the storage medium 122, a DIB codeword forms the first cross-check code word, C = {c-,, c*., . . . c,*.,, C N }, where c, = b, for i = 0 to N and where c N is the cross-check word XCHKo- User data transferred from the buffer 108 to the medium 122 are also transmitted over parallel data paths in the sequencer 109 to an ECC encoder circuit 114, to XCHK, 116 and to DIB XCHKo encoder 113. The ECC encoder 114 also receives and encodes the DEB word, x N , from the buffer 108 after the data sector words have been received and encoded. The XCHK, 116 encoder generates the second cross-check word, XCHK,, (labeled as ^, in FIG. 1) in response to the received data sector words only (and not the „ word) according to the XCHK j (x) generator polynomial. After the last word of the data sector, D-*.,, has been clocked through the XCHK, circuit, the redundant XCHK, word, x^,, is output to the ECC circuit 114 through multiplexer 115 and is encoded by die ECC 114. At the same time, multiplexer 120 is switched via select line 123 to permit x,, + , to pass through and be written to the storage medium 122, where together with the data sector words { ,, c„ . . . c^,}, it forms the second distinct cross-check code word on the storage medium 122, i.e., { ,, c,, . • • CN-I* CN+I = *N+t = XCHK,}. The DB3 XCHKo encoder 113 is included within a DIB XCHKo function block 119 that also includes LBA counter 111 and first and second bitwise modulo 2 adders 125 and 126. The DIB/XCHKo encoder 113 generates a redundant word, do', in response to the data words b, received from the buffer. Because the DEB/XCHKo encoder 113 in the sequencer 109 utilizes the same code as the DIB encoder 104 in die host interface 101, y should match do if no data errors have occurred during the transmission of the data through the buffer 108. In the present architecture, however, in order to perform a data integrity check on data from the buffer 108, the LBA value maintained by the LBA counter 111 in the sequencer 109 must first be bitwise XORed with d^' in first adder 125 to generate the redundant word x N \ The x N ' word is then compared to the redundant word x N from buffer 108 in second adder 126 after the all of words, b„ of die data sector have been clocked through the DEB/XCHKo encoder 113 and ,, is received from the buffer 108 by second adder 126. The comparison is performed by bitwise XORing ^ with x,*. If x^' and x N are the same, the data are assumed to be error free and the LBA of the data sector is also assumed to be correct. If, on the other hand, x N ' and x^ are not the same, a DIB error is reported to micro-controller 112 and appropriate corrective action, such as requesting that the host 100 resend the data sector, may be taken. Because LBA information is included within the redundant words, ^' and *, in addition to data integrity errors associated with the transmission of data through the buffer 108, a reported DEB error may also be caused by a mismatch of the LBA included within the DIB word, *, and the LBA supplied by the LBA counter 111 in the sequencer 109 for the particular data sector. As previously mentioned, LBA errors may be caused by software coding errors which cause pointers into the buffer 108 to point to the wrong memory location for the desired data sector. When this happens, the incorrect sector will be transferred from the buffer 108 to the sequencer 109 and an LBA error will result. The inclusion of LBA information in the data integrity code thus provides a convenient hook for debugging the system software and enhancing the overall reliability of the data transfer process. While the data integrity and LBA verification tests are being performed in the sequencer 109, the ECC encoder circuit 114 receives the data input of {b 0 , b,, . . . 0,,.,, b*,, = x N = XCHKQ, bw + i = x N+1 = XCHK,}, and outputs a predeteπnined number of ECC check bytes (labeled "ECC" in FIGs. 1 and 2) in response thereto. Since both cross-check words XCHKQ and XCHK, are input into the ECC encoder 114 and encoded together with the incoming data sector, the ECC check bytes generated by the ECC encoder 114 protect both the data words and the cross-check words appended on the medium 122. This provides the ECC 114 with the capability to correct errors that occur in the cross-check words as well as the data words when recovered from the storage medium 122. In a presently preferred embodiment, ECC 114 generates 18 ECC check bytes (shown as ECC[517] through ECC[534] in FIG. 3) in response to each data sector and the two associated cross-check words. These 18 ECC check bytes pass through multiplexer 120 and are appended to the data sector immediately following the XCHK, word as shown in FIG. 3 after all the data words and the two cross-check words, XCHKQ and XCHK, have been encoded by die ECC 114 and output to the storage medium 122 over the separate parallel path within the sequencer 109. When the ECC check bytes are clocked out of the ECC 114, the logical state of the select line 123 of the multiplexer 120 is switched to permit the ECC check bytes to pass through and be written to the storage medium 122 in conventional fashion. Turning briefly to FIG. 3, the 18 ECC check bytes together with the previously written data words and cross-check words form a single Reed-Solomon ECC code word on the storage medium 122: {CQ, c,, . . . c^, c = x N , c^, = x N+ 1 , ECC}. As illustrated in FIG. 3, the structure of an exemplary 534 byte ECC code word has 512 bytes of data, i.e., one sector, followed by XCHK Q (XC[513] and XC[514)) and XCHK, (XC[515] and XC[516]), followed by 18 ECC bytes, ECC[517] through [534]. 2. Read Path Referring now to FIG. 2, in read mode, an ECC codeword previously written to the storage medium 122 is read back as die readback codeword ' = {CQ', . . . C N .,' , <_*' = XCHKo', c N+ ,' = XCHK, * , ECC'} and input to the sequencer 109. In the sequencer 109, the recovered data words, ,', c,\ . . . c N .,\ together with the XCHKQ' word, x N \ are communicated over a path directly to the buffer 108 for temporary storage prior to further transfer. Simultaneously with this transfer, the second cross-check codeword, . . . C N V. C N+ I ' = XCHK,'}, is input to the XCHK, block 116 and the entire ECC code word, C j ', is input into the ECC 114 for ECC remainder recovery and syndrome generation. The XCHK, block 116 generates a cross-check syndrome based on the recovered second cross- check codeword which is used to increase the statistical probability that corrections carried out by the ECC 114 are properly performed. The first cross-check code word recovered from the medium 122, {CQ', c,\ . . . C H .,', C H ' = XCHKo'} « received as an input to the Dffi XCHKo encoder 113 in DIB/XCHKo block 119, which includes LBA counter 111 and first and second bitwise modulo 2 adders 125 and 126. The DEB/XCHKQ encoder 113 decodes, by reencoding, the received data words, C Q ' , c,', . . . C N. ,', to produce a redundant word, do", according to die same code utilized to generate the redundant word do in the DEB encoder 104 in the host interface 101. First adder 125 bitwise XOR's do" with die lower 16 bits of the LBA value associated with die particular data sector in the sequencer 109 to produce x N " . For a purpose that will soon become apparent, the XCHK Q block 113 also generates cross-check syndrome values based on the entire received first cross-check codeword, c N '}. The LBA counter 111 maintains an incremental LBA count for data sectors received by the sequencer 109 from the medium 122, and may be provided with an initialization value by micro-controller 122. As was the case with the LBA counter 105 in the write path, the initialization value may be received through the CDB upon institution of a SCSI read command. The regenerated redundant word, x N ", is output from first adder 125 to the input of second adder 126 where it is compared to x N ', received by second adder 126 from the storage medium 122 at the same time. Adder 126 then compares x* to ^' by bitwise XORing them together. A non-zero result indicates that either one or more data errors have occurred, or that an LBA error has occurred. Although d e cross-check syndromes must be updated or reconstituted when a data error is detected to correctly perform the cross-check function (because they are based on what the ECC 114 has determined to be erroneous data), die same is not true of die DIB word in the buffer 108, x*-' . This is because ^' is preferably written directly to the buffer 108 directly from the storage medium 122, rather than being taken as the redundancy output of the DIB/XCHKo encoder 113, which could be based on erroneous data. This architectural feature, together with the ECC's 114 ability to detect and correct errors to the DIB word in the buffer 108 as discussed below, makes it possible for x N ' to be delivered directiy to the buffer 108 from the storage medium 122 and utilized as the DEB word for the return data path through the buffer 108 to the host interface 101. Significantly, it is only die LBA verification aspect of tiiis code that requires the DEB word to be regenerated in the read patii in the sequencer 109 for comparison with x N \ If the code only served as a data integrity code and not additionally for LBA verification, this test could be omitted. If an ECC 114 protected data error is detected, die ECC 114 will attempt to correct data eπors in die buffer 108, provided that they fall within the correction capabilities of die code. To start the correction process, the ECC 114 calculates syndrome values based on die recovered code word from the storage medium 122. The ECC 114 tiien solves die syndromes to determine error location and pattern values for the data errors. In this regard, it should be recalled tiiat because die cross-check words, XCHKQ and XCHK,, are encoded by the ECC 114, the ECC 114 possesses the ability to correct errors in the cross-checks as well as in die data. This capability is important because die XCHKo' word fr° m * storage medium 122 is transferred to the buffer 108 as die DIB word ^' for the path back to the host interface 101 , and, if the system is to work property, it is necessary for this word to accurately characterize die data sector and sector LBA that it is designed to protect. Again, assuming the data errors have been detected, after the ECC module 114 calculates error location and pattern values, die two distinct cross-check codes are utilized to determine whether the ECC corrections are proper. This process involves updating die syndromes generated by XCHKQ 113 and XCHK, 116 to properly reflect die ECC 114 determined correction values. If both the XCHKQ and XCHK, recalculated syndromes equal zero, it is assumed that the ECC 114 has properly corrected die data words (and die DEB word, x N \ if necessary) in die buffer 108. In practice, tiiis correction may be carried out by micro-controller 112, which corrects byte errors after receiving the error location and error value from the ECC 114 by accessing the erroneous data byte (or die DEB bytes, x N \ as the case may be) in the buffer 108 and XORing the erroneous byte with die correction value to correct the byte. In describing die error correction mechanics in terms of byte correction, it has been assumed tiiat a byte-wise Reed-Solomon ECC code will be utilized. It should be noted, however, tiiat different symbol length ECC codes, such as a 16 bit symbol code for example, may be utilized. On the other hand, if only die XCHK, syndrome equals zero, and die XCHK Q syndrome is non-zero, it is likely that the ECC 114 has properly determined die error correction values and the cause of d e miscomparison is an LBA rather tiian an ECC error. In tiiis case, appropriate corrective action may be taken by die system software after the DIB error has been reported to the micro-controller 112. Still referring to the read path illustrated in FIG. 2, in d e previous discussion it has been assumed that the ECC 114 has detected one or more errors in die data transferred from die storage medium 122 to d e sequencer 109. In die case where time are no ECC detected errors in die data sector or the cross-check/DIB redundancy transferred from die storage medium 122 to die buffer 108, and a DIB error is detected by die DIB/XCHKo block 119, it may be assumed tiiat a mismatch between the LBA of the data sector read from the storage medium 122 and die LBA for this sector maintained by the LBA counter 111 in die sequencer 109 has occurred. This indicates that either the incorrect sector of data was read from the storage medium 122, or tiiat die LBA from die LBA counter 111 is incorrect. To recover from this eπor, firmware executed by micro-controller 112 may initiate one or more rereads of the sector from the storage medium 122 until a DIB error is not reported, or it is determined tiiat an unrecoverable LBA error has occurred. After the data and DEB redundancy have been transferred to die buffer 108, and any required error correction or rereads as described above have been performed, die data sector words, b 0 \ b,\ . . . b^,', followed by the appended DIB word x are sequentially clocked out of the buffer 108 through the buffer controller 110 to the host interface 101. In the host interface 101, the data sector words are communicated to the host 100 (through FEFO 102) and the data words followed by x N ' are communicated over a parallel path directly to the DEB encoder 104. The LBA and data integrity of the data sector in the host interface 101 may be verified by die DIB 104 in a manner substantially similar to the process previously described. The DEB encoder 104 regenerates a word, do", based on die data words {bo\ b,\ . . . b^,'} using the same cross-check encoding algorithm utilized in die DEB/XCHKQ encoder 113 in the sequencer 109. The regenerated word, do", is then bitwise XORed with the lower 16 bits of LBA provided by LBA counter 105 in bitwise modulo 2 adder 103 to produce die redundant word including LBA, x*". LBA counter 105 is initialized by die micro-controller 112 in the manner previously described, and maintains an incremental count of the LBA for the particular data sector entering the host interface 101 from the buffer 108. The x^" word is input to a second bitwise modulo 2 adder 127 and compared bitwise to x^ which arrives from the buffer 108 at the input of the adder 127 during die same clock cycle. If x^*" are x N ' are equal, the data are assumed to be correct and d e LBA of the data sector is also assumed to be correct. If, on the otiier hand, x N " and ' are not equal, a DIB error is reported to the micro-controller 112 and appropriate corrective action, such as requesting that the data be reread, may be taken. 3. Combined DIB Encoder/Cross-Check Svndromer Circuit Implementation FIG. 4 illustrates a presently preferred combined encoder/syndromer and checker circuit 200 that contains the circuitry needed to implement the DEB block 118 in the host interface 101 and die DIB/XCHKQ and XCHK, blocks 119 and 116 in the sequencer 109. As is apparent from inspection, die circuit 200 of this particular embodiment is, in reality, two separate circuits that are utilized to implement two distinct coding equations to form two distinct cross-check code words. To perform the DIB ericoding decoding and checking operations performed by die DIB block 118 in the host interface 101, only that portion of the circuit 200 lying above the dashed line labeled "A" in FIG. 4 (the "upper half") is preferably utilized. Conversely, in order to generate cross-check syndromes for use in the ECC process based on two distinct cross-check code words, and to perform LBA verification in the host interface 109 as taught herein, the entirety of die circuit 200 is implemented in die sequencer 109 as the DEB/XCHKo block 119 and the XCHK, block 116. Regardless of whether implemented in die sequencer 109 or die host interface 101, the circuit 200 of d e present example is adapted to process word length data in accordance widi a 16 bit, i.e., wordwise, Reed-Solomon code over GF(2 16 ) while receiving a byte clock clocking signal. To properly process received data sector words when provided with a byte clock signal, die storage registers 217, 218, 219 and 220 witiiin the circuit 200 are configured widi corresponding input multiplexers 235, 236, 237, and 238. During operation, registers 217, 218, 219 and 220 receive die byte clock signal (byteclk) over a common clock signal line 226. Every other byteclk cycle, the corresponding input multiplexers 235, 236, 237 and 238 are enabled via tiieir select lines so tiiat after two byte clock cycles one word of data (i.e., two bytes) is held in the respective storage registers. For example, the xckOenab and xcklenab signals are supplied over lines 209 and 210 as the respective select inputs of multiplexers 235 and 237 to permit data words to be clocked dirough registers 217 and 219 in accordance with the particular 16-bit code being implemented. The operation of the circuit 200 as the DEB block 118 in the host interface 101 will now be separately described with reference to its write path operation as an encoder, and its read path operation as a decoder and checker. During write mode, user data Uj from the host 101 are received on die wordinpt bus 202 and provided to the input of XOR gate array 203. (Heavy lines in FIG. 4 indicate a word wide, i.e., 16 bit, data bus whereas thin lines indicate a single signal line). The beginning of a data sector, and the start the encoding process for that sector, is marked by the assertion (i.e., raised to a logic level of "1") of the wordzero signal on line 201. This signal is supplied to inverted inputs of AND gate array 215 (only one AND gate is shown for simplicity) to initialize the storage register 217 to the first received data word, U Q . The assertion of wordzero causes the AND gate array 215 to produce a zero output which disables the feedback path 212 and initializes the storage register 217 to UQ. For the next N-l words, die wordzero signal on line 201 is deasserted to permit feedback multiplication. During this time, the lastword signal on line 208 is also deasserted, and user data u, are passed to d e input of XOR gate array 203 where they are added modulo 2 to the values on the feedback path 212. The result of the modulo 2 summation is clocked through register 217 (according to die xckOenab signal supplied over line 209 to the select line of multiplexer 235) and multiplied by the fixed value, β, in the Galois field multiplier 225 to produce: xckOwork N = J •J J 3 N"1 "i » i-° which is available on the xckOwork bus 211. When the last word of user data to be encoded, i.e., u,*.., is input to XOR gate array 203, the lastword signal is asserted over line 208 to the input of AND gate array 231. This allows the LBA word on die LBA_word signal bus 207 to pass to the input of XOR gate array 232 where it is bitwise XORed (added modulo 2) with die output of the β multiplier 225. This produces: J#-l xckOwork,, = LBA + u i β w'1"i = x H , on the xckOwork bus 211. (The " + " sign in die equations given in this specification indicate modulo 2 addition). Thus, after all N words of data have been processed, die redundant word including LBA, x*, is generated and output on the xckOwork signal bus 211. As previously explained, X N is passed through multiplexer 108 and appended to the data words Uj, for i = 0 to N-1 , previously stored in the buffer 108 to form a DEB codeword tiierewitii. When the LBA is zero, the choice of x N provides tiiat the encoded block of data in the buffer 108: {bo, b,, . . . bn.,, bn} = {UQ, u,, . . . U N .,, X N } is a Reed-Solomon codeword over GF(65536) widi a generator polynomial of the form: G(z) D * B XCHK0 = z - p. where β is the primitive element of a finite Galois field having 65536 field elements (GF(2 16 )), and is equal to 0x101. During read mode, operation of the circuit 200 as the DEB block 118 in die host interface 101 is identical except that data words received over die wordinpt data bus 202 comprise the readback words from the buffer 108, b-\ where h,' = {bo', b,\ . . . b^,', b,*' = x N '}, and an LBA and data integrity check is performed. After the user data portion of die DIB word, i.e., die first N words of buffered data bj', have been clocked through the upper half of the circuit 200, the DEB word, x, = b^, from the buffer 108 is input to XOR gate array 203 on the wordinpt bus 202. During die same word clock cycle, die LBA word on die LBA word bus 207 is passed to the input of XOR gate array 232 through AND gate array 231 in accordance widi die assertion of d e lastword signal on line 208. The LBA word is then added modulo 2 with die output of the β multiplier 225, to create the regenerated DEB word x*," based on die first N words (die data portion) of the buffered codeword. The LBA and data integrity test for the readback buffered codeword, b,', is performed over this same last word clock cycle when x N ' is input to XOR gate array 203 and added modulo 2 with die regenerated DEB word *", supplied on die feedback path 212. The modulo 2 addition of x,*" widi the incoming DIB word x,,' from die buffer 108 yields a zero result if the two values are equivalent, in which case a correctly received code word can be safely assumed. Nonzero detector 222 is utilized to test the output of the XOR gate array 203 for a nonzero result, where a nonzero result indicates die occurrence of eitiier an LBA error or a data integrity error, which should be rare. A nonzero result is reported as die dicerror signal over line 240 to the input of multiplexer 236 and storage register 218 which, in combination, form a latch for holding die dicerror signal in accordance with the xcOcheck signal supplied to the multiplexer 236 via select line 233. The dicenor signal is made available to the sequencer 109 and the micro-controller 112 on the xcOerror line 228 at the output of die storage register 218. Micro-controller 112 is preferably programmed with die capability to take the appropriate corrective action, such as requesting the sequencer 109 to cause the data sector to be reread, for example. The sequencer 109 may also include die capability to take corrective action independent of the micro-controller 112. The operation of die circuit 200 as implemented in the sequencer 109 will now be described. As previously pointed out, both the upper and lower halves of the circuit 200 are preferably included in die sequencer 109 with die upper half functioning as the DIB/XCHKo block 119 and the lower half functioning as die XCHK, block 116. Because both halves of the circuit 200 are implemented in the sequencer 109, the wordinpt bus 202 is connected to both XOR gate arrays 203 and 205, which form the input for the respective upper and lower halves of the circuit 200. During write mode, die entire DIB codeword, h„ from the buffer 108 is clocked into the circuit 200 over die wordinpt bus 202. The upper DIB/XCHKo half of die circuit 200 processes all N words of b; in accordance with die same coding equation implemented in DIB/XCHK Q block 118 in the host interface 101 and regenerates die DIB word as x,,' . An LBA and data integrity test is then performed based on a comparison of the DEB word x,- from the buffer 108, and die regenerated DEB word x N ' in the same manner as previously described with respect to the operation of die upper half of the circuit 200 in the read patii of the host interface 101. An error signal resulting from a miscomparison may be latched in the storage register 218 and made available to the micro-controller 112 and sequencer 109 as before. Operation of the lower half of the circuit 200 as the XCHK, encoder 116 in the write path of the sequencer 109 is similar to die operation of the upper half of the circuit 200 as the DIB/XCHKo encoder 104 during write mode in die interface 101, except that a different encoding equation is utilized. In contrast to the input received by d e upper half of the circuit 200, which also functions as a checker, and hence needs to receive the redundant word X N to perform that function, only die data portion of th buffered codeword, i.e. , die first N words of b„ are preferably input to the input XOR gate array 205 array over the wordinpt bus 202. Encoding operation commences when the first word from the buffer, i.e., bg, is provided to the input of XOR gate array 205. At the same time bo arrives, the wordzero signal is asserted over line 201 to the inverted input of AND gate array 216 to zero die feedback line 213 and initialize the storage register 219 to bg. For die next N-1 words, die wordzero signal over line 201 is deasserted and each incoming data word, b-„ is clocked into the XOR gate array 205, added modulo 2 to the contents of die feedback path 213 and the resulting value stored in die storage register 219 in accordance widi die xcklenab signal applied over line 210 to the select irφut of multiplexer 237. For each clock cycle, the contents of the feedback path 213 comprises the clocked out previous contents of the storage register 219 after multiplication by β 2 in Galois field multiplier 227. After all N word clock cycles have been completed, die second cross-check word, XCHK, = N+ ι, is generated, and made available on die xcklwork bus 214: N-l *κ.ι = ∑ ^β 2 '*- 1 ^ = XCHK, i 'O The XCHK, value is steered to die input of the ECC block 114 and is also appended to die stored data sector c, on the medium 122 to form the second distinct cross-check codeword dierewith. The choice of x N+ , provides that the second cross-check codeword stored on die medium: { Q , C ] , . . . CN.,, N+I} = {bo, bj, . . . t^.,, XN+I} > is a Reed Solomon codeword over GF(65536) with a generator polynomial of the form: G(z) XCHK1 = z - β , where β 2 is the primitive element of GF(2 16 ) and is equal to 0x180. The operation of the circuit 200 in the read path of die sequencer 109 will now be described. During read mode, the two cross-check words from the medium 122 are directed to die respective inputs of the input XOR gate arrays 203 and 205, with die XOR gate array 203 receiving die first readback cross-check word, {CQ', C,\ . . . c*., * , Cμ'=* XCHK,,'}, and the XOR gate array 205 receiving the second readback cross-check code word, {q,', c,', . . . C N - I \ C N+ I ' = XCHK,'}. The recovered data words and redundancy tint comprise these two distinct cross-check codewords are clocked through the respective upper and lower portions of the circuit 200 in the same manner as previously described. On the word clock cycle following the last input word, feedback multiplication by die respective halves of the circuit 200 produces a first cross-check syndrome value, S Q , on the xckOsynd bus 204: S o = έ 1 -0 c ^ w_i and a second cross-check syndrome value, S,, on the xckOsynd bus 206: A nonzero syndrome value for the S, syndrome, as detected by nonzero detector 222, indicates that one or more data errors have occurred during storage, whereas a nonzero value for the S 0 syndrome, as detected by die nonzero detector 224, indicates either one or more data errors and/or an LBA error has occurred. This is because d e SQ syndrome is calculated based on the readback DEB/XCHKo' word, which preferably includes LBA information, such that an LBA error in the sequencer 109 will manifest itself in die calculated S Q syndrome value. If a nonzero S Q syndrome is detected by nonzero detector 222, an error signal may be latched in storage register 218 and reported over the xcOerror line 228. Similarly, a nonzero S, syndrome detected by nonzero detector 224 may be latched by the combination of multiplexer 238 and shift register 220 in accordance with the xclcheck signal supplied on d e select line 234 of multiplexer 238, and reported as die xcl error signal over line 230. The upper half of the circuit 200 in the sequencer 109 optionally performs a read path LBA verification test. Because die upper and lower halves of die circuit 200 each function both as an encoder and as a syndromer, a DEB word based on die data portion of the incoming first cross-check word can be generated and compared to the DEB XCHK Q ' word from the medium 122 during the same time cross-check syndromes are generated by die circuit 200. If implemented, tiiis LBA check is performed during die last word clock cycle when the multiplier 225 output corresponds to the redundancy do" illustrated in FIG. 2. The do" redundancy is added modulo 2 by XOR gate array 232 to the LBA word provided over the LBA_word bus 207 to create the regenerated DIB word X H ". The regenerated word x N " is then fed back to die input XOR gate array 203 over the feedback bus 212 and bitwise compared to the word X N ' = XCHKQ', which is input to the XOR gate array 203 over the wordinpt bus 202 at die same time. If the result of this comparison, as detected by nonzero detector 222, is nonzero, an error signal may be reported to d e sequencer 109 and/or die micro-controller 112 as previously described. The data path logic into the circuit 200 provides that the syndrome SQ is calculated based on die first cross-check codeword read back from die medium 122: {•V * C,', . . . CN.,' , CJ,'} , and that d e syndrome S, is calculated based on die second cross-check codeword read back from the medium 122: {Co' . c .' ι • • • CN-I > CN+I / • 4. Galois Field Extension Field Operations Multiplication and addition operations performed by Galois field multipliers 225 and 227 and die Galois field adders of die circuit 200 are performed on an extension field basis over a GF(2*) subfield of GF(2 16 ). Use of a smaller subfield of die Galois field to perform multiplication operations as taught herein, for example, offers significant advantages in that it simplifies the required logic and reduces implementation gate counts over non-extension field direct multiplier designs. The presently preferred GF(2 16 ) is described as an extension field of die following subfields: GF(2 4 ) is an extension field of GF(2) and is generated by die polynomial P(X) = X 4 -I- X + 1, irreducible over GF(2), using γ 1 = 0x02 as a primite element of GF(2 4 ). GF(2*) is an extension field of GF(2 4 ) defined using the polynomial P(Z) = Y 2 + Y + ζ>, irreducible over GF(2 4 ), where fo =• 8, and α 1 = 0x12 is a primitive element of GF(2*). The extension field GF(2 16 ) is defined by: P(Z) = Z 2 + Z + & where go = 0x81 and 0 1 = 0x101 is a primitive element of GF(2 16 ). For an additional discussion of d e mechanics of Galois field extension field theory, die reader is referred to copending and commonly assigned Application Serial No. , entitled, "Dedicated GF-ALU Architecture for 10-bit Reed-Solomon Error Correction Module," die disclosure of which is hereby incorporated by reference in its entirety. 5. Vw^ng r.-.V I itfηg The following Verilog program sets forth the program codes needed to synthesize the combined encoder/ syndromer and checker circuit 200 illustrated at a functional level in FIG. 4. In this code listing, the following conventions are employed: "x" means hexadecimal (base 16); "b" means binary (base 2); "d" means decimal (base 10); "!" means not; "&" means logical AND, and " - " means the logical NOT or inversion operation. module dib(lbadress, wrdinput, wrdoutpt, ckenable, syncrsto, asynrsto, lastword, dicclock, goodsect); input [15:0] lbadress; input [15:0] wrdinput; output [15:0] wrdoutpt; assign hilbaddr = lbadress [15:8]; assign lolbaddr = lbadress [7:0]; assign hibytinp = wrdinput [15;8]; assign lobytinp = wrdinput [7:0]; assign wrdoutpt = {hichkout, lochkout}; cmbindic cmdic (.hilbaddr(hilbaddr), .lolbaddriloϊbaddr), . hiencinp(hiencinp) , . loencinp(loencinp) , . hiencreg(hiencreg) , . loencregfloencreg) , .hibytiιφ(hibytinp), . lobytinpøobytinp) , .hichkinp(hichkinp) , . lochkinp(lochkinp) , . ckenable(ckenable) , .syncrstn(syncrstn), . enresetn(enresetn) , . erstregn(erstregn) , . rallzero(rallzero)) ; regerdic rgdic (.dicclock(dicclock), . ckenable(ckenable) , . lastword(lastword) , .hichkinp(hichkinp) , . lochkinpOochkinp), .hiencinpOύencinp), . loencinp(loencinp) , . rallzero(rallzero) , . hiencreg(hiencreg) , .loencregOoencreg), .hichkout(hichkout), .lochkout(lochkout), .enresetn(enrcsetn), .erstregn(erstregn) , .goodsect(goodsect), .asynrstn(asγnrstn)); endmodule module cmbindic(hilbaddr, lolbaddr; hiencinp, loencinp, hiencreg, loencreg, hibytinp, lobytinp, hichkinp, lochkinp, ckenable, wire [7:0] losumone; wire [7:0] lomultip; assign rallzero = (~( | lochkiiφ)) & ( ~( | hichkinp)); assign enresetn - syncrstn & (ckenable | erstregn); assign hibyinit = {8{erstregn}} & hiencreg; assign lobyinit[7:l] = {7{erstregn}} & loencreg[7:l]; assign lobyinit[0] = (-erstregn) | loencreg[0]; assign hisumone = hibytinp A hibyinit; assign losumone = lobytinp * lobyinit; mult0x53 multl(.y(losumone),.zOomultip)); assign hisumtwo = losumone A hisumone; mult0x53 mult2(.y(hisumtwo),.z(hiencinp)); assign hichkinp = hilbaddr Λ hiencinp; assign loencinp = hisumtwo * lomultip; assign lochkinp = lolbaddr A loencinp; endmodule always @ (posedge dicclock or negedge asynrsto) begin if ('.asynrsto) erstregn < = 1'bO; else erstregn < = enresetn; end always @ (posedge dicclock) begin hichkout < = ({8{lastword}} & hichkinp) | ({8{ ~ lastword}} & hichkout); lochkout < = ({8{lastword}} & lochkinp) j ({8{ - lastword}} & lochkout); goodsect < = ( lastword & rallzero) | ( ( -lastword) & goodsect); hiencreg < = ({8 {ckenable}} & hienciiφ) | ({8{ -ckenable}} & hiencreg); loencreg < = ({8{ckenable}} & loencinp) j ({8{ -ckenable}} & loencreg); end endmodule module mult0x53(y,z); input [7:0] y; output [7:0] z; wire [7:0] alphaOy wire [7:0] alphaly wire [7:0] alpha2y wire [7:0] alpha3y wire [7:0] alpha4y wire [7:0] alpha5y wire [7:0] atphaόy assign alphaOy = y; assign alphaly = {alphaOy[6:0],l'b0} A ({8{alphaOyf7]}} & 8'd29) assign alpha2y = {alphaly [6:0], 1'bO} A ({8{alphalyf7]}} & 8 * d29) assign alpha3y = {alpha2y[6:0],rb0} A ({8{alpha2y[7]}} & 8 * d29) assign alpha4y = {alpha3y[6:0],l'b0} A ({8{alpha3y[η}} & 8'd29) assign alpha5y = {alpha4y[6:0],rb0} A ({8{alpha4y[η}} & 8'd29) assign alpha6y = {alpha5y[6:0],l'b0} A ({8{alpha5y[η}} & 8'd29) assign z = alphaOy A alphaly A alpha4y A alpha6y; endmodule Having thus described an embodiment of die invention, it will now be appreciated tiiat the objects of the invention have been fully achieved, and it will be understood by those skilled in the art that many changes in construction and widely differing embodiments and applications of the invention will suggest themselves without departing from die spirit and scope of the invention. The disclosure and die description herein are purely illustrative and are not intended to be in any sense limiting.

Claims: WHAT IS CLAIMED IS: 1. A method of verifying the logical block address of a data block transmitted over a data path comprising the steps of: (a) encoding the data block at a first point in the data path in accordance 5 with a data integrity code to generate a first redundant symbol associated with the data block; (b) incorporating a first logical block address of the data block into said first redundant symbol to generate a first data integrity block symbol; (c) appending said first redundant symbol to the data block; o (d) transmitting the data block with said appended first redundant symbol to a second point in the data patii; (e) encoding the data block at said second point in the data path according to said same data integrity code to generate a second redundant symbol associated with the data block; 5 (f) incorporating a second logical block address into said second redundant symbol to generate a second data integrity block symbol, said second logical block address being the same as said first logical block address in the absence of a logical block address error; and (g) comparing said first redundant symbol to said second redundant 0 symbol to verify the logical block address of the data block after transmission over the data path. 35 2. A method of protecting a data block passed through a buffer memory comprising the steps of: (a) transmitting the data block to a first cross-check encoder and to the buffer memory; (b) encoding the data block in said first cross-check encoder according to a cross-check code to generate a first redundant symbol associated with the data block; (c) incorporating a first logical block address of the data block into said first redundant symbol to generate a first data integrity block symbol; (d) appending said first data integrity block symbol to the data block in the buffer; (e) transmitting the data block and said appended data integrity block symbol from the buffer to a second cross-check encoder; (f) encoding the data block in said second cross-check encoder according to said cross-check code, said second cross-check encoder generating a second redundant symbol for the data block; (g) incorporating a second logical block address into said second redundant symbol to generate a second data integrity block symbol, said second logical block address being equivalent to said first logical block address in the absence of a logical block address error; and (h) comparing said appended first data integrity block symbol to said second data integrity block symbol to determine whether a data transmission error has occurred. 3. An apparatus for including logical block address information in encoded data transmitted between a data source and a receiving end in a data channel comprising: a first encoder receiving a data block from the transmission source and outputting a first redundant word for said data block; a first logical block address source comprising a counter circuit, said first source generating a first logical block address for said data block; a first combination means electrically connected to said first encoder and said first logical block address source for combining said first logical block address and said first redundant word; a second encoder connected through said data channel to said first encoder and to the data source, said second encoder generating a second redundant word for said data block; a second logical block address source comprising a second counter circuit, said second source generating a second logical block address for said data block; a second combination means electrically connected to said second encoder and said second source for combining said second logical block address and said second redundant word; and means for comparing said first redundant word including logical block address with said second redundant word including logical block address. 4. The apparatus of claim 3 further comprising a buffer located in the data channel between said first encoder and said second encoder, said buffer selectively receiving, storing and transmitting said data block being passed between the source and receiving end. 5. The apparatus of claim 3 wherein said first and said second encoders each implement an identical code, said code also being used as a cross-check code. 6. The apparatus of claim 5 wherein said code is further utilized as a data integrity code.

Inventors: CHANG STANLEY M, FREDRICKSON LISA, GOLD CLIFFORD, CHANG, STANLEY, M., FREDRICKSON, LISA, GOLD, CLIFFORD
Applicants: QUANTUM CORP, QUANTUM CORPORATION
Application year: 1996
Main classification: G06F11
IPC codes: G06F11, G11B20, H03M13, H04L1