Cross-coupled checking circuit
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention relates to fault detection circuits, and, more particularly, it relates to a circuit with two modules where each module checks the output of the other module. 
     2. Description of the Prior Art 
     Computers and other electronic systems comprise many interconnected modules. Such modules may be large scale functional units such as central processing unit, or they may be integrated circuit chips. The failure of any module can have catastrophic consequences, particularly if such failure is not immediately detected. 
     It is known in the art to employ duplicate modules and run them in close synchrony for the purpose of detecting faults. For example, duplicate modules are connected in such a manner as to receive identical inputs, and the outputs are compared by a third module which generates an error signal if the outputs disagree. The efficacy of such techniques is limited because they require a separate, off-chip part which is itself subject to latent failure. Undetected failures in the comparison circuit may prevent the discovery of faults in the module being checked. 
     Techniques have been developed to integrate the error detection circuitry into the duplicated module. For example, U.S. Pat. No. 4,176,258 discloses an integrated circuit chip with a logic circuit and a comparator. Two of these chips can be connected in parallel with one chip having its output enabled and the other chip having its output disabled. The disabled chip becomes a checker, or slave, comparing the output of the enabled master chip to its own internal logic results. This approach obviates the need for a third module while allowing for the use of two identical chips with a single part number. However, it does not provide a way to detect faults in the checker during normal operation. If the checker fails, either in its entirety or in its comparison circuit, faults in the master chip can go undetected. 
     SUMMARY OF THE INVENTION 
     According to the invention, a cross-coupled checking circuit comprises two modules, each of which generates a part of the circuit&#39;s output signal and checks the part generated by the other module for errors. Since both modules are active in producing the output and in checking the output, neither module is the master and neither is the slave, and a failure of either module will be detected by the other module. 
     In the preferred embodiment, one module generates output data and the other module generates a check symbol, or error detection code, corresponding to the output data. Each module also includes means for generating an internal result and means for comparing this internal result to the other module&#39;s output to check for errors. 
     Advantageously, the invention further provides a single integrated circuit chip, two of which can be cross-coupled to practice the invention. The chip includes a logic circuit, two comparators and two gating devices. The logic circuit has a data output and a check symbol output. The data output is connected to one input of the first comparator and to the input of the first gating device. The output of the first gating device is connected to an off-chip data output and also to the other input of the first comparator. The check symbol output is coupled to one input of the second comparator and to the input of the second gating device. The output of the second gating device is connected to an off-chip check symbol output and to the other input of the second comparator. The gating devices are independently controllable for either passing their input to their output or inhibiting their input and presenting a high impedance output. 
     Two of these identical integrated circuit chips can be connected in parallel and configured such that one chip drives the output data and the other chip drives the check symbol. This is done by configuring their gating devices in a complementary manner, with each chip having one gate enabled and one gate disabled. Then the chip which drives the output data checks the check symbol, while the chip which drives the check symbol checks the output data. 
     This approach is particularly appropriate for systems which already employ check symbols because the I/O pins and some of the error detection hardware are already in place. The technique can be extended to multiple input and output busses, each with their own data and check symbol divisions. 
    
    
     BRIEF DESCRIPTION OF THE FIGURES 
     FIG. 1 is a logic diagram of an integrated circuit chip for practicing the invention. 
     FIG. 2 is a logic diagram of two cross-coupled integrated circuit chips of the type shown in FIG. 1. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring to FIG. 1, an integrated circuit chip 10 is shown. Chip 10 comprises a logic circuit 14, two equality comparators 16, 18, a prechecking circuit 20, a check symbol generator 22, and two drivers 24, 26. Prechecking circuit 20 receives the data and check symbol coming into the chip on off-chip data input 28 and off-chip check symbol input 30, respectively, and checks for errors. The check symbol may be any one of a number of error detection codes known in the art for ensuring the integrity of transmitted data. In this embodiment, the check symbol is a parity bit, and all data is represented by a digitally coded data signal of one or more bits. If the check symbol is not consistent with the data, then prechecking circuit 20 generates an error signal on off-chip precheck error output 31. 
     Logic circuit 14 may be any data processing means of arbitrary complexity for generating output data on logic circuit internal output line 32 in response to the input data received on chip data input 28. On line 32, and all other data lines in this embodiment, the bits of data are transmitted in parallel. Check symbol generator 22 receives the logic circuit output data on line 32 via line 33 and generates a check symbol corresponding to this data. Check symbol generator 22 may in fact be part of logic circuit 14, as long as the check symbol output can be distinguished from the output data. 
     The output 32 of logic circuit 14 is coupled to the input of driver 24. The output 34 of driver 24 is coupled to off-chip data output 36. Driver 24 may be any means for controllably gating the signal on its input so that this signal is either passed through the driver to its output or is inhibited from passing through. If the input signal is not passed through, a high impedance condition is presented at output 34 of the driver. Driver 24 may therefore comprise any of a number of driver circuits well-known in the art, such as a three state driver or an open-collector type driver. The state of driver 24 is controlled by an enable signal applied at off-chip driver enable pin 38. 
     The output 40 of check symbol generator 22 is coupled to the input of driver 26, which has the same properties as driver 24. The state of driver 26 is controlled by an enable signal applied at off-chip driver enable pin 42. The output of driver 26 is coupled to off-chip check symbol output 44. 
     The output 32 of logic circuit 14 is also coupled to one input 46 of comparator 16. The output 34 of driver 24 is coupled to the other input 48 of comparator 16. Comparator 16 may be any means for detecting inequality between its inputs and responsively generating a signal on its output indicating the inequality. The output of comparator 16 is coupled to off-chip data error output 50. 
     The output 40 of check symbol generator 22 is also coupled to one input 52 of comparator 18, which has the same properties as comparator 16. The output of driver 26 is coupled to the other input 54 of comparator 18. The output of comparator 18 is coupled to off-chip check symbol error output 56. 
     Although error outputs 31, 50, and 56, are all shown as off-chip outputs in this embodiment, the error signals from the pre-checking circuitry and the comparators may be latched and collected on the chip to form a common error signal. Scan paths may then be used to examine individual errors signals for fault location. This approach is used where the number of off-chip pins is critical. Similarly, although separate input and output pins are shown in this embodiment, bidirectional I/O pins may be used to reduce pin count. When an I/O line is in input mode, the comparator outputs are disabled (e.g., by internally gating the outputs). Also it should be apparent that the two off-chip driver enable pins 38 and 42 can be replaced by one pin (and an on-chip inverter) to provide complementary enables for drivers 24 and 26. Referring to FIG. 2, two cross-coupled integrated circuit chips 10 and 70 are shown. Chips 10 and 70 are each identical to chip 10 described with reference to FIG. 1. It will be understood, however that these chips need not always be identical in all respect as long as their logic processors are functionally equivalent. 
     Chips 10 and 70 are cross-coupled by connecting the data and check symbol inputs in parallel to the corresponding input pins on each chip, connecting the off-chip data outputs to each other, and connecting the off-chip check symbol outputs to each other. Thus, in FIG. 2, the externally-supplied input data is coupled to off-chip data input 28 of chip 10 and to off-chip data input 72 of chip 70. The externally-supplied check symbol is coupled to off-chip check symbol input 30 of chip 10 and to off-chip check symbol input 74 of chip 70. Off-chip data output 36 of chip 10 is coupled to off-chip data output 76 of chip 70 and to external data output line 78. Off-chip check symbol output 44 of chip 10 is coupled to off-chip check symbol output 80 of chip 70 and to external check symbol output line 82. 
     As shown in FIG. 2., the drivers on each chip are configured in a complementary manner. In the figure, the enable lines are omitted and a dotted line indicates a driver in its inhibiting state, i.e., high impedance output, and a solid line indicates an enabled driver. On chip 10, driver 24 is enabled and driver 26 is disabled. On chip 70, driver 84 is enabled and driver 86 is disabled. (It will now be understood that the two off-chip driver enable pins on each chip can be combined into a single pin for configuring the drivers in either of these two complementary states, with one driver enabled and the other driver disabled.) 
     In this cross-coupled configuration, neither chip is the master and neither chip is the slave. Both chips participate in driving output signals to the rest of the system and both chips check the output driven by the other chip by comparing it to internally generated results. Specifically, chip 10 drives the output data and chip 70 drives the corresponding check symbol; chip 70 checks the output data and chip 10 checks the check symbol. 
     In operation, with driver 24 enabled, the output data from logic circuit 14 of chip 10 is transmitted to the rest of the system on line 78. This output data is also transmitted to off-chip data output 76 of chip 70, where it is transmitted to one input of comparator 88. With driver 86 disabled, the output data from logic circuit 90 is blocked from reaching off-chip data output 76, but the output data of logic circuit 90 is transmitted to the second input of comparator 88. Thus comparator 88 compares the output data from logic circuit 90 to the output data from logic circuit 14, and, if these outputs are not equal, an error signal is generated on off-chip data error output 96. With driver 84 enabled, the check symbol from check symbol generator 98 of chip 70 is transmitted to the rest of the system on line 82. This check symbol is also transmitted to off-chip check symbol output 44 of chip 10, where it is transmitted to one input of comparator 18. With driver 16 disabled, the check symbol from check symbol generator 22 is inhibited from reaching off-chip check symbol output 44, but the check symbol from check symbol generator 22 is transmitted to the other input of comparator 18. Comparator 18 compares the check symbol from check symbol generator 22 to the check symbol from check symbol generator 98 and, if these check symbols are not equal, an error signal is generated on off-chip check symbol error output 56. 
     It can now be understood how the invention provides protection against latent faults. If chip 10 fails, comparator 88 of chip 70 will detect an error. If chip 70 fails, comparator 18 of chip 10 will detect an error. Additionally, in this embodiment, chips 10 and 70 form a self-checking network. If a comparator fails to detect an error, the error can still be detected by subsequent circuitry using the check symbol. It should be noted that parity checking and other such hardware error protection using error detection codes is incorporated into many systems, and does not represent an additional cost imposed by this embodiment of the invention. 
     Additionally, note that if the chips 10 and 70 are identical, each carries the comparators 16 and 89, respectively. These comparators (16 and 89) can be used secondarily, with the signals produced by their counterpart comparators 18 and 88 for additional checking and error localization. For example, comparator 16 would not normally indicate an error, even if the logic circuit 14 (or 90) fails. However, if both comparators 16 and 88 report errors, it is likely that the error lies in driver 24 or the output data bus 78 (i.e., corruption on the bus). 
     The off-chip error outputs are connected to a maintenance processor (not shown) for analysis and response. Certain timing considerations should be taken into account. In the embodiment shown and described herein, transient error indications may be asserted by the comparator because of the difference in time for the comparator inputs to arrive at the comparator. The internal input signal from the same chip will arrive before the input signal from the other chip. The off-chip error output signals are not valid, and should not be sampled, until both input signals have arrived and the off-chip error output signals reflect the result of the comparison of these input signals. Because this delay can significantly increase the cycle time, it is preferable, for some applications, to latch the comparator input signals. For example, with reference to FIG. 1, latches or registers can be provided at comparator inputs 46, 48, 52, and 54. The comparison of input signals can be performed one clock cycle after the generation of these signals, while new values are being generated. 
     In summary, the present invention provides a cross-coupled checking circuit in which two modules each participate in driving the outputs and in checking the output driven by the other module. The invention further provides a design for a single integrated circuit chip, two of which can be configured to form a cross-coupled checking circuit. Although the invention has been described herein in terms of a specific embodiment, it will be understood that variations of this embodiment may be made without departing from the scope of the invention. For example, while the output in this embodiment is partitioned into data and check symbol portions for cross-checking, other partitioning of the output (e.g. into two data portions) is possible. The true scope of the invention is therefore defined by the following claims.