Modifying check codes in data packet transmission

Abstract: A scheme for altering checking information in a message packet intended to be transmitted between computers is described. In this scheme, when an information portion of the packet is altered, checking bits contained in the packets are altered in dependence only on the set of checking bits in the message packet before modification of the information portion and on the modifications to the information portion. Thus, it is not necessary to generate new checking bits from a modified information portion.

Description: This invention relates to the generation of checking data, in particular for checking transmitted messages. Most efficient coding schemes used for message transmission have the effect that a single-bit error in the received data can turn into a multiple-bit error when decoded. Conventional schemes overcome these multiple-bit errors using cyclic redundancy checks (CRCs). These CRCs take the form of several checking bits transmitted at the end of a message or message packet. So-called data-strobe links, i.e. two wire links which have one wire carrying data and one wire carrying clock signals, carry very short packets, as short as 14 bits for an acknowledgement packet which comprises a ten bit data token (8 bits of data, one parity bit and one flag bit) and a four bit end of packet token ( one parity bit, one flag bit and two control bits). Adding a CRC to each packet could at least double the length of the packet. It is thus more appropriate to consider adding a CRC to a message comprising a plurality of packets rather than to a packet itself. This can be quite efficient, for example a 4 byte CRC could check a message having a length of 4 Kbytes. However, this gives rise to problems when messages are to be routed through a processor network using routing switches. Messages may be transmitted as a plurality of packets, each packet being a self-contained transmissible unit having an address portion or header, a data portion and an end of packet (EOP) indicator. Where the packet is the last packet in a message, this EOP indicator is replaced by an end of message (EOM) indicator. It is known that when routing messages through a network comprising a plurality of routing switches, headers can be altered. In one known routing arrangement, a packet has two headers, one header identifying a logical channel within a remote processor to which the message is to be sent and which remains unaltered until the message reaches its final destination and another header which identifies the terminal link of a network connected to the final destination. In that case, the header identifying the final destination is removed at that processor to reveal the logical channel header. Where the network comprises a plurality of sub-networks, the packet can be transmitted with a plurality of headers, the first one of which identifies the outgoing link of a first sub-network. When the packet reaches that link, the first header is removed to reveal a second header identifying the outgoing link of a second sub-network. That link could be the terminal link of the final destination or entry into a further sub-network. For routing within a network or sub-network, each routing switch can be capable of adding a randomly generated header to a packet, the randomly generated header identifying a further routing switch. When the packet reaches the routing switch identified by that header, it is then removed to reveal the original header. These header deletion and addition techniques are described in US Patents 5,130,977 (Random Header) and 5,140,583 (Wormhole Routing) the contents of which are herein incorporated by reference. In another message transmission scheme known as asynchronous transfer mode (ATM), headers are altered (or translated) during transmission. With headers being added, deleted or translated it is very difficult to preserve a CRC on the whole packet including the headers except by stripping it on entry to a routing switch, recomputing it to take into account the new header, and then adding it into the packet on exit. Where the CRC is for a whole message rather than just one packet this is far more difficult to achieve since it requires the storage of information at the routing switch relating to all packets in the message. EP-A-0366 589 disclose a data communication system wherein, to maintain the integrity of error checking provided by cyclical Redundancy Checking techniques, a system receiving frame modifies a Frame Check Sequence field value only as a function of the known or planned changes to be made in the frame. EP-A-0313 707 discloses a process for updating the frame check sequence of a digital frame including an embedded variable header polynomial. The process includes generating a differential polynomial by XORing a modified polynomial header and the previous polynomial header, computing a differential frame check polynomial sequence on the differential polynomial and adding the result to the frame check sequence. EP-A-0552 861, which forms state of the art in respect to this application for novelty only according to Article 54(3)EPC, discloses a method and circuit for modifying the check code of a data packet to take into account the addition or deletion of a header to or from the data packet. Generally, therefore, in the current state of the art, either a check is provided only in respect of the data portion of the packet which will remain unaltered during transmission, or modification of the packet header is not permitted or the CRC must be completely recomputed when the header is modified. It would be desirable to provide a way of providing a check on a whole packet which readily allows for modification of the packet while it is being transmitted between source and destination nodes. According to the present invention there is provided a method of modifying a message packet which comprises a plurality of sets of information bits constituting an information portion and a set of checking bits, the method comprising: modifying the information portion of said message packet, characterised in that:- all said sets contain the same number of bits in a sequence of bit locations between a bit location of least significance to a bit location of most significance and each checking bit has been generated by taking the logical sum of bits in all of the sets having the same significance in all of the sets; and said method further comprises altering the checking bits by using only the modifications to the information portion and the unmodified message packet checking bit of corresponding significance to each said modification. It is particularly convenient if each set has four bits (a nibble) to provide a nibble of checking bits. Where the packet is arranged for serial transmission the information portion comprises a header portion followed by a data portion, which is followed by a terminator portion including the set of checking bits. The terminator portion can also include control information identifying end of packet or end of message. According to the present invention there is also provided circuitry for modifying a message packet comprising a plurality of sets of bits constituting an information portion of said packet and a set of checking bits (CHECKSUM), said circuitry comprising: an input circuit for receiving said message packet; and means for modifying the information portion of said message packet, characterised in that:- all said sets containing the same number of bits in a sequence of bit locations between a bit location of least significance and a bit location of most significance, and each checking bit having been generated by taking the logical sum of bits in all the sets having the same significance, in all of the sets; and said circuitry further comprises a checking bit generator operable to modify the received checking bits using only the modifications to the information portion and the received checking bits of the corresponding significance to each said modifications. When the message packet is routed through a routing switch and the header portion is altered by either deletion of a set of its bits or the addition of another set of bits, the set of checking bits is modified simply by taking the exclusive-OR of the bits in the added or deleted sets with the bits of same significance in the set of checking bits. Where the header portion is altered by inversion of one of its bits, the set of checking bits is modified by inverting the corresponding checking bit. Not only does this enable the checking bits to be preserved in a simple fashion but it also has the advantage that the outgoing check is a function only of the original check and changes to the packet, rather than of all the data in the packet which might have been corrupted by transmission through the switch. For a better understanding of the present invention and to show how the same may be carried into effect reference will now be made by way of example to the accompanying drawings, in which: Figure 1 is an example of a routing switch network; Figure 2 is a representation of a packet having a first header arrangement for routing; Figure 3 is a representation of a packet having a different header arrangement for routing; Figure 4 is a block diagram of a source and destination node; Figure 5 is a circuit diagram of a longitudinal parity generator; Figure 6 is a circuit diagram of a longitudinal parity detector; Figure 7 is a block diagram of a routing switch; and Figure 8 is a circuit diagram of a checksum adjuster which deletes headers. Figure 1 is a block diagram of a network 10 consisting of a plurality of routing switches 2 connected together by bidirectional message links 4. In the particular embodiment shown in Figure 1, each of the routing switches is connected to four other routing switches, namely its immediate neighbours in the north, south, east and west directions. However, it is envisaged that each routing switch could be connected to as many other routing switches as the application required. Some of the routing switches 2 in Figure 1 are also shown connected to source and destination nodes 8 exterior to the network 10, by further bidirectional message links 6. The bidirectional message links 6 are known as terminal links. The source and destination nodes 8 may be microcomputers such as transputers and may further include additional circuitry, as will be described in detail hereinbelow. Messages are transmitted from the source and destination nodes 8 to the network 10 of routing switches 2 via the terminal links 6. Similarly messages are received by the source and destination nodes 8 from the network 10 of routing switches 2 via the terminal links 6. A message is made up of at least one and usually several packets. The construction of a packet generated by a source node according to one embodiment of the present invention will now be described with reference to Figure 2. As one example, consider a packet consisting of an information portion, including a header portion HP and a data portion DP, and a terminator portion TP. The header portion HP in this example consists of two header bytes Hl,HO, the first byte being HO and the second byte being Hl. Hl defines the logical channel within the destination node to which the packet is to be sent. HO defines the address of the terminal link of the network 10 of Figure 1 connected to the destination node to which the packet of Figure 2 is to be sent. The header portion HP of the packet will be described in further detail hereinbelow. The data portion DP is of variable length and consists of a plurality of sets of data bits which are to be transferred from the source node to the destination node. Herein, a set comprises four bits. It is convenient to consider the data portion as consisting of data bytes. The data portion consists of at least one and usually several data bytes. The terminator portion TP also, in this embodiment, consists of one byte. One nibble of the byte will be a control nibble, and another nibble of the byte will be a "checksum" nibble, discussed later. The terminator portion can define the end of a packet (EOP), or when the packet is the last packet in a message, the end of a message (EOM). The checksum nibble corresponds to four longitudinal parity bits derived in a manner described hereinafter. As described above the packet comprises a header portion including a byte of channel information Hl for identifying a channel destination of the packet, a plurality of data bytes and a terminator portion. Each data byte comprises two four bit nibbles, having bits p,q,r and s, bit p being the least significant bit of the nibble and bit s being the most significant bit of the nibble. Each longitudinal parity bit p, q, r and s is the logical sum of each of the respective bits p,q,r and s of each of the nibbles in the packet, including the nibbles which define the header portion. An example of generation of the longitudinal parity bits is given below. The data of the packet below is the sequence of bytes (in conventional Hex with the most significant nibble written on the left) Hex EDOC6F03. Hex value Binary 1sb msb p q r s 3 1 1 0 0 0 0 0 0 0 F 1 1 1 1 6 0 1 1 0 C 0 0 1 1 0 0 0 0 0 D 1 0 1 1 E 0 1 1 1 - - - - 1 0 1 0 The four longitudinal parity bits 1010 are known as the checksum nibble. In the present format, the checksum nibble is transmitted as part of the terminator portion of the packet as described above. This is convenient where the terminator portion is a byte, since it reduces the need for extra transmission bits which are normally required for checking. The checksum can be used for checking the parity of the packet on receipt. The logical sum of all of the p bits of the header and data nibbles plus the p bit of the checksum nibble should be zero, and similarly the bits q, r and s when a check of the longitudinal parity is carried out using the checksum. For the example illustrated above, the check is carried out as indicated below. Hex value Binary 1sb msb p q r s 3 1 1 0 0 0 0 0 0 0 F 1 1 1 1 6 0 1 1 0 C 0 0 1 1 0 0 0 0 0 D 1 0 1 1 E 0 1 1 1 - - - - 1 0 1 0 - - - - 0 0 0 0 In this embodiment, the control nibble is the least significant nibble of the terminator byte and the checksum nibble is the most significant nibble of the terminator byte, which denotes an end of packet terminator portion. Where the checksum nibble is followed by the control nibble this denotes an end of message terminator. The function of the header portion of the packet will now further be described with reference back to Figure 1. Consider the case where source and destination node N 1 is transmitting a packet to source and destination node N 10 . The most direct route from N 1 to N 10 through the routing switches 2 would be through the routing switches RS 4 ,RS 5 ,RS 6 and RS 7 . The source and destination node N 1 generates, in a manner to be described in detail hereinbelow, a packet conforming to the structure of the packet in Figure 2. HO denotes the terminal link 6 connected to node N 10 . In the example of Figure 1, the source and destination node N 1 is only connected to one routing switch, namely RS 4 . In an example where the source and destination node N 1 was connected to several routing switches, the microcomputer in the source and destination node may make a decision concerning to which routing switch the packet should first be sent, not only on the basis of the most direct route but also on the basis of the least busy route. The packet is sent to the network 10 from the source and destination node N 1 on the terminal link 6 to the routing switch RS 4 . The packet will pass through the network until it reaches, in this example, routing switch RS 7 . Routing switch RS 7 is operable to recognise the header HO and to strip off header byte HO, containing the address of its output terminal link 6 connected to source and destination node N10 from the packet. Routing switch RS 7 will then send the packet down the terminal link 6 to source and destination node N 10 , whereat header hyte Hl is read to identify the logical channel for which the packet is intended. It should be noted that although in this embodiment two headers are used, it is often the case that the number of headers is greater than two. In another example, a routing network may comprise a set of sub-networks. In such an example additional header bytes may be used in the header portion to define the output terminal link of each of the sub-networks. Figure 3 shows the construction of such a packet that is being sent from a source node to a destination node N 10 through such a network. Byte HO would contain the address of the output terminal link of a first routing sub-network. Similarly bytes H1,H2 and H3 would contain the addresses of the output terminal links of respective subsequent routing sub-networks. Byte H4 would then define the logical channel within the node to which the packet is to be sent. Header bytes H0,H1,H2,H3 are each successively removed by respective ones of the four sub-networks before the packet is transmitted down the outgoing link of the appropriate sub-network to the appropriate destination node. In another arrangement, each routing switch 2 can be operable to add a randomly generated header to a packet on receipt, that header then being used for subsequent routing of the packet. When the packet is received by a routing switch identified by the random header, the header is deleted to reveal the next header for subsequent routing. This is described in US Patent No. 5,130,977 referred to above. It will be recalled that in the description of the longitudinal parity checksum nibble given earlier, the checksum nibble is calculated not only from the data bytes but also from the header bytes. It is therefore necessary that as the packet passes through the routing switch network, the checksum nibble is recalculated every time a header is added or deleted. In a further embodiment of the present invention the header portion of the packet may have headers neither added nor deleted but rather translated as they pass through routing switches. When a header is translated it is effectively the same as subtracting a header and then adding a header immediately. However, translating a header will still require alteration of the checksum nibble. The longitudinal parity check described hereinabove is used herein for additions, deletions and translations of headers. Any byte added to the packet simply has the respective bits of its two nibbles exclusive-orred with the longitudinal checksum nibble of the packet. Any byte removed from the packet simply has the respective bits of its two nibbles exclusive-orred with the longitudinal checksum nibble of the packet. Translation of a byte can be implemented by subtracting a byte and then adding a byte, so both nibbles of both the subtracted and added bytes are exclusive-ORed with the longitudinal checksum nibble of the packet. Hence it is apparent that the checksum nibble can be recalculated by a simple operation, and does not require the recalculation of the entire checksum from all of the data and header bytes in the packet. Furthermore, when the packet is transmitted serially, a routing decision can be made based on the header portion and routing can commence before the entire packet is received by the routing switch. The checksum nibble can be modified and added to the end of the packet provided that modifications to the header are stored. Figure 4 is a block diagram of a circuit implementing one of the source and destination nodes 8 shown in Figure 1. A microcomputer circuit 12 outputs and inputs signals between a longitudinal parity generator 14 and a longitudinal parity detector 16. The microcomputer circuit 12 outputs packets to be transmitted TX DATA on line 18, a transmit bit clock TX CLOCK on line 20, a signal indicating that the terminator portion TP of the current packet is being sent TX TERM on line 22, and a signal indicating the transmission of data is being inhibited TX INHIB on line 24 to the longitudinal parity generator 14. The microcomputer circuit 12 further outputs a receive bit clock RX CLOCK on line 28 and a signal indicating the end of the current packet has been received RX TERM on line 26 to the longitudinal parity detector 16. The microcomputer circuit 12 further receives as inputs from the longitudinal parity detector 16 packets received RX DATA on line 30 and an error signal RX ERROR on line 32. The longitudinal parity generator 14 outputs packets to be transmitted including a checksum TX CHECK DATA on the terminal link 6a. The longitudinal parity detector 16 inputs packets received including a checksum RX CHECK DATA on terminal link 6b. The operation of the longitudinal parity generator 14 will now be described in detail with reference to Figure 5. Figure 5 shows the microcomputer circuit 12 and the longitudinal parity generator 14 incorporating shift registers 34,36, exclusive-OR gates 42-45, latches 50-53, a divider 40, a delay circuit 35 and a multiplexer 38. The transmit bit clock TX CLOCK on line 20 is fed as an input to a divider 40 to generate a transmit byte clock TX BYTE CLOCK on line 48. The transmit bit clock TX CLOCK and the transmit byte clock TX BYTE CLOCK are both provided as inputs to the shift register 34 along with the packet to be transmitted TX DATA on line 18. The transmit bit clock TX CLOCK clocks the bits of the packet to be transmitted TX DATA serially into the shift register 34, and the transmit byte clock TX BYTE CLOCK clocks the data packet to be transmitted TX DATA out of the shift register 34 in parallel one byte at a time. The exclusive-OR gates 42 to 45 and the latches 50 to 53 generate the longitudinal parity checksum nibble in a manner to be described in detail hereinafter. Gate 42 receives data bits TD0 and TD4, gate 43 receives data bits TD1 and TD5, gate 44 receives data bits TD2 and TD6, and gate 45 receives data bits TD3 and TD7. Each of the gates 42 to 45 also receives a third input which is the output of its associated latch 50-53 respectively fed back. Hence the third input to each of the gates is its respective output clocked through a latch. The transmit byte clock TX BYTE CLOCK on line 48 has a rising clock edge for every time a new byte is read into the shift register 34 by eight rising clock edges of the transmit bit clock signal TX CLOCK on line 20. Hence the outputs of the latches 50-53 on lines 56-62 are an accumulation of the respective bits of successive nibbles in a packet output from the microcomputer circuit 12, as described earlier. The checksum is thus the set of bits CHO-3 representing the accumulated sum on each line 56-62. The checksum bits on lines 56-62 are output to the shift register 36 in parallel. The shift register 36 has its inputs on lines 56-62 clocked in by the signal TX TERM on line 22 indicating that the terminator byte at the end of the packet is to be sent. According to Figure 2, the terminator byte (EOP) consists of the control nibble followed by the checksum nibble. The packet to be transmitted TX DATA on line 18 consists of header and data bytes. Whilst header and data bytes are being transmitted the signal TX INHIB controlling the multiplexer 38 will select the multiplexer such that the data to be transmitted TX DATA passes through the multiplexer onto the terminal link 6a, and the exclusive-OR gates 42-45 and the latches 50-53 will accumulate a checksum nibble in the manner described hereinabove. When the microcomputer circuit reaches the last data byte in the packet it is currently sending it sends the terminator control nibble and then sets the signal TX TERM on line 22 indicating that a terminator is being sent, thus latching the checksum nibble into the shift register 36. When the signal TX TERM on line 22 goes high indicating a terminator is now being sent the RESET LATCH output of the delay circuit 35 on line 57 will go high causing the latches 50-53 to be reset. The delay circuit 35 will introduce a delay between TX TERM on line 22 going high and RESET LATCH on line 57 following it. This delay allows the checksum value CH0-3 on lines 56-62 to be shifted into the shift register 36 before the latches 50-53 are reset. Subsequently, when the signal TX TERM on line 22 goes low again indicating the terminator token is no longer being sent, the signal RESET LATCH on line 57 on the output of the delay circuit 57 will go low allowing the latches 50-53 to start accumulating a new checksum. In this way the latches are always reset at the end of a packet and held so until transmission of a new packet has started. The microcomputer circuit 12 then changes the TX INHIB signal on line 24 controlling the multiplexer 38 such that the serial output of the shift register 36 on line 46 is passed through onto the terminal link 6a. The multiplexer will be held in this state for four cycles of the transmit bit clock TX CLOCK so that the four bits of the checksum nibble are clocked out onto the message link 6a. Whilst this is occurring the microcomputer circuit will inhibit the data to be transmitted TX DATA on line 18. After four cycles of the transmit bit clock are completed the signal controlling the multiplexer 38 TX INHIB on line 24 will revert to its original state and the multiplexor will once again pass the data to be transmitted TX DATA on line 18 to the message link 6a. The microcomputer will then start to transmit the first header byte of the next data packet. In this manner, the microcomputer circuit 12 and longitudinal parity generator 14 will generate data packets including a checksum according to the format of Figure 2. The operation of the longitudinal parity detector 16 will now be described in detail with reference to Figure 6. Figure 6 shows the microcomputer 12 and the longitudinal parity detector 16 incorporating a shift register 64, exclusive-OR gates 74-77, latches 68,70-73, a divider 78 and a comparator 66. The receive bit clock RX CLOCK on line 28 is fed as an input to the divider 78 to generate a receive byte clock RX BYTE CLOCK on line 80. The receive bit clock RX CLOCK and the receive byte clock RX BYTE CLOCK are both provided as inputs to the shift register 64 along with the received packet RX CHECK DATA including a checksum on the terminal link 6b. The receive bit clock RX CLOCK clocks the serial packet received RX CHECK DATA into the shift register 64 serially, and the receive byte clock RX BYTE CLOCK clocks the packet received RX CHECK DATA out of the shift register 64 in parallel one byte at a time. The exclusive-OR gates 74-77, the latches 70-73 and the comparator 66 carry out the longitudinal parity check in a manner to be described hereinafter. Exclusive OR gates 74-77 and latches 70-73 combine to provide, at their outputs 82-88 a running sum of the bits received at their inputs, a new sum being calculated for every receive byte clock RX BYTE CLOCK cycle. The signal indicating receipt of a terminator byte RX TERM on line 26 is used to latch a latch 68. Hence whenever a terminator byte is received the output of the comparator 66 on line 90 is latched onto a line 32 RX ERROR indicating a longitudinal parity error. The inputs of the comparator 66 are the outputs of the latches 70-73 and the least significant nibble output from the shift register 64. The last value latched into the latches on receipt of a terminator will, in this embodiment, be the checksum nibble on the output lines RD4-7 of the shift register 64 and the terminator nibble on output lines RDO-3 of the shift register 64. As described previously if no error has occurred during transmission then once the checksum has been added to the accumulated sum of data, the output of each of the latches 70-73 should be zero. However, in this embodiment the output of the latches 70-73 will be the accumulation of the header and data nibbles plus the checksum nibble plus the control nibble. Hence, if no error has occurred the output of each of the latches will be the value of the control nibble. Hence the outputs of the latches on lines 82,84,86,88 are fed as one input nibble to the comparator 66, and the control nibble output from the shift register 64, RDO-3, is fed as a second input nibble to the comparator 66. The output of the comparator latched by the latch 68 should then be zero, indicating a nibble match, if no parity error has occurred. Whilst the exclusive-OR gates 74-77 and the latches 70-73 are carrying out the longitudinal parity check the received packet including the checksum nibble is, in this embodiment, input directly to the microcomputer circuit 12. In the foregoing description of the source and destination nodes 8, the generation and detection of longitudinal parity using the checksum bits has been set out. As described earlier, each routing switch 2 can add, subtract or translate headers and is capable of maintaining the checksum. Circuitry for subtracting headers from a packet and adjusting the value of the checksum nibble will be described hereinafter with respect to Figure 7 which shows a schematic of one of the routing switches of Figure 1. Figure 7 shows a routing switch 2 including a routing switch control circuit 90 and a checksum adjuster 94. Referring back to Figure 1 it will be recalled that each routing switch in this embodiment of the invention can be connected to four other routing switches or source and destination nodes. Each routing switch 2 will have a checksum adjuster on its outputs that connect to a source and destination node 8 via a terminal link 4. The message links 6 of each routing switch are connected to the message links 6 of other routing switches 2 directly. The routing switch control circuit 90 implements the routing functions of the switch in a manner known to persons skilled in the art, and also controls the checksum adjuster 94. The routing switch control circuit 90 outputs the packet to be transmitted TX CHECK DATA directly onto the output message link 4a. The routing switch control circuit 90 also outputs an adjuster bit clock ADJ BIT CLOCK on line 98, a signal indicating a header has been removed SUB HEAD on line 110, a signal indicating a checksum nibble has been received ADJ CSUM on line 102 and an adjuster inhibit signal ADJ INHIB on line 104 to the checksum adjuster 94. The checksum adjuster outputs the packet received RX DATA on line 114 to the routing switch control 90. The checksum adjuster 94 inputs packets including checksums RX CHECK DATA on message links 4b. The checksum adjuster 94 provides a modified checksum taking into account bits of the header deleted from the packet: by the routing switch control circuit 90 as the packet comes into the routing switch 2. The operation of the checksum adjuster 94 will now be described in detail with reference to Figure 8. Figure 8 shows a circuit where the routing switch 2 performs the subtraction of a header byte. The checksum adjuster 94 adjusts the checksum nibble to take account of header bytes subtracted. The checksum adjuster of Figure 8 contains shift registers 116,118,120, a buffer 136, a multiplexer 122, and a delay unit 132. The circuit further contains a set of exclusive-OR gates 124,126,128,130. During reception of a packet the adjuster inhibit signal ADJ INHIB will normally be held such that the multiplexer 122 passes the packet RX CHECK DATA on message link 4b delayed through a four bit buffer 136, to the line 114 to be passed to the routing switch control 90 via line 138. The adjuster transmit bit clock ADJ BIT CLOCK clocks the inputs of the shift registers 116,120 and the output of the shift register 118. The first byte of a packet being transmitted will be the header byte that the routing switch control circuit 90 will delete from the packet. Hence when the last bit of this header byte has been clocked into the shift register 116 the routing switch control circuit 90 sends a signal indicating a header byte to be removed has been received SUB HEAD on line 110 and the bits representing the redundant header byte RH0-7 will appear in parallel on the outputs of the shift register 116, where they are fed as inputs to the exclusive-OR gates 124,126,128,130. The least significant nibble of the header byte RH0-3 and the most significant nibble of the header byte RH4-7 are fed as inputs to the respective gates 124,126,128,130. Hence the gate 124 receives bits RH0,RH4 as inputs, the gate 126 receives bits RH1,RH5 as inputs, the gate 128 receives bits RH2,RH6 as inputs and the gate 130 receives bits RH3,RH7 as inputs. At the end of the data packet being received the routing switch control circuit 90 will, after the last bit of the checksum nibble has been clocked into the shift register 120 send a signal ADJ CSUM on line 102 indicating the checksum has been received. The checksum nibble bits CO-3 will then appear in parallel on the output of the shift register 120, where they are fed as inputs to the respective gates 124,126,128,130 along with the two nibbles of the redundant header byte. The output of the gates 124,126,128,130, representing the new checksum value, are then clocked into the shift register 118 by the signal indicating the checksum has been received ADJ CSUM on line 102 after it has passed through a delay circuit 132. At this time the old checksum bits received are stored in the four bit buffer 136. The delay circuit 132 allows for the gates 124,126,128,130 to propagate the new checksum result. When the new checksum has been written into the shift register 118 and the checksum is ready to be transmitted as part of the packet, the inhibit signal ADJ INHIB on line 104 changes the multiplexer so as the new checksum value on line 134 appears in the checksum slot of the packet received on line 114. Whilst the four bits of the new checksum are transmitted from the shift register 118 on the received data RX DATA line 114, the four bits of the old checksum, in the buffer 136, will be overwritten by the first four bits of the next packet header received. It is envisaged that in one embodiment the packet entering a routing switch may be subjected to a longitudinal parity check as described above with reference to Figure 6. This means that if data in the packet has been corrupted travelling through the routing switch network this corruption will be detected by a longitudinal parity check prior to adjusting the checksum, rather than the corruption being incorporated in the longitudinal parity checksum nibble and the packet being erroneously interpreted as error free. The invention has been particularly described with reference to one particular embodiment, namely that in which a header byte is removed from a packet during transmission. It will readily be understood however, how the circuits of Figures 7 and 8 could be adapted to enable other embodiments to be implemented. For example, the circuit of Figure 8 could be configured, to enable the checksum to be adjusted when header bytes are added to the packet rather than deleted from the packet. It will be further appreciated that the circuit of Figure 8 could be configured to enable the adjustment of the checksum when a header is translated (i.e. an addition of a header following subtraction of a header). It should also be apparent that such addition, subtraction or translation circuitry could be implemented at any stage of the network that a packet passes through in travelling from its source to its destination. In the preferred embodiment headers are only deleted by routing switches connected to source and destination nodes as packets leave the routing network. Therefore only those sides of the routing switches which are connected to the source and destination nodes have checksum adjusters for deletion of headers. While reference has been made herein to header bytes, it will be appreciated that each alterable header portion could be of a different length, e.g. two bytes. The principle of the invention remains unaltered.

Claims: A method of modifying a message packet which comprises a plurality of sets of information bits constituting an information portion (DP) and a set of checking bits (CHECKSUM), the method comprising: modifying the information portion (DP) of said message packet, characterised in that :- all said sets contain the same number of bits in a sequence of bit locations between a bit location of least significance to a bit location of most significance and each checking bit has been generated by taking the logical sum of bits in all of the sets having the same significance in all of the sets; and said method further comprises altering the checking bits (CHECKSUM) by using only the modifications to the information portion (DP) and the unmodified message packet checking bit of corresponding significance to each said modification. A method according to claim 1, wherein the step of modifying the information portion (DP) comprises inverting at least one information bit in a place of certain significance within a set of bits and wherein the step of altering the checking bits (CHECKSUM) comprises inverting the bit in the place of same significance in the set of checking bits. A method according to claim 1, wherein the step of modifying the information portion (DP) comprises adding or deleting a set of bits and wherein the step of altering the checking bits (CHECKSUM) comprising taking the exclusive-OR of each bit within said added or deleted set with the bit in a place of corresponding significance within the set of checking bits. A method according to claim 1, 2, or 3, wherein the message packet is arranged for serial transmission with the information portion (DP) preceding the set of checking bits (CHECKSUM). A method according to claim 4, wherein the message packet includes a terminator portion (TP) following said information portion (DP), said terminator portion including control information (CONTROL) defining the end of packet and set of checking bits (CHECKSUM). A method according to any preceding claim, wherein the information portion (DP) of said message packet includes a header portion (HP) comprising at least one set of address bits (HO). A method according to claim 6, wherein the header portion (HP) comprises a plurality of sets of address bits (HO-H4) providing first and second headers and wherein said step of modifying the information portion (DP) comprising removing one of said headers. A method according to any of claim 1 to 7, wherein the step of modifying the information portion (DP) includes adding at least one set of address bits to said packet. A method according to any preceding claim, wherein each set of bits has four bits. A method according to claim 7, or claim 8 or 9 when dependent on claim 6, wherein each header is one byte. A method of transmitting a message packet between source and destination nodes (8) via a network having a plurality of routing nodes (2), wherein a method of modifying the message packet according to any one of claims 1 to 10 is effected at at least one node in the network. Circuitry for modifying a message packet comprising a plurality of sets of bits constituting an information portion (DP) of said packet and a set of checking bits (CHECKSUM), said circuitry comprising: an input circuit (12) for receiving said message packet; and means for modifying the information portion of said message packet, characterised in that :- all said sets containing the same number of bits in a sequence of bit locations between a bit location of least significance and a bit location of most significance, and each checking bit having been generated by taking the logical sum of bits in all the sets having the same significance, in all of the sets; and said circuitry further comprises a checking bit generator (14) operable to modify the received checking bits using only the modifications to the information portion and the received checking bits of the corresponding significance to each said modifications. Circuitry according to claim 12, wherein the checking bit generator (14) comprises logic circuitry (42-45) for taking the exclusive-OR of checking bits with modified information bits having the same place of significance in their respective sets. A routing switch (2) for receiving and routing message packets comprising circuitry according to claim 12 or 13. A routing switch according to claim 14, which comprises a header deletion circuit (136) for deleting a set of bits from said information portion before routing the message packet. A routing switch according to claim 14 or 15 which comprises header addition circuitry for adding a set of address bits to said information portion before routing the message packet.

Inventors: WALKER CHRITOPHER PAUL HULME, WALKER, CHRITOPHER PAUL HULME
Applicants: SGS THOMSON MICROELECTRONICS, STMICROELECTRONICS LIMITED
Application year: 1994
Main classification: H04L1
IPC codes: B29C65, G06F11, H04L1, H03M13, H03M9