EP0366331B1

System and method for error detection in the result of an arithmetic operation

Abstract

This record has no abstract on file.

EP0366331B1, drawing sheet 1
Sheet 1 of 42

Term

Term ended

Expired 17 October 2009, 16.9 years ago.

  1. Priority
  2. Filed
  3. Granted
  4. Expired
  5. Today

8 claims: 8 independent, 0 dependent

  1. 1
    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 (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.
  2. 2
    A 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.
  3. 3
    A 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é.
  4. 4
    A 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é.
  5. 5
    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 (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.
  6. 6
    A 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.
  7. 7
    A 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.
  8. 8
    A 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.