System and method for error detection in the result of an arithmetic operation
8 claims: 8 independent, 0 dependent
- 1A system for detecting an error in a result of an arithmetic operation involving at least two operands, each operand having at least one digit, the system comprising a first arithmetic operating means (14) operating on the two operands to obtain the result at a first output (18), an error detection unit (16) including second arithmetic operating means (76) operating on the result at the first output to obtain a first single digit number representative of the result:the second operating means (76) also operating separately on each of the operands to obtain an intermediate sum for each of the operands and performing the arithmetic operation on said intermediate sums to obtain an interim result, and a comparator (20), characterized in that the second operating means (76), after having obtained the interim result, then operates on said interim result to obtain a second single digit number representative of the interim result;said comparator (20) comparating the first and second single digit numbers and generating an error signal in response to a difference between the two numbers;the error detection unit (16) further comprises a third arithmetic operating means (58) operating on the two operands to obtain the said result at a second output (28), and a data selector means (26) for selecting either the first output or the second output in response to the error signal, the second arithmetic operating means (76) obtaining the first single digit number by iteratively adding the digits of the said result at the first output to ore another, the intermediate sum of each operand by adding the digits of the operand to one another, and the second single digit number by iteratively adding the digits of the interim result to one another. System zur Detektion eines Fehlers in einem Ergebnis einer arithmetischen Operation mit mindestens zwei Operanden, wobei jeder Operand mindestens eine Ziffer aufweist, mit einer ersten arithmetischen Operationseinrichtung (14), die die beiden Operanden einer Operation unterzieht, um das Ergebnis an einem ersten Ausgang (18) zu erhalten, einer Fehlerdetektionseinheit (16) mit einer zweiten arithmetischen Operationseinrichtung (76), die das an dem ersten Ausgang anliegende Ergebnis einer Operation unterzieht, um eine erste einzelne Digitalzahl zu errechnen, die repräsentativ für das Ergebnis ist, wobei die zweite Operationseinrichtung (76) ferner jeden der Operanden separat einer Operation unterzieht, um eine Zwischensumme für jeden der Operanden zu erhalten, und die arithmetische Operation an der Zwischensumme ausführt, um ein Zwischenergebnis zu errechnen, und mit einem Komparator (20), dadurch gekennzeichnet, daß die zweite Operationseinrichtung (76), nachdem sie das Zwischenergebnis errechnet hat, anschließend das Zwischenergebnis einer Operation unterzieht, um eine zweite einzelne Digitalzahl zu errechnen, die repräsentativ für das Zwischenergebnis ist, wobei der Komparator (20) die ersten und zweiten einzelnen Digitalzahlen vergleicht und auf eine Differenz zwischen den beiden Zahlen hin ein Fehlersignal erzeugt, die Fehlerdetektionseinheit (16) ferner eine dritte arithmetische Operationseinrichtung (58), die die beiden Operanden einer Operation unterzieht, um das Ergebnis an dem zweiten Ausgang (28) zu erhalten, und eine Datenwähleinrichtung (26) aufweist, die auf das Fehlersignal hin entweder den ersten Ausgang oder den zweiten Ausgang wählt, wobei die zweite arithmetische Operationseinrichtung (76) die erste einzelne Digitalzahl errechnet, indem sie die Ziffern des an dem ersten Ausgang anliegenden Ergebnisses iterativ miteinander addiert, die Zwischensumme jedes Operanden berechnet, indem sie die Ziffern des Operanden miteinander addiert, und die zweite einzelne Digitalzahl berechnet, indem sie die Ziffern des Zwischenergebnisses iterativ miteinander addiert. Système de détection d'erreurs dans le résultat d'une opération arithmétique utilisant au moins deux opérandes, chaque opérande possédant au moins un chiffre, le système comprenant un premier moyen d'opération arithmétique (14) opérant sur deux opérandes afin d'obtenir le résultat à une première sortie (18), une unité de détection d'erreur (16) incluant un second moyen d'opération arithmétique (76) opérant sur le résultat de la première sortie afin d'obtenir un premier nombre à un seul chiffre représentatif du résultat;le second moyen d'opération (76) opérant aussi séparément sur chacun des opérandes pour obtenir une somme intermédiaire pour chaque opérande et réaliser l'opération arithmétique sur ces sommes intermédiaires afin d'obtenir un résultat intermédiaire (1), puis opère alors sur le résultat intermédiaire afin d'obtenir un second nombre à un seul chiffre représentatif du résultat intermédiaire;le comparateur (20) comparant les premier et second nombres à un seul chiffre et générant un signal d'erreur en réponse à une différence entre les deux nombres;l'unité de détection d'erreur (16) comprend en plus un troisième moyen d'opération arithmétique (58) opérant sur les deux opérandes afin d'obtenir ledit résultat à une seconde sortie (28), et un moyen de sélection de données (26) afin de sélectionner l'une ou l'autre des sorties en réponse à un signal d'erreur, le second moyen d'opération arithmétique (76) obtenant le premier nombre à un seul chiffre en additionnant l'un à l'autre de façon itérative les chiffres du résultat de la première sortie, puis la somme intermédiaire de chaque opérande en additionnant l'un à l'autre les chiffres de chaque opérande, et enfin le second nombre à un seul chiffre en additionnant l'un à l'autre de façon itérative les chiffres du résultat intermédiaire.
- 2A system according to claim 1, in which the first arithmetic operating means (14) operates on the two operands with the operands expressed in a first numerical format, and the third arithmetic operating means (58) operates on the two operands with the operands expressed in a second numerical format. System nach Anspruch 1, bei dem die erste arithmetische Operationseinrichtung (14) die beiden Operanden einer Operation unterzieht, bei der die Operanden in einem ersten numerischen Format ausgedrückt sind, und die dritte arithmetische Operationseinrichtung (58) die beiden Operanden einer Operation unterzieht, bei der die Operanden in einem zweiten numerischen Format ausgedrückt sind. Système selon la revendication 1 dans lequel le premier moyen d'opération arithmétique (14) opère sur les deux opérandes exprimés dans un premier format numérique, et le troisième moyen d'opération arithmétique (58) opère sur les deux opérandes exprimés dans un second format numérique.
- 3A system according to claim 2, in which the first format comprises a binary format and the second format comprises a binary coded decimal format. System nach Anspruch 2, bei dem das erste Format ein binäres Format ist und das zweite Format ein binär kodiertes Dezimalformat ist. Système selon la revendication 2 dans lequel le premier format comprend un format binaire et le second format comprend un format binaire décimal codé.
- 4A system according tc claim 3, in which the second arithmetic operating means (76) comprises a binary coded decimal compression unit having a first input for receiving the first operand in binary coded decimal format and a second input for receiving either the output (18) of the first arithmetic operating means in binary coded decimal format or the second operand in binary coded decimal format. System nach Anspruch 3, bei dem die zweite arithmetische Operationseinrichtung (76) eine Binärkodierungs-Dezimal-Verdichtungseinheit aufweist, die einen ersten Eingang, um den ersten Operanden in binär kodiertem Dezimalformat zu empfangen, und einen zweiten Eingang aufweist, um entweder den Ausgang (18) der ersten arithmetischen Operationseinrichtung in binär kodiertem Dezimalformat oder den zweiten Operanden in binär kodiertem Dezimalformat zu empfangen. Système selon la revendication 3 dans lequel le second moyen d'opération arithmétique (76) comprend une unité de compression binaire décimale codée possédant une première entrée afin de recevoir le premier opérande dans un format binaire décimal codé et une seconde entrée afin de recevoir l'une ou l'autre des sorties (18) du premier moyen d'opération arithmétique dans un format binaire décimal codé ou du second opérande dans un format binaire décimal codé.
- 5A method for detecting an error in a result of an arithmetic operation involving at least two operands, each operand having at least one digit, the method comprising the steps of :a first arithmetic operating means (14) operating on the two operands to obtain the result at a first output (18);an error detection unit (16) including second arithmetic operating means (76) operating on the result at the first output to obtain a first single digit number representative of the result;the second operating means (76) operating separately on each of the operands to obtain an intermediate sum for each of the operands and performing the arithmetic operation on said intermediate sums to obtain an interim result;characterized in that it further comprises the steps of then operating on said interim result to obtain a second single digit number representative of the interim result;a comparator (20) comparing the first and second single digit numbers and generating an error signal in response to a difference between the two numbers;the error detection unit (16) further comprising a third arithmetic operating means (58) operating on the two operands to obtain the said result at a second output (28);and a data selector means (26) selecting either the first output or the second output in response to the error signal, the first single digit number being obtained by iteratively adding the digits of the said result at the first output to one another, the intermediate sum of each operand being obtained by adding the digits of the operand to one another, and the second single digit number being obtained by iteratively adding the digits of the interim result to one another. Méthode pour détecter une erreur dans une opération arithmétique utilisant au moins deux opérandes, chaque opérande possédant au moins un chiffre, la méthode comprenant les étapes dont : - un premier moyen d'opération arithmétique (14) opérant sur les deux opérandes afin d'obtenir le résultat à une première sortie (18);- une unité de détection d'erreur (16) incluant un second moyen d'opération arithmétique (76) opérant sur le résultat de la première sortie afin d'obtenir un premier nombre à un seul chiffre représentatif du résultat;- le second moyen d'opération (76) opérant séparément sur chacun des opérandes afin d'obtenir une somme intermédiaire pour chacun des opérandes et réalisant l'opération arithmétique sur lesdites sommes intermédiaires afin d'obtenir un résultat intermédiaire;caractérisé en ce qu'il comprend en plus les étapes d'opération sur le résultat intermédiaire afin d'obtenir un second nombre à un seul chiffre représentatif du résultat intermédiaire, un comparateur (20) comparant les premier et second nombres à un seul chiffre et générant un signal d'erreur en réponse à une différence entre les deux nombres;l'unité de détection d'erreur (16) comprenant un troisième moyen d'opération arithmétique opérant sur les deux opérandes afin d'obtenir ledit résultat à une seconde sortie (28), et un moyen de sélection de données sélectionnant aussi bien la première sortie que la seconde sortie en réponse au signal d'erreur, le premier nombre à un seul chiffre étant obtenu en additionnant l'un à l'autre de façon itérative les chiffres du résultat de la première sortie, la somme intermédiaire de chaque opérande étant obtenue en additionnant l'un à l'autre les chiffres de l'opérande, et le second nombre à un seul chiffre étant obtenu et additionnant l'un à l'autre de façon itérative les chiffres du résultat intermédiaire. Verfahren zur Detektion eines Fehlers in einem Ergebnis einer arithmetischen Operation mit mindestens zwei Operanden, wobei jeder Operand mindestens eine Ziffer aufweist, mit den folgenden Verfahrensschritten: Ausführen einer Operation an den beiden Operanden mittels einer ersten arithmetischen Operationseinrichtung (14), um das Ergebnis an einem ersten Ausgang (18) zu erhalten, Ausführen einer Operation an dem an dem ersten Ausgang anliegenden Ergebnis mittels einer Fehlerdetektionseinheit (16) mit einer zweiten arithmetischen Operationseinrichtung (76), um eine erste einzelne Digitalzahl zu errechnen, die repräsentativ für das Ergebnis ist, separates Arbeiten mit jedem der Operanden mittels der zweiten Operationseinrichtung (76), um eine Zwischensumme für jeden der Operanden zu errechnen, und Ausführen der arithmetischen Operation an den Zwischensummen, um ein Zwischenergebnis zu errechnen, gekennzeichnet durch die folgenden weiteren Verfahrensschritte: anschließendes Ausführen einer Operation an dem Zwischenergebnis, um eine zweite einzelne Digitalzahl zu errechnen, die repräsentativ für das Zwischenergebnis ist, mittels eines Komparators (20), Vergleichen der ersten und zweiten einzelnen Digitalzahlen und, auf eine Differenz zwischen den beiden Zahlen hin, Erzeugen eines Fehlersignals, Ausführen einer Operation an den beiden Operanden mittels einer dritten arithmetischen Operationseinrichtung (58) der Fehlerdetektionseinheit (16), um das Ergebnis an dem zweiten Ausgang (28) zu erhalten, und mittels einer Datenwähleinrichtung (26), Wählen entweder des ersten Ausgangs oder des zweiten Ausgangs auf das Fehlersignal hin, wobei die erste einzelne Digitalzahl errechnet wird, indem die Ziffern des an dem ersten Ausgang anliegenden Ergebnisses iterativ miteinander addiert werden, die Zwischensumme jedes Operanden berechnet wird, indem die Ziffern des Operanden miteinander addiert werden, und die zweite einzelne Digitalzahl berechnet wird, indem die Ziffern des Zwischenergebnisses iterativ miteinander addiert werden.
- 6A method according to claim 5, in which the result at the first output (18) is obtained by operating on the two operands with the operands expressed in a first numerical format, and the result at the second output (28) is obtained by operating on the two operands with the operands expressed in a second numerical format. Méthode selon la revendication 5 dans laquelle le résultat de la première sortie (18) est obtenu en opérant sur les deux opérandes exprimés dans un premier format numérique et le résultat de la seconde sortie (28) est obtenu en opérant sur les deux opérandes exprimés dans un second format numérique. Verfahren nach Anspruch 5, bei dem das an dem ersten Ausgang (18) anliegende Ergebnis berechnet wird, indem die beiden Operanden einer Operation unterzogen werden, bei der die Operanden in einem ersten numerischen Format ausgedrückt sind, und das an dem zweiten Ausgang (28) anliegende Ergebnis berechnet wird, indem die beiden Operanden einer Operation unterzogen werden, bei der die Operanden in einem zweiten numerischen Format ausgedrückt sind.
- 7A method according to claim 6, in which the first format comprises a binary format and the second format comprises a binary coded decimal format. Méthode selon la revendication 6 dans laquelle le premier format comprend un format binaire et le second format comprend un format décimal codé en binaire. Verfahren nach Anspruch 6, bei dem das erste Format ein binäres Format ist und das zweite Format ein binär kodiertes Dezimalformat ist.
- 8A method according to any one of claims 5 to 7, wherein each of the operands has at least two digits, and either one of said two digits can be zero, and wherein the result at the second output (28) is obtained by:(a) adding the digits of each of said operands to obtain an intermediate sum;(b) sequentially subtracting a digit from the partial sum of the remaining digits of each of said operands and adding the results of said subtraction for each operand to one another at the end of each sequential cycle to obtain a set of arguments;(c) subtracting each of said arguments from said intermediate sum to obtain a set of partial differences, each of said partial differences comprising a least significant digit and a carry digit;(d) dividing said partial differences by the number of operands;(e) concatenating said partial differences to obtain a transitional value;(f) beginning with the least significant carry digit of the transitional value, adding the carry digits to the corresponding next adjacent digits to obtain a penultimate value;and(g) eliminating all carry digits between the first and last digits of said penultimate value to obtain a correct value of the aritnmetic operation. Méthode selon l'une quelconque des revendications 5 à 7 dans laquelle chacun des opérandes possède au moins deux chiffres, et l'un ou l'autre de ces deux chiffres peut être zéro, et dans laquelle le résultat de la seconde sortie (28) est obtenue en : a) additionnant les chiffres de chacun des opérandes afin d'obtenir une somme intermédiaire;b) soustrayant de façon séquentielle un chiffre de la somme partielle des chiffres restants de chacun des opérandes et en additionnant l'un à l'autre les résultats de la soustraction pour chaque opérande à la fin de chaque cycle séquentiel afin d'obtenir un jeu d'arguments;c) soustrayant chacun des arguments de la somme intermédiaire pour obtenir un jeu de différences partielles, chacune de ces différences partielles comprenant un chiffre moins significatif et un chiffre de retenue;d) divisant les différences partielles afin d'obtenir une valeur transitoire;f) commençant avec le chiffre de retenue le moins significatif de la valeur transitoire, additionnant les chiffres de retenue aux chiffres suivants correspondants afin d'obtenir une valeur pénultième;etg) éliminant tous les chiffres de retenue entre le premier et le dernier chiffre de la valeur pénultième afin d'obtenir une valeur correcte de l'opération arithmétique. Verfahren nach einem der Ansprüche 5 bis 7, bei dem jeder der beiden Operanden mindestens zwei Ziffern aufweist und jede der beiden Ziffern null sein kann, und bei dem das Ergebnis an dem zweiten Ausgang errechnet wird durch: (a) Addieren der Ziffern jedes der Operanden, um eine Zwischensumme zu errechnen;(b) sequentielles Subtrahieren einer Ziffer von der Teilsumme der übrigen Ziffern jedes der Operanden, und Addieren der für jeden Operanden erhaltenen Ergebnisse der Subtraktion miteinander am Ende jedes sequentiellen Zyklus, um einen Satz von Argumenten zu erhalten;(c) Subtrahieren jedes der Argumente von der Zwischensumme, um einen Satz von Teildifferenzen zu erhalten, wobei jede der Teildifferenzen eine Ziffer geringster Signifikanz und eine Carry-Ziffer aufweist,(d) Dividieren der Teildifferenzen durch die Anzahl der Operanden;(e) Konkatenieren der Teildifferenzen zum Erhalt eines Übergangswertes;(f) beginnend mit der die geringste Signifikanz aufweisenden Carry-Ziffer des Übergangswertes, Addieren der Carry-Ziffern mit den entsprechenden nächsten benachbarten Ziffern, um einen vorletzten Wert zu erhalten;und(g) Eliminieren sämtlicher Carry-Ziffern zwischen den ersten und letzten Ziffern des vorletzten Wertes, um einen korrekten Wert der arithmetischen Operation zu erhalten.
Independent claims8
103 paragraphs, as filed
The present invention relates to an error detection and correction system and, more particularly, to a system for detecting and correcting calculation errors that occur in a computer processor or an arithmetic logic unit (ALU).
In the field of computer technology, much effort has been expended in attempting to improve and ensure integrity of data processing. Specifically, whenever data is transferred from one component of a computer system to another and whenever data is mathematically manipulated, there is a risk that resulting data will be inaccurate. In certain high performance computing systems, the risk is increased by the fact that a great number of data transfers or mathematical operations occur in a short period of time.
Almost since the inception of computer processors, error detection and correction mechanisms have been devised to help reduce the risk of inaccurate data transfer and manipulation. Heretofore, one of the conventional approaches to ensure data integrity has been to add a code to a data stream prior to transferring or arithmetically manipulating it. This approach has proven relatively successful, but only for certain types of operations.
One of the earliest methods for detecting errors during data transfers, for example, was the parity check code. A binary code word has odd parity if an odd number of its digits are 1's. For example, the number 1011 has three 1 digits and therefore has odd parity. Similarly, the binary code word 1100 has an even number of 1 digits and therefore has even parity.
A single parity check code is characterized by an additional check bit added to each data word to generate either odd or even parity. An error in a single digit or bit in a data word would be discernible since the parity check bit associated with that data word would then be reversed from what is expected. Typically, a parity generator adds the parity check bit to each word before transmission. This technique is called padding the data word. At the receiver, the digits in the word are tested and if the parity is incorrect, one of the bits in the data word is considered to be in error. When an error is detected at a receiver, a request for a repeat transmission can be given so that the error can be corrected. Only errors in an odd number of digits can be detected with a single parity check, since an even number of errors results in the parity expected for a correct transmission. Moreover, the specific bit in error cannot be identified by the parity check procedure as hereinabove described.
A more sophisticated error detection system was later devised. Data words of a fixed length of bits were grouped into blocks of a fixed number of data words each. Parity checks were then performed between different data words as well as for each individual data word. The block parity code detected many patterns of errors and could be used not only for error detection, but also for error correction when an isolated error occurred in a given row and column of the matrix. While these geometric codes were an improvement over parity check bits per se, they still could not be used to detect errors that were even in number and symmetrical in two dimensions.
After parity check codes and geometric codes were devised, a code was invented by Hamming, after whom it is named. The Hamming code is a system of multiple parity checks that encodes data words in a logical manner so that single errors can be not only detected but also identified for correction. A transmitted data word used in the Hamming code consists of the original data word and parity check digits appended thereto. Each of the required parity checks is performed upon specific bit positions of the transmitted word. The system enables the isolation of an erroneous digit, whether it is in one of the original data word bits or in one of the added parity check bits.
If all the parity check operations are performed successfully, the data word is assumed to be error free. If one or more of the check operations is unsuccessful, however, the single bit in error is uniquely determined by decoding so-called syndrome bits, which are derived from the parity check bits. Once again, only single bit errors are detected and corrected by use of the conventional Hamming code. Double bit errors, although detectable by the Hamming code, are not correctable.
The Hamming code is only one of a number of codes, generically called error correcting codes (ECC's). Codes are usually described in mathematics as closed sets of values that comprise all the allowed number sequences in the code. In data communications, transmitted numbers are essentially random data patterns which are not related to any predetermined code set. The sequence of data, then, is forced into compliance with the code set by adding to it at the transmitter, as hereinabove mentioned. A scheme has heretofore been developed to determine what precise extra string to append to the original data stream to make the concatenation of transmitted data a valid code. There is a consistent way of extracting the original data from the code value at the receiver and to deliver the actual data to the location where it is ultimately used. For the code scheme to be effective, it must contain allowed values sufficiently different from one another so that expected errors do not alter an allowed value such that it becomes a different allowed value of the code.
A cyclic redundancy code (CRC) consists of strings of binary data evenly divisible by a generator polynomial, which is a selected number that results in a code set of values different enough from one another to achieve a low probability of an undetected error. To determine what to append to the string of original data, the original string is divided as it is being transmitted. When the last data bit is passed, the remainder from the division is the required string that is added since the string including the remainder is evenly divisible by the generator polynomial. Because the generator polynomial is of a known length, the remainder added to the original string is also of fixed length.
At the receiver, the incoming string is divided by the generator polynomial. If the incoming string does not divide evenly, an error is assumed to have occurred. If the incoming string is divided by the generator polynomial evenly, the data delivered to the ultimate destination is the incoming data with the fixed length remainder field removed.
It has been found, however, that appending or concatenating a code to data to be transferred or arithmetically manipulated is burdensome, requiring additional and often extensive logic to accomplish. Moreover, the time required to generate the code on the transferring end and to decode and verify the code on the receiving end is, in certain cases, unacceptable. In the case of data manipulation and verification of proper ALU operation especially, additional codes result in inefficient performance.
Moreover, the aforementioned error detection and/or correction systems have been used most generally in transmitting and receiving data, rather than in acting on data mathematically. Thus, the communications channels were tested, but the computing engines were not. Techniques for correcting errors in arithmetic operations have conventionally been relegated merely to reperforming the same operations on the same processor or on other processors.
Finally, due to an inevitable comparison step in the detection cycle of the processes of the prior art, correction of errors could occur only some appreciable time thereafter - an untenable situation for high speed processing units.
It would be advantageous to provide a system for detecting errors in arithmetic operations without the need of composing and decoding a code appended to a data stream.
It would also be advantageous to provide a method for detecting and correcting errors in arithmetic operations by using a minimum amount of logic.
It would also be advantageous to provide a method for detecting and correcting errors in arithmetic operations in a short period of time (e.g., one or two clock cycles).
It would further be advantageous to provide a method for detecting and correcting errors in arithmetic operations that would provide a signal indicating that an error occurred therein, while the results of such arithmetic operations could nevertheless be corrected automatically.
It would also be advantageous to provide a method for preempting incorrect results of an arithmetic operation with correct results therefor.
It would also be advantageous to provide a method for detecting and correcting errors in arithmetic operations in which two arithmetic logic units could calculate the arithmetic operation independently and by different techniques, thus arriving at verifiable accurate results.
US-A-3,816,728 discloses a modulo-9 residue generating and checking circuit for checking the accuracy of decimal addition operations in digital computers and other data processing equipment. In a modulo-9 check, the result of an arithmetic operation is reduced to a single digit by dividing the result by 9 and calculating the remainder.
Alternatively, as disclosed in "Instruments and Control Systems Vol. 37, No. 8. August 1964, pages 129-131", the digits of the result can be iteratively summed until a single digit less than 9 results, with zeroes, nines and combinations totalling nine being ignored or cast out, in the summation process.
According to one aspect of the invention, there is provided a system for detecting an error in a result of an arithmetic operation involving at least two operands, each operand having at least one digit, the system comprising a first arithmetic operating means operating on the two operands to obtain the result at a first output, an error detection unit including second arithmetic operating means operating on the result at the first output to obtain a first single digit number representative of the result; the second operating means also operating separately on each of the operands to obtain an intermediate sum for each of the operands and performing the arithmetic operation on said intermediate sums to obtain an interim result, and a comparator, characterized in that the second operating means, after having obtained the interim result, then operates on said interim result to obtain a second single digit number representative of the interim result; said comparator comparing the first and second single digit numbers and generating an error signal in response to a difference between the two numbers; the error detection unit further comprises a third arithmetic operating means operating on the two operands to obtain the said result at a second output, and a data selector means for selecting either the first output or the second output in response to the error signal. the second arithmetic operating means obtaining the first single digit number by iteratively adding the digits of the said result at the first output to one another, the intermediate sum of each operand by adding the digits of the operand to one another, and the second single digit number by iteratively adding the digits of the interim result to one another.
According to another aspect of the invention, there is provided a method for detecting an error in a result of an arithmetic operation involving at least two operands, each operand having at least one digit, the method comprising the steps of: a first arithmetic operating means operating on the two operands to obtain the result at a first output; an error detection unit including second arithmetic operating means operating on the result at the first output to obtain a first single digit number representative of the result; the second operating means operating separately on each of the operands to obtain an intermediate sum for each of the operands and performing the arithmetic operation on said intermediate sums to obtain an interim result, characterized in that it further comprises the steps of then operating on said interim result to obtain a second single digit number representative of the interim result; a comparator comparing the first and second single digit numbers and generating an error signal in response to a difference between the two numbers; the error detection unit further comprising a third arithmetic operating means operating on the two operands to obtain the said result at a second output; and a data selector means selecting either the first output or the second output in response to the error signal, the first single digit number being obtained by iteratively adding the digits of the said result at the first output to one another, the intermediate sum of each operand being obtained by adding the digits of the operand to one another, and the second single digit number being obtained by iteratively adding the digits of the interim result to one another.
One example of the present invention will now be described with reference to the accompanying drawings, in which: <ul id="ul0001" list-style="none" compact="compact"><li>FIGURE 1 is a block diagram of a self-checking unit embodying the present invention;</li><li>FIGURE 2 is a block diagram of the error detection and correction units shown in FIGURE 1;</li><li>FIGURE 3 is a block diagram of the BCD adder shown in FIGURE 2;</li><li>FIGURE 4 is a block diagram of the BCD compression unit shown in FIGURE 2; and</li><li>FIGURE 5 is a timing diagram depicting system operation.</li></ul>
Referring now to FIGURE 1, there is shown a block diagram of a self-checking unit.
A data line 10 transmits a DB0 data signal representative of a first operand and another data line 12 transfers a DB1 data signal from a second operand. The 16-bit signals transmitted over lines 10 and 12 are applied to an arithmetic logic unit (ALU) 14, the operation of which is described in further detail hereinbelow. The ALU 14 can be any general purpose 16-bit processor, such as a Model No. 29116 microprocessor manufactured by Advanced Micro Devices, Inc. The data signals over lines 10 and 12 are also applied to an error detection and correction (EDC) unit 16.
The output of ALU 14 is also applied over a 16-bit line to EDC unit 16, but is delayed for a period of time due to the performance of arithmetic calculations within the ALU 14. The EDC unit 16 is electrically connected to a comparator 20 over a pair of 4-bit data lines 22 and 24. The comparator 20 may be any 4-bit comparator, such as Model No. SN54585 manufactured by Texas Instruments, Inc.
The output from comparator 20 is applied to a 16-bit data selector 26. The comparator 20 generates a one bit status signal over line 30. Also applied to the data selector 26 is an output signal from ALU 14 over line 32.
Thus, the error detection and correction subsystem, shown in phantom in FIGURE 1, comprises three components: the EDC unit 16, the comparator 20 and the data selector 26.
As mentioned, the comparator 20 generates a status signal over line 30. The status line 30 is applied not only to the data selector 26, as previously mentioned, but also to an error flag, not shown, over line 34. The error flag status is input to a status register, not shown, for further processing.
The output of data selector 26 is a 16-bit signal over line 36 sent to a microprocessor system, not shown.
At this point it would be most helpful to understand the theoretical principles on which the present invention is based.
Consider two 2-digit numbers or operands to be added: 49 and 68
<maths id="math0001" num=""><img file="EP0366331B1_D0001.tif" /></maths>
Let operand 49 be represented by the variable X.
X=(x<sub>1,</sub>x₂) where x₁ = 4 and x₂ = 9, the individual digits.
In the foregoing and all subsequent equations herein, equal signs (=) do not necessarily indicate mathematical equivalence or identify, but are used for purposes of this disclosure merely as a convenient symbolic convention.
Let 68 be represented by the variable Y.<maths id="math0002" num=""><math display="block"><mrow><msub><mrow><mtext>Y=(y</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>,y</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><msub><mrow><mtext>) where y</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext> = 6 and y</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext> = 8</mtext></mrow></math><img file="EP0366331B1_D0002.tif" /></maths>
Since X+Y = 117, standard vertical addition can be represented as:<maths id="math0003" num="(eq. 1)"><math display="block"><mrow><msub><mrow><mtext>(x</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>+y</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>)+(x</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><msub><mrow><mtext>+y</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext>) =117</mtext></mrow></math><img file="EP0366331B1_D0003.tif" /></maths>
However, adding the digits of operand X, x₁ and x₂, results in:<maths id="math0004" num=""><math display="block"><mrow><msub><mrow><mtext>x</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>+x</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext> = 13</mtext></mrow></math><img file="EP0366331B1_D0004.tif" /></maths> and adding digits y₁ and y₂ results in: y₁+y₂ = 14.<maths id="math0005" num="(eq. 2)"><math display="block"><mrow><msub><mrow><mtext>(x</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>+x</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><msub><mrow><mtext>)+(y</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>+y</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext>) = 13+14 = 27</mtext></mrow></math><img file="EP0366331B1_D0005.tif" /></maths>
Equation 1 is obviously not equal to equation 2.
From equation 1, the digits of value 117 can be reduced to the following single digit:<maths id="math0006" num="(eq. 1a)"><math display="block"><mrow><mtext>1+1+7 = 9</mtext></mrow></math><img file="EP0366331B1_D0006.tif" /></maths>
From equation 2, value 27 can be reduced to:<maths id="math0007" num="(eq. 2a)"><math display="block"><mrow><mtext>2+7 = 9</mtext></mrow></math><img file="EP0366331B1_D0007.tif" /></maths>
Equations 1a and 2a result in equal, single digits.
A greater number of digits and/or larger digits in either the operands or the result require iterative adding operations eventually resulting in a single digit value. For example, the digits of 68,879, added to one another results in 38, the sum of the digits of which is 11, the sum of the digits of which is the single digit 2. Thus three additions of digits are required to reduce 68,879 to an ultimate one digit value.
The foregoing principle suggests that the result obtained from vertical addition, if digits of the result are added to one another to reduce to a single digit (as in equation 1a) equals the result obtained from a horizontal addition of the digits of each operand reduced to a single digit (equation 2a).
The system has also proved successful for addition of two operands having a different number of digits (e.g., a 2-digit number added to a 4-digit number). Moreover, the system is applicable to multiplication, as shown below.
Let X = 32 and Y = 42.<maths id="math0008" num=""><img file="EP0366331B1_D0008.tif" /></maths><maths id="math0009" num="(eq. 3)"><math display="block"><mrow><mtext>1344 = 1+3+4+4 = 12 = 1+2 = 3</mtext></mrow></math><img file="EP0366331B1_D0009.tif" /></maths>
Horizontally, 32 = 3+2 = 5, and 42 = 4+2 = 6<maths id="math0010" num="(eq. 4)"><math display="block"><mrow><mtext>5x6 = 30 = 3+0 = 3</mtext></mrow></math><img file="EP0366331B1_D0010.tif" /></maths>
Equation 3 = Equation 4
This mathematical principle can be extended to subtraction and division.
For example, 38 divided by 13 results in: 38/13 = 2 remainder 12<maths id="math0011" num="(eq. 5)"><math display="block"><mrow><mtext>2+(12) = 2+(1+2) = 5</mtext></mrow></math><img file="EP0366331B1_D0011.tif" /></maths>
The digits of the dividend reduce as follows:<maths id="math0012" num=""><math display="block"><mrow><mtext>38 = 3+8 = 11</mtext></mrow></math><img file="EP0366331B1_D0012.tif" /></maths>
The digits of the divisor reduce as follows:<maths id="math0013" num=""><math display="block"><mrow><mtext>13 = 1+3 = 4</mtext></mrow></math><img file="EP0366331B1_D0013.tif" /></maths>
11/4 = 2 remainder 3<maths id="math0014" num="(eq. 6)"><math display="block"><mrow><mtext>2+3 = 5</mtext></mrow></math><img file="EP0366331B1_D0014.tif" /></maths>
Equation 5 = Equation 6
In logical circuits such as are found in ALU's, the operation most frequently performed is addition, although other functions are, of course, frequently performed. The aforementioned mathematical principles and methodology can be used to create a procedure to detect errors that occur within an ALU (for example, when two or more numbers are added or otherwise arithmetically manipulated). Further, this principle can be used to correct erroneous results without re-adding vertically. This is significant because the cause of the incorrect vertical addition in the ALU could continue to generate the same or other erroneous results if the ALU is merely exercised in the same manner.
Error detection can be implemented to signal malfunctions or inaccurate arithmetic manipulation results when equation 1a does not equal equation 2a, equation 3 does not equal equation 4 or equation 5 does not equal equation 6. In the event that equation 1a is not equal to equation 2a (i.e., the reduced vertical single digit sum is not equal to the reduced horizontal single digit sum), a comparator will raise a status flag indicating the anomaly.
Consider the foregoing original example where two numbers 49 and 68 were added to one another. The sum of 49 and 68 = 49+68 = 117. Suppose the result generated by a malfunctioning ALU is a number other than 117; say, for example, 100.<maths id="math0015" num=""><img file="EP0366331B1_D0015.tif" /></maths><maths id="math0016" num=""><math display="block"><mrow><msub><mrow><mtext>(x</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>+y</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>)+(x</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><msub><mrow><mtext>+y</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext>) = 100(??)</mtext></mrow></math><img file="EP0366331B1_D0016.tif" /></maths>
In accordance with the present invention, the horizontal addition and reduction of each operand is performed as follows:<maths id="math0017" num="(eq. 7)"><math display="block"><mrow><msub><mrow><mtext>(x</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>+x</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><msub><mrow><mtext>)+(y</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>+y</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext>) = 4+9+8+6 = 27</mtext></mrow></math><img file="EP0366331B1_D0017.tif" /></maths>
Subtracting the digits from one another results in:<maths id="math0018" num=""><math display="block"><mrow><msub><mrow><mtext>x</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>-x</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext> = 4-9 = -5</mtext></mrow></math><img file="EP0366331B1_D0018.tif" /></maths><maths id="math0019" num=""><math display="block"><mrow><msub><mrow><mtext>y</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>-y</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext> = 6-8 = -2</mtext></mrow></math><img file="EP0366331B1_D0019.tif" /></maths>
Adding the results:<maths id="math0020" num="(eq. 8)"><math display="block"><mrow><msub><mrow><mtext>(x</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>-x</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><msub><mrow><mtext>)+(y</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>-y</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext>) = -7</mtext></mrow></math><img file="EP0366331B1_D0020.tif" /></maths>
Equation 7 - equation 8 results in:<maths id="math0021" num=""><math display="block"><mrow><msub><mrow><mtext>2x</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><msub><mrow><mtext> + 2y</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext> = 18+16 = 34</mtext></mrow></math><img file="EP0366331B1_D0021.tif" /></maths><maths id="math0022" num="(eq. 9)"><math display="block"><mrow><msub><mrow><mtext>x</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><msub><mrow><mtext>+y</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext> = 17</mtext></mrow></math><img file="EP0366331B1_D0022.tif" /></maths>
Equation 7 + equation 8 results in:<maths id="math0023" num=""><math display="block"><mrow><msub><mrow><mtext>2x</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>+2y</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><mtext> = 8+12 = 20</mtext></mrow></math><img file="EP0366331B1_D0023.tif" /></maths><maths id="math0024" num="(eq. 10)"><math display="block"><mrow><msub><mrow><mtext>x</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>+y</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><mtext> = 10</mtext></mrow></math><img file="EP0366331B1_D0024.tif" /></maths>
For base 10 additions, the results of equations 9 and 10 respectively are: carry₁(C₁) and (x₂ + y₂) (i.e., 7 with 1 carry) carry₂ (C₂) and (x₁ + y₁) (i.e., 0 with 1 carry)
Thus, (x₁+y₁) + (x₂+y₂) can be represented in tabular form as:<maths id="math0025" num=""><img file="EP0366331B1_D0025.tif" /></maths>
By shifting the carry location (C₁) to the left, the tabular result is:<maths id="math0026" num=""><img file="EP0366331B1_D0026.tif" /></maths>
Eliminating zero values in carry columns (C₁) results in 117, which is the correct result.
The erroneous result (100) can now be replaced with the true answer (117), without performing the same vertical, conventional addition again that resulted in the original error.
As another example, consider two 3-digit numbers to be added to one another.<maths id="math0027" num=""><img file="EP0366331B1_D0027.tif" /></maths> Assume an ALU arrived at the erroneous result:<maths id="math0028" num=""><math display="block"><mrow><mtext>X + Y = 1018(??)</mtext></mrow></math><img file="EP0366331B1_D0028.tif" /></maths>
Horizontal summation of the digits of both operand yields:<maths id="math0029" num="(eq. 11)"><math display="block"><mrow><msub><mrow><mtext>x</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>+x</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><msub><mrow><mtext>+x</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><msub><mrow><mtext>+y</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>+y</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><msub><mrow><mtext>+y</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><mtext> = 4+1+8+8+5+6 = 32</mtext></mrow></math><img file="EP0366331B1_D0029.tif" /></maths>
Selective subtraction of one corresponding digit in each operand yields:<maths id="math0030" num="(eq. 12a)"><math display="block"><mrow><msub><mrow><mtext>(x</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>+x</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><msub><mrow><mtext>-x</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><msub><mrow><mtext>)+(y</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>+y</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><msub><mrow><mtext>-y</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><mtext>) = (-3)+(7) = 4</mtext></mrow></math><img file="EP0366331B1_D0030.tif" /></maths><maths id="math0031" num="(eq. 12b)"><math display="block"><mrow><msub><mrow><mtext>(x</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>-x</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><msub><mrow><mtext>+x</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><msub><mrow><mtext>)+(y</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>-y</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><msub><mrow><mtext>+y</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><mtext>) = (11)+(9) = 20</mtext></mrow></math><img file="EP0366331B1_D0031.tif" /></maths><maths id="math0032" num="(eq. 12c)"><math display="block"><mrow><msub><mrow><mtext>(-x</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>+x</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><msub><mrow><mtext>+x</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><msub><mrow><mtext>)+(-y</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext>+y</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><msub><mrow><mtext>+y</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><mtext>) = (5)+(3) = 8</mtext></mrow></math><img file="EP0366331B1_D0032.tif" /></maths>
Equations are subtracted from one another to arrive at column values for the carry table:<maths id="math0033" num="(eq. 13a)"><math display="block"><mrow><msub><mrow><mtext>Eq. 11 - eq. 12a = 2x</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><msub><mrow><mtext> + 2y</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><mtext> = 28</mtext><mspace linebreak="newline" /><msub><mrow><mtext> x</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><msub><mrow><mtext> + y</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><mtext> = 14</mtext></mrow></math><img file="EP0366331B1_D0033.tif" /></maths><maths id="math0034" num="(eq. 13b)"><math display="block"><mrow><msub><mrow><mtext>Eq. 11 - eq. 12b = 2x</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><msub><mrow><mtext> + 2y</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext> = 12</mtext><mspace linebreak="newline" /><msub><mrow><mtext> x</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><msub><mrow><mtext> + y</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext> = 6</mtext></mrow></math><img file="EP0366331B1_D0034.tif" /></maths><maths id="math0035" num="(eq. 13c)"><math display="block"><mrow><msub><mrow><mtext>Eq. 11 - eq. 12c = 2x</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext> + 2y</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><mtext> = 24</mtext><mspace linebreak="newline" /><msub><mrow><mtext> x</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msub><mrow><mtext> + y</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><mtext> = 12</mtext></mrow></math><img file="EP0366331B1_D0035.tif" /></maths>
The tabular form of the sum of each corresponding digit in the two operands is as follows:<maths id="math0036" num=""><img file="EP0366331B1_D0036.tif" /></maths>
Left shifting the carry locations (C₂ and C₃) yields the following result:<maths id="math0037" num=""><img file="EP0366331B1_D0037.tif" /></maths>
Eliminating zero values in carry columns (C₂ and C₃) results in 1274, which is the correct result.
Referring now again to the method and apparatus of the present invention, FIGURE 2 shows a block diagram of the error detection and correction unit 16 (FIGURE 1).
Data line 10 applies DB0 signal to a binary to binary coded decimal (BCD) decoder 50, which accepts a 16-bit signal and converts the binary code therein to BCD values. The BCD decoder 50 operates as a look-up table and can be fabricated, as is well known in the art, from any programmable device suitable for this purpose.
Data signal DB1 over line 12, carrying a binary value representative of the second operand, is input to a data selector device 52 which also accepts a signal from line 18, which signal is representative of the output of ALU 14 (FIGURE 1). The data selector 52 is a multiplexer which selects one input signal 12 or the other input signal 18 and applies it to another binary to binary coded decimal decoder 54 over 16-bit data line 56.
The output signals of BCD decoders 50 and 54 are applied to a BCD adder 58 over 20-bit data lines 60 and 62, respectively. BCD adder 58 is described in greater detail hereinbelow. Output lines 60 and 62 are 20-bit lines whereas input lines 10, 12 and 18 are 16-bit lines because 16 bits of binary information require 20 bits when represented in BCD format. BCD adder 58 has provision for inputting a carry-in value 59, but this is preset and always fixed at level zero for purposes of the present invention.
The output signal of BCD adder 58 is applied to a 20-bit latch 64 over data line 66. The output signal of latch 64 is applied to a BCD to binary decoder 68 over data line 70.
The output signal of BCD decoder 50 is applied not only to BCD adder 58, as mentioned, but also to a data selector 72 over line 74. The output signal of data selector 72 is applied to a BCD compression unit 76, described in greater detail hereinbelow, over a 20-bit data line 78. Also applied to BCD compression unit 76 over a 20-bit data line 80 is the output signal of BCD decoder 54. BCD compression unit 76 has provision for inputting a carry-in value 77, but this is preset and always fixed at level zero for purposes of the present invention.
BCD compression unit 76 generates a signal which is applied to a latch 82 over 4-bit data line 84. The output signal of latch 82, as well as the direct output signal from BCD compression unit 76, is applied to comparator 20 over 4-bit data lines 22 and 24, respectively. As mentioned above, the output signal of comparator 20 is applied to data selector 26. The output signal of binary decoder 68 is also applied to data selector 26 over 16-bit data line 86.
Referring now also to FIGURE 3, there is shown a block diagram of the BCD adder 58, shown in FIGURE 2. The input lines to the BCD adder 58 are shown as reference numerals 60 and 62. Each of these lines 60 and 62 is a 20-bit data line. The BCD adder 58, therefore, is a 20-bit BCD adder, the output signal of which is generated over data line 66.
The 20-bit BCD adder 58 comprises five 4-bit BCD adder units 100, 102, 104, 106, 108. The 4-bit units 100-108 are connected to one another by suitable means known in the art and shown in FIGURE 3. They are connected to input lines 60 and 62 and to output data line 66.
Referring now also to FIGURE 4 there is shown a block diagram of the BCD compression unit 76 (Figure 2). Binary coded decimal compression unit 76 performs horizontal additions of the digits in each of the operands, in accordance with the mathematical principles as hereinabove described.
The 20-bit data lines 78 and 80 are input into compression unit 76 and are applied over two networks of signal lines, shown generally as reference numerals 112 and 114 to 20-bit BCD adders 120 and 122. BCD compression unit 76 comprises two BCD adders 120 and 122 that are identical to the BCD adder 58 shown in FIGURE 2. The difference of operation is based solely on the configuration of the BCD adders 120 and 122 and their associated networks 112 and 114.
Moreover, the output signal from each of the BCD adders 120 and 122 is fed back to the data line networks 112 and 114. This operation results in output signals C′0-C′19 and C0-C19 of the BCD adders 120 and 122 respectively, that are representative of a compressed 4-bit output. The compressed signal is applied to data selector 124 over the pair of 4-bit data lines 126 and 128. The output signal of data selector 124 is eventually applied to comparator 20 (FIGURE 2) over 4-bit data line 84.
Referring now also to FIGURE 5 there is shown a timing diagram in which a clock signal CK has a leading edge shown at reference numeral 101 which occurs when ALU 14 (FIGURE 1) begins arithmetic operations. The ALU 14 initiates operation on the operands by means of signal lines 10 and 12. During the first half of the CK signal cycle, designated as letter A in the FIGURE, ALU 14 computes the addition of the operands or performs some other arithmetic manipulation. At this time, BCD adder 58 within EDC unit 16 also begins arithmetic operations. Also, BCD compression unit 76 performs a compression operation to arrive at a 4-bit compressed value representative of the horizontal sum of both of the operands.
At point 102, ALU 14 generates an output signal that provides the result of its operation. The output signal is generated on data lines 18 and 32. During time period B, ALU 14 continues to generate a resultant signal output on data lines 18 and 32.
At point 103 in the cycle, the next ALU operation on operands is initiated.
Shown in the timing diagram of FIGURE 5 is a CK signal which is an antiphasal complement of the clock CK cycle. Thus, ALU 14 operates on the basis of the CK cycle whereas EDC subsystem operates on the basis of the <maths id="math0038" num=""><math display="inline"><mrow><mover accent="true"><mrow><mtext>CK</mtext></mrow><mo>¯</mo></mover></mrow></math><img file="EP0366331B1_D0038.tif" /></maths> clock cycle. At the end of the positive half of the CK signal, the result of the arithmetic operations that occur in ALU 14 are available over data lines 32 and 18 (FIGURE 1).
At point 104, the CK signal cycle is initiated. Point 104 occurs at the same time as point 101. The signal representative of the value of an operand on data line 10 is input to BCD decoder 50. At the same time, the operand represented by a signal on data line 12 is enabled onto signal line 56 by means of data selector 52, port 0.
During time period C, the BCD equivalent of the operand on signal line 10 drives signal lines 60 and 74, providing inputs to BCD adder 58, port A, and data selector 72, port 0. The output signal of data selector 72 drives signal line 78 and is input to BCD compression unit 76, port B. The BCD equivalent of the operand value that is transmitted on data line 56 drives data lines 62 and 80, providing input to BCD adder 58, port B, and BCD compression unit 76, port A.
BCD adder 58 computes the BCD addition of the operands on data line 60 and 62. The output signal of BCD adder 58 is transmitted on data line 66, which is then input to latch 64, the latch 64 being in a transparent mode. BCD compression unit 76 performs the horizontal BCD addition or other arithmetic manipulation of the two operands on data lines 80 and 78. The BCD compression unit 76 generates a signal representative of the foregoing arithmetic manipulation over 4-bit data line 84, which is applied to latch 82 in a transparent mode.
At point 105 in the CK clock cycle, the value representative of the operand on data line 66 is latched by latch 64 as output to data line 70 and input to binary decoder 68. The value representative of the operand on data line 84 is latched by latch 82, applied to data line 22 and input to comparator 20. ALU 14 generates an output signal over data line 18, which is enabled onto data line 56 by means of data selector 52, port 1. A zero operand is enabled onto data line 78 by means of data selector 72, port 1.
During time period D, the BCD equivalent of the value representative of the operand on data line 56 drives data line 80, providing an input to BCD compression unit 76, port A. A zero operand is input to BCD compression unit 76, port B.
BCD compression unit 76 performs the horizontal BCD addition or other arithmetic operation of the operands on data lines 80 and 78 generates the 4-bit result representative of a single digit on data line 24, which is the second input to comparator 20. Binary decoder 68 converts the BCD value representative of the operand on data line 70 to its binary equivalent and generates a result on data line 86, the second input to data selector 26.
Also during this time interval D, comparator 20 generates a 1-bit status signal onto data lines 30 and 34. This status signal represents the result of the comparison of the operands on data lines 22 and 24. The status signal 30 is input to data selector 26, which passes one of the operands on data lines 32 and 86 to its output data line 36.
At point 106, the next operation for EDC 16 is initiated. The operand on data line 36 and error flag 34 are latched into the microprocessor system, not shown.
It can be seen that BCD compression unit 76 operates twice within one clock cycle, the first time to perform a horizontal adding and compression and the second time to perform the compression for the output of ALU 14. The resultant signals that are applied to data lines 22 and 24, therefore, represent the compressed value of the horizontal and the compressed value of the ALU output signals respectively. Comparator 20 performs a comparison of these two compressed signals during the latter half of the positive half cycle of the CK signal.
Since other modifications and changes varied to fit particular operating requirements and environments will be apparent to those skilled in the art, the invention is not considered limited to the example chosen for purposes of disclosure, and covers all changes and modifications which do not constitute departures from the scope of this invention.
42 sheets
Sheet 1 Sheet 2 Sheet 3 Sheet 4 Sheet 5 Sheet 6 Sheet 7 Sheet 8 Sheet 9 Sheet 10 Sheet 11 Sheet 12 Sheet 13 Sheet 14 Sheet 15 Sheet 16 Sheet 17 Sheet 18 Sheet 19 Sheet 20 Sheet 21 Sheet 22 Sheet 23 Sheet 24 Sheet 25 Sheet 26 Sheet 27 Sheet 28 Sheet 29 Sheet 30 Sheet 31 Sheet 32 Sheet 33 Sheet 34 Sheet 35 Sheet 36 Sheet 37 Sheet 38 Sheet 39 Sheet 40 Sheet 41 Sheet 42
8 members in 5 offices
Priority claims4
| Document | Office | Kind | Date |
|---|---|---|---|
| 262658 | United States of America | – | |
| 26265888 | United States of America | A | |
| 262658 | – | – | – |
| US19880262658 | – | – | – |
Members8
| Document | Office | Kind | |
|---|---|---|---|
| EP0366331A2 | European Patent Office (EPO) | A2 | |
| JPH02178738A | Japan | A | |
| US4994993A | United States of America | A | |
| EP0366331A3 | European Patent Office (EPO) | A3 | |
| EP0366331B1This record | European Patent Office (EPO) | B1 | |
| AT136134T | Austria | T | |
| DE68926093D1 | Germany | D1 | |
| DE68926093T2 | Germany | T2 |
35 legal events, as 3 offices reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | Office | |
|---|---|---|---|
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Gb: european patent ceased through non-payment of renewal feeCeasedGBPC | GBPC | EP | |
| European patent in force as of 2002-01-01IF02 | IF02 | GB | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| No opposition filedOpposition26N | 26N | EP | |
| No opposition filed within time limitOppositionORIGINAL CODE: 0009261PLBE | PLBE | EP | |
| Information on the status of an ep patent application or granted ep patentGrantedSTATUS: NO OPPOSITION FILED WITHIN TIME LIMITSTAA | STAA | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Patent ceasedCeasedPL | PL | CH | |
| Nl: lapsed or annulled due to failure to fulfill the requirements of art. 29p and 29m of the patents actLapsedNLV1 | NLV1 | EP | |
| Fr: translation not filedEN | EN | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| It: translation for a ep patent filedITF | ITF | EP | |
| It: translation for a ep patent filedITF | ITF | EP | |
| Corresponds to:REF | REF | EP | |
| Designated contracting statesAK | AK | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Corresponds to:REF | REF | EP | |
| (expected) grantORIGINAL CODE: 0009210GRAA | GRAA | EP | |
| First examination report despatched17Q | 17Q | EP | |
| Request for examination filed17P | 17P | EP | |
| Designated contracting statesAK | AK | EP | |
| Search report despatchedORIGINAL CODE: 0009013PUAL | PUAL | EP | |
| Designated contracting statesAK | AK | EP | |
| Public reference made under article 153(3) epc to a published international application that has entered the european phaseORIGINAL CODE: 0009012PUAI | PUAI | EP |
Numbers
- Publication
- 0366331
- Publication, DOCDB
- 0366331
- Publication, EPODOC
- EP0366331
- Application
- 89310634
- Application, DOCDB
- 89310634
- Application, EPODOC
- EP19890310634
Titles3
- German
- Vorrichtung und Verfahren zur Fehlererkennung in das Ergebnis einer arithmetische Operation
- English
- System and method for error detection in the result of an arithmetic operation
- French
- Système et méthode de détection d'erreur dans le résultat d'une opération arithmétique
Classification
- CPC, 2
- G06F11/1497
- G06F11/104
- IPC, 3
- G06F11 00
- G06F11 10
- G06F11 14
Designated states13
- Contracting states, 13
- Austria
- Belgium
- Switzerland
- Germany
- Spain
- France
- United Kingdom
- Greece
- Italy
- Liechtenstein
- Luxembourg
- Netherlands (Kingdom of the)
- Sweden
