METHOD AND APPARATUS FOR DETECTION OF ERRORS IN MULTIPLE-WORD COMMUNICATIONS

申请号 EP97906560.0 申请日 1997-02-12 公开(公告)号 EP0823161A1 公开(公告)日 1998-02-11
申请人 HAL COMPUTER SYSTEMS, INC.; 发明人 SHIMIZU, Takeshi; WICKI, Thomas Martin; HELLAND, Patrick James;
摘要 A method and apparatus colors the conventional error codes of each word of a multiword transmission to facilitate the detection of bit errors in each word or words which are out of order or not part of the transmission, without affecting the data in the word. A 1-bit by n-bit matrix is assembled using the header word, and zeros for the header of the multiword transmission, or the data word, error code, if any, an identifier portion of the header word and zeros for each data word, and the 1-bit by n-bit matrix is multiplied by an n-bit by m-bit matrix assembled from a conventional error coding matrix and other matrices. The result either produces an error code to be sent with the header or data, or a check code to be verified as all zeros to indicate the absence of bit errors within the header or data word, and that the word is in the proper packet and in the proper sequence within the packet.
权利要求
What is claimed is:
1. A method of producing a code to detect errors for a word in a first packet comprising a header word and at least one data words, the header and at least one data word having a data portion and a sequence in the packet, the method comprising:
reading the data portion of the word;
producing from the data portion of the word read, a code to detect bit errors within the word;
producing a coloring product; and
exclusive-ORing the code produced and the coloring product produced.
2. An apparatus to produce a code to detect errors for a word in a first packet comprising a header word and at least one data words, the header and at least one data word comprising a data portion and an error portion and having a sequence in the packet, the apparatus comprising:
a data input for accepting the data portion of the word;
an error input for accepting the error portion of the word;
a first module having a first input coupled to the data input and an output, the first module for producing at the output a code to detect bit errors in the word;
a second module having an output having a value greater than zero during a first period;
an Exclusive-OR having a first input coupled to the first module output, a second input coupled to the second module output, and an output, the first module for computing and presenting at its output the exclusive- OR of the Exclusive-OR inputs;
an error output coupled to the Exclusive-OR output; and
a data output coupled to the data input.
说明书全文

METHOD AND APPARATUS FOR DETECTION OF ERRORS IN MULTIPLE-WORD COMMUNICATIONS

Cross-References to Related Applications

The subject matter of this application is related to the subject matter of the following applications:

application serial number , attorney docket number 2268, entitled "ASYNCHRONOUS PACKET SWITCHING" filed on February 22, 1996, by Thomas M. Wicki, Patrick J. Helland, Takeshi Shimizu, Wolf-Dietrich Weber, and Winfried W. Wilcke;

application serial number , attorney docket number 2269, entitled "SYSTEM AND METHOD FOR DYNAMIC NETWORK TOPOLOGY EXPLORATION" filed on February 22, 1996, by Thomas M. Wicki, Patrick J. Helland, Wolf-Dietrich Weber, and Winfried W. Wilcke;

application serial number , attorney docket number 2270, entitled "LOW LATENCY, HIGH CLOCK FREQUENCY PLESIOASYNCHRONOUS PACKET-BASED CROSSBAR SWITCHING CHIP SYSTEM AND METHOD" filed on February 22, 1996, by Thomas M. Wicki, Jeffrey D. Larson, Albert Mu, and Raghu Sastry;

application serial number , attorney docket number 2271, entitled "METHOD AND APPARATUS FOR COORDINATING ACCESS TO AN OUTPUT OF A ROUTING DEVICE IN A PACKET SWITCHING NETWORK" filed on February 22, 1996, by Jeffrey D. Larson, Albert Mu, and Thomas M. Wicki;

application serial number , attorney docket number 2272, entitled "CROSSBAR SWITCH AND METHOD WITH REDUCED VOLTAGE SWING AND NO INTERNAL BLOCKING DATA PATH" filed on February 22, 1996, by Albert Mu and Jeffrey D. Larson;

application serial number , attorney docket number 2274, entitled "A FLOW CONTROL PROTOCOL SYSTEM AND METHOD" filed on February 22, 1996, by Thomas M. Wicki, Patrick J. Helland, Jeffrey D. Larson, Albert Mu, Raghu Sastry and Richard L. Schober, Jr.;

application serial number , attorney docket number 2275, entitled "INTERCONNECT FAULT DETECTION AND LOCALIZATION METHOD AND APPARATUS" filed on February 22, 1996, by Raghu Sastry, Jeffrey D. Larson, Albert Mu, John R. Slice, Richard L. Schober, Jr. and Thomas M. Wicki;

application serial number , attorney docket number 2278, entitled "CLOCKED SENSE AMPLIFIER WITH POSITIVE SOURCE FEEDBACK" filed on February 22, 1996, by Albert Mu;

all of the above applications are incorporated herein by reference in their entirety.

Field of Invention

The present invention relates to error detection and more specifically to error detection of multiple-word communications.

Background of Invention

Communications systems such as packet switched networks allow devices to transmit and receive information. Referring now to Figure IA, a conventional packet switched network is shown. Each conventional device 10, 12, 16, 18 can act as both a sending site and a receiving site to send and receive data from the other devices 10, 12, 16, 18 in the network. Conventional router 14 receives data in the form of packets from each sending device 10, 12, 16, 18 and routes it to the proper receiving device 10, 12, 16, 18 according to header information contained in the packet.

Header information may contain an identifier containing routing information and a "nearly unique" packet number in addition to other information. The nearly unique packet number may be an identifier which has a large number of bits randomly or sequentially selected by the sending site, making the identifier also nearly unique. Although the identifier is unlikely to be the same as the identifier of the header from another packet sent to the router 14 at the same time, there is a small probability that two headers being sent to the router 14 could have the same identifier.

Referring now to Figure IB, a conventional packet 102 is shown. Header 110 is followed by a number of words of data 112, 114, 116 in a certain order. The header 110 in Figure IB has an identifier 130 in bits 80 through 115, though other sizes and bit positions of identifiers are possible. The identifier 130 contains "relatively unique" information Each data word 112, 114, 116 and the header 110 has an appended error code 120, 122, 124, 126, which can be used to detect and even correct errors in the remainder of the individual words of data 112, 114, 116 or header 110 information. For example, each word 110, 112, 114, 116 in the packet 102 may contain 128 bits of data or header information and an 8 bit error code 120, 122, 124, 126 to create 136 bit words for transmission at a sending site. The error codes 120, 122, 124, 126 are checked against the data 170 at the receiving site to detect or correct errors within the data portion 170 of each word 110, 112, 114, 116. Once the data is determined to be correct, the error codes 120, 122, 124, 126 may be removed from the data portions 170 by the receiving site, and the data portions 170 of each word 110, 112, 114, 116 are ready for use by the receiving site.

Conventional error detection and error detection and correction codes may detect and correct errors related to a single word of a digital transmission. Many methods may be used to implement various error detection codes and error detection and correction codes. The methods described in Rao T.R.N. & E Fujiwara, Error-Control Coding for Computer Systems (Prentice Hall, 1989), D.K. Pradhan & J.J. Stiffler, Error-Correcting Codes and Self Checking Circui ts , 27-37 (Computer, Vol 13 No.3 March, 1980) , H. Imai Essentials of Error-Control -Coding Techniques (Academic Press, 1990) or E. Fujiwara et. al Error- Control Coding in Computers , 63-72 (Computer July 1990) may be used to detect certain errors within the data portion of a word 110, 112, 114, 116.

Error codes 120, 122, 124, 126 may be generated using a binary matrix multiplication process which multiplies the data portion 170 of a word 110, 112, 114, 116 with a matrix which is predefined by the designer of the error code. For example, error codes set forth above are generated by binary matrix multiplication of the data portion 170 of each word 110, 112, 114, 116 and the matrix set forth in Appendix A. Each binary matrix product of the matrix of Appendix A and each word 110, 112, 114, 116 is the error code portion 120, 122, 124, 126, respectively to be appended to the data portion 170 of the word 110, 112, 114, 116.

Binary matrix multiplication works as follows:

Assume two matrices, A and B:

A= ι_ a2- ..an B = b]_χ bι_2 b13-- -t)lm (Eqs. la and lb) b21 b22 b23 • • -b2m

bnl bn2 bn3 nm

A x B using binary matrix multiplication produces the m bit result, C = C]_ C2 C3...cm (Eq. 2)

Where CJ_= ∑aj x bj-j_ (Eq. 3a) j=l

and where the "product" (indicated by 'x' ) of two numbers is the binary "AND" function, and the "sum" of a sequence of numbers is the exclusive-OR of the sequence: 0 if the number of 'l's in the sequence is an even number, and 1 otherwise.

Each of the products in Equation 3 need not be computed where a or b ^ is known in advance to be zero, because the product of these terms will not affect the result c^ . Additionally, where the terms of one matrix are known in advance to be zero or one, the product itself need not be computed: the corresponding terms in the other matrix which would have been ANDed with the known terms equal to one may be exclusive-ORed with each other. Thus Equation 3a becomes, for known values of bji: n

∑aj only for j where bj _ -1 (Eq. 3b) j=l

While conventional error detection and error detection codes can detect, or detect and correct, certain errors within each word 110, 112, 114, 116 of a packet 102, these conventional error detection codes and error detection and correction codes cannot detect the presence of intraword errors, such as a word in the packet 102 out of its original sequence or a word from one packet improperly inserted in place of a word in another packet.

The first of the two problems arises when words 110, 112, 114, 116 are assembled, transmitted or received in the improper order. Because the data portion 170 within each word 110, 112, 114, 116 may match the corresponding error detection or error detection and correction codes 120, 122, 124, 126 the error detection or error detection and correction code 120, 122, 124, 126 cannot be used to identify the out-of-sequence error. The second problem arises when a word which is located in another packet is inserted among the words 110, 112, 114, 116 of the first packet. This problem may arise if a word is not properly written into a memory, and an old value remains in place of the new value. Because the data portion 170 in this improperly- inserted word can match the corresponding error code, using an error correction and detection code will not identify the fact that the word has been improperly inserted into the wrong packet. Thus, other means of detecting these additional two errors are required.

One method which identifies missing or improperly inserted words is to use a checksum technique. A transmitting site adds a final checksum word 118 which may contain a parity, either odd or even, of each of the columns from words 110, 112, 114, 116 above the checksum 118. For example, parity in column 0 is determined by exclusive-ORing the bits in Column 0 of words 110, 112, 114, 116. Upon receipt of the packet, the bits in each column are tested to ensure the proper parity. Improperly inserted words or missing words may generate parity errors. Checksum 118 may also be a cyclical redundancy checksum, or CRC. However, the use of a checksum 118 requires that all of the words 110, 112, 114, 116, 118 are received before errors may be detected. Where words are received sequentially, undesirable delays are introduced before each word 110, 112, 114, 116 may be used at the receiving site. Additionally, the checksum method cannot identify a packet in which each of the words 110, 112, 114, 116 is in the packet, but out of their original order.

Summary of Invention

Using matrix multiplication of the data and coloring information, coloring is performed either on the error codes of the words in the packet, allowing for the rapid detection of out-of-order and improperly-inserted words in a packet, and leaving the data words unchanged for immediate use upon receipt. ALternately, coloring is performed on the data words in the packet after the error code is computed allowing for the rapid detection of out-of-order and improperly-inserted words in a packet, while simplifying the logic otherwise required to color the error codes.

Brief Description of the Drawings

Figure IA is a block schematic diagram of four devices coupled to a router in a conventional packet switching network.

Figure IB is a block diagram illustrating header, data and checksum words in a conventional packet.

Figure 2A is a block diagram illustrating the positions of data and coloring information in a first matrix for coloring a header word according to one embodiment of the present invention.

Figure 2B is a block diagram illustrating the positions of data and coloring information in a first matrix for coloring data words according to one embodiment of the present invention. Figure 3 is a a block diagram illustrating the positions of coloring information in a second matrix according to one embodiment of the present invention.

Figure 4A is a flowchart illustrating a method of coloring and uncoloring error codes for header and data words of a packet according to one embodiment of the present invention.

Figure 4B is a flowchart illustrating a method of coloring and uncoloring error codes for header and data words of a packet according to an alternate embodiment of the present invention.

Figure 5 is a block schematic diagram of an apparatus for coloring and uncoloring error codes for header and data words of a packet according to one embodiment of the present invention.

Figure 6 is a flowchart illustrating a method of coloring data in data words of a packet according to an alternate embodiment of the present invention.

Figure 7 is a flowchart illustrating a method of uncoloring data in data words of a packet according to an alternate embodiment of the present invention.

Figure 8 is a block schematic diagram of an apparatus for coloring data in data words of a packet according to an alternate embodiment of the present invention.

Figure 9 is a block schematic diagram of an apparatus for uncoloring data in data words of a packet according to an alternate embodiment of the present invention.

Detailed Description of a Preferred Embodiment

According to the present invention, "coloring" techniques are used to identify out-of-order words or improperly inserted words. Referring again to Figure 1, "hashing" and "coloring" means exclusive-ORing a set of bits with some or all of the bits of the data 170 or error 172 portion of the header or data words 110, 112, 114, 116. Exclusive-ORing the same pattern a second time with the colored data or error code yields uncolored data or error codes . The present invention colors one or more known patterns into the error code portion 172 or data portion 170 of some or all of the words 110, 112, 114, 116. The coloring is removed upon receipt of the packet. Checksums 118 are not used in the packet 100. Because removal is performed according to the expected sequence and collection of each of the words 110, 112, 114, 116, out-of-sequence words or improperly inserted words result in errors inserted into the error code portion 172 or data portion 170. When the data portion 170 is verified using the error detection or error detection and correction code of the error portion 172 the data portion 170 will be identified as corrupted.

In one embodiment of the present invention, the error portion 172 of the data words 112, 114, 116 are colored, and in another embodiment, the data portion 170 of the data words 112, 114, 116 are colored. The first embodiment is known as

"coloring on error codes," and the second embodiment is known as "coloring on data."

A. Coloring on Error Codes.

An error detection or error detection and correction code may be generated and hashed with sequence and packet identifiers using binary matrix multiplication of two matrices. Referring now to Figure 2A and 3, for each packet having header word DQ and y words of data Dι_ through Dy, the m-bit error code EQ to append to the header packet on transmission is:

E0 = DD0 x H' (Eq. 4)

Where

DDQ 209 is the concatination of DQ 200, Zι_ 202, Z2 204 and Z3 208 where

∑i 202 is a sequence of m ' 0 ' s;

Z2 204 is a sequence of q (defined below) ' 0 ' s; and

Z3 208 is a sequence of y ' 0 ' s;

and where, in one embodiment, H' 308 is the concatenation of G 310 above I 312 above J 314 above K 318, where

G 310 is an error detection or detection/correction matrix, such as the matrix of Appendix A;

I 312 is a y-bit square unit matrix of all ' O's except 1^ = ' 1' for all k, from 1 to y;

J 314 is a subset 316 of G, having all columns of the rows corresponding to the bit positions of Uø, described below; and

K 318 is a subset 320 of G having all columns of any y rows not in J.

Some error detection or detection/correction matrices, such as the matrix of Appendix A. each row is orthogonal to the other rows in that matrix. In one embodiment, J and K may have any value such that each row of the matrix made of G above J above K is orthogonal to every other row in the matrix made of G above J above K.

Referring now to Figures 2A and 2B, the error code EJJ to append to each data word DJJ where

N = 1 to y (Eg. 5)

is:

EN = DDN x H' (Eq. 6) where DDN 219 is the concatination of DN 210, Zrø 212, Uø 214 and VN 218, where

Uø is a q-bit identifier portion 206 of DQ which is expected to be "nearly unique," that is, has a low probability of being duplicated in another header; and

VN is a sequence of y 'O's, with a ' 1' substituted in place of the N to the last '0' . e.g. Vi = 00000001, V2 = 00000010, etc. At the receiving site, the coloring information is decolored, from the corresponding error code to produce y+1 check codes Cø through Cy, which should each be all zeros if there are no errors within the word, the word is in the proper sequence, and the word is in the proper packet. The error code Cø for the header is

Cø = CC0 x H' (Eq. 7)

where CCø 209 is the concatination of Dø 200, Eø 212, Z2 204 and Z3 208.

The error codes C^ for the remaining data words are

CN = CCN x H' (Eq. 8)

Where CCN 219 is the concatination of DN 210, E^j 212, Uø 214 and VN 218.

Referring momentarily to Figure 1, in one embodiment, the header 110 is word 0, and up to eight data words 112, 114, 116 follow the header, words 1-8, the nearly unique portion 130 of the packet 100 is bits 80-115 of the header 110 and the y columns not in J which will be binary matrix multiplied with K are columns 8-15 140, 142, 144, 146. An eight bit error code is computed as described above using the table in Appendix A as the

G matrix, and this error code is appended to each word prior to transmission of the packet. Upon receipt, the check codes described above are calculated and checked to see if the check codes are all zeros, indicating no bit or out of sequence or or misinserted word errors have occurred.

Referring now to Figure 4A, one embodiment of a method of detecting bit or out of sequence or misinserted word errors according to the present invention is shown. The method of Figure 4A may be performed at the transmitting site to produce an error code for each word of the packet, and again at the receiving site to check the packet. As described below, it is not necessary to multiply each pair of matrices in Equations 4, 5, 7 and 8 all at once, as each matrix may be split into sub matrices, pairs of submatrices may be multiplied using binary matrix multiplication, and the products of each of the pairs of submatrices exclusive-ORed to achieve the same result as a single binary matrix multiplication of the original pair of matrices. The product of any pair of submatrices is known as a "coloring product" .

A counter N is set to zero 410, and will keep track of which word, from 0 to 9 in one embodiment, in the packet is being processed. Coloring product Vβj x K may be calculated for all N 412 because the result is independent of any of the words in the packet. In one embodiment, JJ x K is calculated only for the current value of N. In such embodiment, step 412 for only one K would be moved below step 414 to fall within the loop which begins below step 414. In one embodiment, the "calculation" of V^ x K is a table lookup because V^j and K are both constants, with a product which may be precomputed and stored in a table. In another embodiment, V^ x K is actually calculated using the technique of binary matrix multiplication. The result of the calculation may be stored for future use.

A portion of the header word Dø and the J submatrix are used to calculate the coloring product Uø x J, 414 which may be stored for future use. In another embodiment, Uø x J is calculated when it is used as described below, although in such embodiment, Uø must be stored. The current word DJJ, where the header word is Dø and each data words are D]_ through Dg is used to calculate DN x G 416.

Step 418 is performed by the receiving site to compute the coloring product EJJ x I. At the transmitting site step 418 may be performed with EJJ equal to all zeros in one embodiment, or step 418 may be omitted in another embodiment.

As described above in Equations 4 and 6, and 7 and 8, the calculations for the header word are different from the calculations for the remaining data words. Thus, if N=0 420, the current word is the header word and the results of steps 416 and 418 are exclusive-ORed together to produce a result 422. Otherwise, the current word is a data word, and the results of steps 412 for the current value of N, and the results of steps 414, 416 and 418 are exclusive-ORed to produce a result 424.

In one embodiment, the steps 416, 418, 420, 422, 424 described above are repeated until all of the words in the packet have been processed 426. At the transmitting site, the results of steps 422 and 424 are appended to the respective words Dø through Dg 430. At the receiving site, the results of steps 422 and 424 are checked to ensure each bit is zero 432, indicating no error has occurred 436. If any of the results of steps 422, 424 are nonzero, an error has occurred 432, 434, indicating one or more incorrect bits in the word, an out-of- order word in the packet, or an improperly inserted word is in the packet, and the method may terminate 438.

In another embodiment, each result produced by steps 422, 424 are appended or checked one at a time. Referring now to

Figure 4B, an alternative method according to one embodiment of the present invention is shown. Steps 410, 412, 414, 416, 420, 422, 424 operate as described above, but step 426 has been shifted down to allow steps 428, 430, 432, 434, and 436 to be performed after the calculation of each result from steps 422 and 424. This allows the error codes to be immediately appended to each data word, or immediately checked, as they are computed, which can allow the process to be suspended 438 if any error is discovered. In this embodiment, an error can allow the receiver to generate a request to the sender to resend the packet or to suspend processing of the packet sooner than the embodiment described in Figure 4A, which only detects errors after all of the words in the packet have been received and checked.

Referring now to Figures 4A and 4B, in one embodiment, step 428 is not performed: instead, step 430 is performed only at the transmitting site, omitting steps 432, 434, 436 and 438, or alternatively steps 432, 434, 436 and 438 are performed only at the receiving site, omitting step 430.

Referring now to Figure 5, an apparatus 500 for computing error codes according to one embodiment of the present invention is shown. DI and El inputs 510 accept a k-bit data portion of header or data word and a corresponding error code having r bits. In one embodiment, the apparatus 500 is used at both the sending and receiving sites, with the El input of input 500 set to all zeros at the sending site. In another embodiment, inputs 510 accept only the data portion of the header or data words at the sending site.

Module Ml 516 has an input 512 coupled to the DI and El inputs 510 and an input 511 which is coupled to a storage device 536 such as a ROM or flash memory which stores the G and I matrices described above. Module Ml 516 uses binary multiplication or an equivalent process to produce the product of DI at input 510 and the G matrix at input 511, and the product of El at input 510 and the I matrix at input 511. In one embodiment, inputs 511 and 512 allow DI and El to be presented to Ml 516 simultaneously, and G and I to be presented to module Ml 516 simultaneously. In another embodiment, the G and I matrices are stored in a storage device contained in module Ml 516. In another embodiment, the G and I matrices are not stored, and DI and El inputs 510 corresponding to elements of G and I having a value of 1 are exclusive-ORed using the logic of Equation 3b. In one embodiment, module Ml 516 outputs both products simultaneously over line 540, in another embodiment the products are output sequentially and assembled by Exclusive-OR 530. In another embodiment, the products are exclusive-ORed prior to output over line 540.

Module M2 518 is coupled to the m bits of DI corresponding to Uø via input 514 and computes the binary matrix multiplication of the bits corresponding to Uø of the input DI at input 510 and the J matrix described above at input 513. This allows for the computation of Uø at the time the DI input of input 510 is coupled to Dø . Register Rl 510 latches the product produced by module M2 518 when header Dø is at the DI input of input 510 for use with the data words of the packet. It isn't necessary that the header word always arrive as the first word of the packet, as long as register Rl 520 is able to distinguish the header from the remaining data words in the packet. However, in such case, the data words which arrive prior co the header must be stored until the header arrives if the header contains identifier information required to decolor the data words. In another embodiment, module M2 518 is not coupled to storage module 536, instead storing the J matrix within module M2 518. In another embodiment, the J matrix is not stored, and Uø corresponding to elements of J having a value of 1 are exclusive-ORed using the logic of Equation 3b. However, because the J matrix is a subset of the G matrix, the use of the storage device 536 by modules Ml 516 and M2 518 may require duplicate storage of the J matrix for use in the G matrix by module Ml 516 and for use alone by module M2 518.

Module M3 may be coupled to receive the K matrix described above from storage module 536 via input 537, or alternately, may store the K matrix within module M3 526. The K matrix is a subset: of the G matrix, so the alternate embodiment may require additional storage, as K may be stored for use in the G matrix by Ml 516 and for use alone by module M3 526. In another embodiment, the result of V]\j x K is precomputed and stored in a storage device such as storage device 536 or in a similar device within module M3 526 to speed computation because the result provided at output 544 requires none of the inputs 510.

In one embodiment, masks Al 522 and A2 528 mask the input of the preceding stages 520 and 526 respectively, to block the output of the preceding stages when those outputs correspond to the header word. As described above in Equations 4 and 7, computations for the header word do not utilize Vjj x K or UI x J, and thus Al 522 and A2 528 have outputs 548, 550 equal to all zero when the outputs 546, 544 correspond to the header word. Exclusive OR 530 exclusive-ORs the outputs 540, 548, 550 to produce the r-bit EO output 534.

At the sending site, EO output 534 is the error code EN to append to the data word DI at input 510, which is transferred to DO output 532 unchanged. At the receiving site, EO output 534 is Cjvj, which is all zero if none of the errors described above are detected. EO output 534 may be coupled to the input 562 of verifier 560, which signals true at its output 564 if all bits of EO output 534 are zero. B. Coloring on Data.

Where it is desirable to simplify the logic otherwise required for coloring on error codes, and it is not necessary to have the data arrive uncolored at the receiving site, the data may be colored.

Referring now to Figure 6, one method of coloring data according to one embodiment of the present invention is shown. A counter N is used to keep track of the order of each word, with zero corresponding to the header word. N is set to zero, 610 and a word is received 612. The error code is generated 614 any error code generation technique, such as the binary matrix multiplication of x G. The error code so generated may be appended 616 to the data word for transmission in one embodiment, or separately sent and not appended in another embodiment. If N is zero 618, the word received in step 612 is the header, and the columns of Dø corresponding to Uø as described above are stored for later use 620. If N is not zero 618, the word received in step 612 is not a header word, and Uø from the header corresponding to the packet containing E is colored 622 into DN by exclusive-ORing the bits from Uø with the bits in DJJ which are in the same columns as Uø . In one embodiment, sequence information VJNJ is colored 624 into DJVJ by exclusive-ORing VJJ with any of the bits in D^ not exclusive-ORed with Uø. Steps 612, 614, 616, 618, 622, 624, 626 are repeated after adding 1 to N 628 for all the words in the packet, after which the method terminates 630.

Referring now to Figure 7, a method of uncoloring the data in the data words in a packet according to one embodiment of the present invention is shown. A counter N is set to zero 710 to signify the header word, and the data word and error code are received, with the data word colored as described with reference to Figure 6. If N is zero, the word received in step 712 is a header word, and Uø from the header word is stored 716 to be used to uncolor data words. Otherwise, the word received in step 712 is a data word, which is uncolored by exclusive-ORing the data word DN with VJJ 718 and Uø 720 in the same bit positions as Vrø and Uø were colored into Dj as described with reference to Figure 6. The check code CKN is calculated 722 using binary matrix multiplication of EJJ x I, exclusive-ORed with the uncolored data word DN x G. The check code is checked to see that it is all zeros 724, and if the check code is not zero, a bit error, sequence error, or misinserted word error has occurred and the process may terminate 726. Otherwise, N is incremented 728 and the above steps excluding step 710 are repeated until all words in the packet have been processed 728.

Referring now to Figure 8, an apparatus for coloring words in a packet according to one embodiment of the present invention is shown. Data input DI 810 accepts the data or header word, and module Ml 824 computes the error code of the uncolored data word using binary matrix multiplication of the data word received at the input 810 and the G matrix. In one embodiment, the G matrix is stored in a ROM in module Ml 824, and in another embodiment the principles of Equation 3b are used to exclusive- OR bits in DI corresponding to bits equal to one in G. Rl 812 latches Uø when DI 810 receives the header Dø . Al 814 passes the output of Rl 812 to its output except when DI 810 receives the header Dø so as not to color the header. CI provides Vj for each Djsj by counting the words received at DI 810 beginning with zero. A2 818 passes the output of CI 816 to its output except when DI receives DO, in which case A2 818 has output equal to all zeros, so as not to color the header. XI 820 exclusive-ORs the coloring information from Al 814 and A2 818 to provide a colored data output 822 to be transmitted.

Referring now to Figure 9, an apparatus for uncoloring data words is shown. Colored data and error codes are received by DI + El input 910. Rl 912 latches U0 when input 910 contains the header data and error code to use to uncolor the data words. CI

916 provides Vjj in the same manner as CI 816 of Figure 8. Al 914 and A2 918 operate the same as Al 814 and A2 816 of Figure 8. Exclusive-OR XI 920 exclusive-ORs the bits from Al and A2 with the same bits of DI at input 910 as were colored as described with reference to Figure 8 to produce the uncolored data output DO 922. DO 922 is binary matrix multiplied by G, and El from input 910 is binary matrix multiplied by the I matrix, and each result is exclusive-ORed with the other to produce the check code CKN at EO output 926. C will be zero if no bit errors, out of sequence errors or misinserted word errors have occurred. The EO output may be coupled to the input of Check 950, which outputs true if all bits at its input are zero.

QQ群二维码
意见反馈