DE102013112021B4 - Method and device for detecting bit errors - Google Patents

Method and device for detecting bit errors Download PDF

Info

Publication number
DE102013112021B4
DE102013112021B4 DE102013112021.0A DE102013112021A DE102013112021B4 DE 102013112021 B4 DE102013112021 B4 DE 102013112021B4 DE 102013112021 A DE102013112021 A DE 102013112021A DE 102013112021 B4 DE102013112021 B4 DE 102013112021B4
Authority
DE
Germany
Prior art keywords
code
bit
carry
parity
operand
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
DE102013112021.0A
Other languages
German (de)
Other versions
DE102013112021A1 (en
Inventor
Christian Siemers
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hochschule Nordhausen De
Technische Universitaet Clausthal
Original Assignee
Hochschule Nordhausen
Technische Universitaet Clausthal
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hochschule Nordhausen, Technische Universitaet Clausthal filed Critical Hochschule Nordhausen
Priority to DE102013112021.0A priority Critical patent/DE102013112021B4/en
Publication of DE102013112021A1 publication Critical patent/DE102013112021A1/en
Application granted granted Critical
Publication of DE102013112021B4 publication Critical patent/DE102013112021B4/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's

Abstract

Die Erfindung betrifft ein Verfahren und eine Vorrichtung zum Erkennen von Bitfehlern in einem Ergebnis einer auf einer Rechenmaschine ausgeführten arithmetischen Rechenoperation zweier Bitsequenzen, wobei für die Bitsequenzen ein Paritätscode berechnet wird, der eine Mehrzahl von Paritätsbits enthält, wobei jedes Paritätsbit des Paritätscodes bezüglich der arithmetischen Rechenoperation vorausberechnet wird und durch Vergleich der tatsächlichen Ergebnis-Paritäten ein Bitfehler erkennbar ist.The invention relates to a method and a device for detecting bit errors in a result of an arithmetic operation of two bit sequences performed on a calculating machine, wherein for the bit sequences a parity code is calculated which contains a plurality of parity bits, each parity bit of the parity code relating to the arithmetic operation is precalculated and a bit error is recognizable by comparing the actual result parities.

Description

Die Erfindung betrifft ein Verfahren zum Erkennen von Bitfehlern in einem Ergebnis einer auf einer Rechenmaschine ausgeführten arithmetischen Rechenoperation zweier Bitsequenzen. Die Erfindung betrifft ebenso ein Computerprogramm, eine Halbleiterschaltung sowie ein Computersystem hierzu. The invention relates to a method for detecting bit errors in a result of an arithmetic operation of two bit sequences performed on a computing machine. The invention also relates to a computer program, a semiconductor circuit and a computer system for this purpose.

Es ist allgemein bekannt, dass auch bei Computerprogrammen, die hinsichtlich ihrer semantischen Vorgaben mathematisch korrekt sind, Fehler auftreten können, deren Ursprünge meist nicht mehr feststellbar sind. Derartige Fehler bei der Ausführung von Computerprogrammen in Rechenmaschinen können beispielsweise durch äußere Einflüsse, Erwärmungen oder auch Hardwaredefekte entstehen und können temporär oder von dauerhafter Natur sein. Insbesondere bei sicherheitskritischen Anwendungen ist es daher notwendig, derartige Fehler sicher und schnell erkennen zu können. It is well known that even with computer programs that are mathematically correct in terms of their semantic specifications, errors may occur whose origins are usually no longer detectable. Such errors in the execution of computer programs in computing machines, for example, by external influences, warming or hardware defects may arise and may be temporary or permanent nature. In particular, in safety-critical applications, it is therefore necessary to detect such errors safely and quickly.

So ist es beispielsweise bekannt, dass sicherheitskritische Systeme redundant ausgelegt werden, so dass jedes der Systeme einzeln für sich die Berechnung durchführt und anschließend durch Vergleich der Ergebnisse festgestellt werden kann, ob ein Fehler in einer der Berechnungen aufgetreten ist. Sind beide Ergebnisse identisch, so wird von keinem Fehler ausgegangen. For example, it is known that safety-critical systems are designed to be redundant, so that each of the systems individually performs the calculation individually and then, by comparing the results, it can be determined whether an error has occurred in one of the calculations. If both results are identical, then no error is assumed.

Bei der Übertragung von Daten werden beispielsweise sogenannte CRC-Summen (Cyclic Redundancy Check) eingesetzt, die durch erzeugende Polynome gebildet werden. Hierdurch lassen sich bestimmte Arten von Fehlern zuverlässig erkennen. In the transmission of data, for example, so-called CRC sums (Cyclic Redundancy Check) are used, which are formed by generating polynomials. This makes it possible to reliably detect certain types of errors.

Bei dem Fehlererkennungsverfahren durch redundante Ausführungen ist der Nachteil jedoch darin zu sehen, dass aufgrund der Mehrfachausführung der Systeme auch entsprechende Hardware bereitgestellt werden muss. Darüber hinaus benötigen derartige Systeme auch signifikant mehr elektrische Energie für den Betrieb, so dass diese Art der Fehlererkennung hinsichtlich des Einsatzgebietes Beschränkungen unterliegt. Wird die Redundanz der Berechnung auf ein und demselben Mikroprozessor untergebracht, so ist hierfür meist eine wesentlich höhere Siliziumfläche notwendig, was sich in einigen Einsatzgebieten ebenfalls als nachteilig erwiesen hat. Dem gegenüber steht jedoch der unübersehbare Vorteil, dass mit Hilfe der redundanten Ausführung (auch mehrfach redundant) der Rechenfehler innerhalb des Mikroprozessors zuverlässig erkannt werden kann. However, in the case of the error detection method by redundant embodiments, the disadvantage is that due to the multiple execution of the systems, corresponding hardware must also be provided. In addition, such systems also require significantly more electrical energy for operation, so that this type of error detection is subject to restrictions with regard to the field of use. If the redundancy of the calculation is accommodated on one and the same microprocessor, a much higher silicon area is usually necessary for this, which has likewise proven disadvantageous in some fields of application. On the other hand, however, there is the obvious advantage that with the help of the redundant design (also multiple redundant) the calculation error within the microprocessor can be reliably detected.

Bei der Ausführung eines Computerprogramms werden sehr häufig arithmetische Rechenoperationen zweier Binärzahlen durchgeführt, wie beispielsweise die binäre Addition oder Subtraktion. Dabei werden zwei binäre Zahlen, die in Form einer Bitsequenz mit vorgegebener Länge in dem Mikroprozessor bereitgestellt werden, gemäß den binären, arithmetischen Rechenregeln zu einem binären Ergebnis verrechnet, wobei mit Hilfe der Subtraktion letztlich alle anderen arithmetischen Rechenoperationen abgebildet werden können. Nachfolgend ist ein Beispiel einer arithmetischen Subtraktionsoperation auf binärer Ebene gezeigt:

Figure DE102013112021B4_0002
When executing a computer program, very often arithmetic operations of two binary numbers are performed, such as binary addition or subtraction. In this case, two binary numbers, which are provided in the form of a bit sequence with a predetermined length in the microprocessor, according to the binary arithmetic calculation rules are calculated into a binary result, with the help of the subtraction, all other arithmetic operations can be mapped. The following is an example of an arithmetic subtraction operation at the binary level:
Figure DE102013112021B4_0002

Wie in dem Beispiel gezeigt, soll von der Dezimalzahl 24, vorliegend in binärer Form, die Zahl 4 abgezogen werden. Das Ergebnis ist die Dezimalzahl 20, in binärer Form. Aufgrund der arithmetischen Rechenregel bezüglich der binären, arithmetischen Subtraktionsoperation muss dabei ein möglicher Übertrag auf die nächste Bitposition berücksichtigt werden, wenn ein solcher Übertrag entsteht. Die an der jeweiligen Bitposition zu berücksichtigenden Überträge werden dabei durch das BC-Feld (BC: borrow carry) entsprechend angegeben. Wie zu erkennen ist, muss an der Bitposition 3 ein solcher Übertrag bei der Berechnung des Ergebnis-Bitwertes an der Bitposition 3 berücksichtigt werden, so dass das Ergebnis an der Bitposition 3 in dieser Rechenaufgabe eine logische 0 anstelle einer logischen 1 ist. As shown in the example, the number 4 should be subtracted from the decimal number 24, in this case in binary form. The result is the decimal number 20, in binary form. Due to the arithmetic calculation rule with respect to the binary arithmetic subtraction operation, a possible carry over to the next bit position must be taken into account when such a carry arises. The transfers to be taken into account at the respective bit position are specified accordingly by the BC field (BC: borrow carry). As can be seen, at the bit position 3, such a carry must be taken into account in the calculation of the result bit value at the bit position 3, so that the result at the bit position 3 in this calculation task is a logic 0 instead of a logic 1.

Eine derartige binäre Subtraktionsoperation lässt sich dabei mit Hilfe eines Vollsubtrahierers realisieren, beispielsweise eines Ripple-Carry-Subtrahierers, bei dem an einer Bitposition für die nächste Bitposition zu berücksichtigender Übertrag entsprechend weitergetragen wird.

Figure DE102013112021B4_0003
Such a binary subtraction operation can be realized with the aid of a full subtractor, for example a ripple-carry subtractor, in which the carry to be taken into account at a bit position for the next bit position is carried on accordingly.
Figure DE102013112021B4_0003

VS entspricht dabei einem Vollsubtrahierer, der als Eingang die beiden Bitoperanden x und y erhält sowie ein zu berücksichtigendes Übertragsbit bc. Das Übertragsbit ist hier als borrow carry flag definiert, dass den Wert logisch 1 hat, wenn ein Übertrag zu berücksichtigen ist. VS corresponds to a full subtractor, which receives as input the two bit operands x and y and a carry bit bc to be considered. The carry bit is here defined as borrow carry flag, which has the value logical 1, if a carry is to be considered.

Der wichtigste Vorteil eines Ripple-Carry-Subtrahierers ist die lineare Skalierung der benötigten Ressourcen. Als wesentlicher Nachteil ist die linear steigende Laufzeit zu sehen, die dieser zur vollständigen Berechnung benötigt. Aus diesem Grund werden fast immer parallelisierte Varianten in Mikroprozessoren genutzt, die (fast) konstant in der Laufzeit bleiben, dafür aber exponentiell Ressourcen benötigen. The most important advantage of a ripple-carry subtractor is the linear scaling of the required resources. The main drawback is the linearly rising runtime, which this requires for a complete calculation. For this reason, nearly always parallelized variants are used in microprocessors that remain (almost) constant in their runtime, but require exponential resources.

Die hierbei wichtigste Variante ist der Carry Look-Ahead Subtrahierer, der in einer ersten Stufe die Carry-Bits (Überträge) berechnet und in einer zweiten Stufe dann die eigentliche Subtraktionsoperation durchführt.

Figure DE102013112021B4_0004
The most important variant here is the carry look-ahead subtractor, which calculates the carry bits (carry-over) in a first stage and then carries out the actual subtraction operation in a second stage.
Figure DE102013112021B4_0004

Ein derartiger Carry Look-Ahead Generator basiert nun auf den möglichen Zweiermechanismen, die zur Erzeugung des Übertrages bzw. zur Weiterleitung eines bereits erzeugten Übertrages führen. Diese Signale bzw. Signalfelder werden auch als Borrow Carry Generate und Borrow Carry Propagate bezeichnet. Such a carry-look-ahead generator is now based on the possible two-way mechanisms that lead to the generation of the carryover or to the forwarding of an already generated carryover. These signals or signal fields are also called Borrow Carry Generate and Borrow Carry Propagate.

Das Borrow Carry Generate Signal gibt dabei an, ob aufgrund der Bitwerte der vorhergehenden Bitposition definitiv ein Übertrag an der darauf folgenden Bitposition generiert wird oder nicht. Das Borrow Carry Propagate Signal gibt dabei an, ob an der betreffenden Bitposition ein zu berücksichtigender Übertrag definitiv auf die nächstfolgende Bitposition übertragen werden muss oder ob ein möglicherweise zu berücksichtigender Übertrag an dieser Bitposition eliminiert wird. Die Signalfelder Borrow Carry Generate und Borrow Carry Propagate können gemäß der Rechenregel für die Subtraktionsoperation wie folgt berechnet werden: gn = not xn·yn pn = not xn + yn (4) wobei g das Borrow Carry Generate Signalfeld bezeichnet und p das Borrow Carry Propagate Signalfeld bezeichnet. Mit der Formel bc0 = bcin bcn+1 = gn + bcn·pn (5) kann nun der Übertrag für jede Bitposition aus dem Borrow Carry Generate und Borrow Carry Propagate Feldern berechnet werden, wobei ein sogenanntes Borrow Carry Signal immer für diejenige Bitposition berechnet wird, an der es bei der arithmetischen Rechenoperation zu berücksichtigen ist. The Borrow Carry Generate Signal indicates whether, based on the bit values of the previous bit position, a carry is definitely generated at the following bit position or not. The Borrow Carry Propagate signal indicates whether at the relevant bit position a carry to be taken into account must definitely be transferred to the next following bit position or whether a possibly to be considered carry at this bit position is eliminated. The signal fields Borrow Carry Generate and Borrow Carry Propagate can be calculated according to the calculation rule for the subtraction operation as follows: g n = not x n · y n p n = not x n + y n (4) where g denotes the Borrow Carry Generate signal field and p denotes the Borrow Carry Propagate signal field. With the formula bc bc = 0 n in bc + 1 = g n + bc n · p n (5) Now the carry for each bit position can be calculated from the Borrow Carry Generate and Borrow Carry Propagate fields, whereby a so-called Borrow Carry signal is always calculated for the bit position to be considered in the arithmetic operation.

Aus der US 6,990,507 B2 ist ein Verfahren bekannt, bei dem die Parität eines Ergebnisses eines Inkrements um 1 einer Mehrbitsequenz vorhergesagt werden kann, so dass sich ein Bitfehler durch Vergleich der vorhergesagten Paritäten mit der berechneten Parität aus der Ergebnis-Bitsequenz ermitteln lässt. Dabei wird zunächst die Parität der Eingangs-Bitsequenz ermittelt und anschließend überprüft, ob eine ungerade Anzahl von Bits aufgrund des Übertrags beide Inkrementoperationen ihren Bitwert ändern, so dass die vorhergesagte Parität dann durch Umkehr der Parität der Eingangs-Bitsequenz berechnen lässt. Ist die Anzahl der Bits, die sich aufgrund des Übertrags bei der Inkrementoperation ändern werden, gerade, so entspricht die vorhergesagte Parität der Ausgangsparität. From the US 6,990,507 B2 For example, a method is known in which the parity of a result of an increment of 1 of a multi-bit sequence can be predicted so that a bit error can be determined by comparing the predicted parities with the calculated parity from the result bit sequence. First, the parity of the input bit sequence is determined and then it is checked whether an odd number of bits due to the carry both increment operations change their bit value so that the predicted parity can then be calculated by reversing the parity of the input bit sequence. If the number of bits that will change due to the carry in the increment operation is even, the predicted parity will be the output parity.

Für eine 8 Bit Sequenz, deren Wert um 1 inkrementiert werden soll, ergibt sich somit folgende Formel zur Bestimmung der Parität: p = b[0] ⊕ ... ⊕ b[7] (6) wobei p die Parität der 8 bit Eingangs-Bitsequenz darstellt, b[0] das niederwertigste Bit der Bitsequenz und b[7] das höchstwertigste Bit darstellen. Das Symbol ⊕ ist dabei die boolesche XOR Operation. For an 8-bit sequence whose value is to be incremented by 1, the following formula thus results for determining the parity: p = b [0] ⊕ ... ⊕ b [7] (6) where p represents the parity of the 8 bit input bit sequence, b [0] represents the least significant bit of the bit sequence, and b [7] represents the most significant bit. The symbol ⊕ is the Boolean XOR operation.

Demnach kann die Parität einer Bitsequenz dadurch ermittelt werden, dass sämtliche Bits der Bitsequenz XOR verknüpft werden. Die booleschen Operation XOR ist dabei immer dann logisch 0 (false), wenn die beiden Operanden gleich sind, sonst logisch 1 (true). Accordingly, the parity of a bit sequence can be determined by combining all the bits of the bit sequence XOR. The Boolean operation XOR is always logical 0 (false) if the two operands are the same, otherwise logically 1 (true).

Mittels der nachstehenden Formel

Figure DE102013112021B4_0005
Figure DE102013112021B4_0006
bei der p’ die vorhergesagte Parität des Ergebnisses darstellt, not die Invertierung des Bits, + das logische OR und * das logische AND ist, lässt sich die Parität des Ergebnisses der Inkrementoperation um 1 vorhersagen, indem festgestellt wird, ob eine ungerade Anzahl von Bits aufgrund des Übertrags der arithmetischen Operation ihren Bitwert ändern. By means of the formula below
Figure DE102013112021B4_0005
Figure DE102013112021B4_0006
where p 'represents the predicted parity of the result, not the inversion of the bit, + the logical OR and * the logical AND, the parity of the result of the increment operation can be predicted by 1 by determining whether an odd number of bits change its bit value due to the carry of the arithmetic operation.

Der große Nachteil dieses Verfahrens besteht jedoch darin, dass dies lediglich auf die Inkrementoperation um 1 angewendet werden kann, wobei bei dieser Inkrementoperation ein Operand feststeht und binär immer an der gleichen Bitposition ansetzt. Für die Erkennung von Rechenfehlern, bei der beide Operanden der arithmetischen Rechenoperation variabel sind, ist dieses Verfahren nicht sinnvoll anwendbar. The big disadvantage of this method, however, is that this can only be applied to the increment operation by 1, an operand being fixed in this increment operation and always being set to the same bit position in binary form. For the recognition of arithmetic errors, in which both operands of the arithmetic arithmetic operation are variable, this method is not meaningful applicable.

Aus NICOLAIDIS, M.: Carry Checking/Parity Prediction Adders and ALUS. Very Large Scale Integration (VLSI) Systems, IEEE Transactions on, Vol. 11, No. 1, Feb. 2003, S. 121–128 ist bekannt, die Gesamtparität einer arithmetischen Rechenoperation vorauszuberechnen, indem die Gesamtparität des ersten Operanden, die Gesamtparität des zweiten Operanden und die Gesamtparität des Carry Vectors berechnet und dann durch XOR zu der Ergebnis-Gesamtparität verknüpft wird. Ein ähnliches Verfahren ist auch aus der US 4,224,680 A bekannt. From NICOLAIDIS, M .: Carry Checking / Parity Prediction Adders and ALUS. Very Large Scale Integration (VLSI) Systems, IEEE Transactions on, Vol. 1, Feb. 2003, pp. 121-128, it is known to predict the overall parity of an arithmetic operation by calculating the total parity of the first operand, the total parity of the second operand, and the total parity of the carry vector, and then XORing them to the result total parity becomes. A similar procedure is also from the US 4,224,680 A known.

Vor diesem Hintergrund ist es Aufgabe der vorliegenden Erfindung, ein verbessertes Verfahren und eine verbesserte Vorrichtung anzugeben, mit der Bitfehler während der Berechnung einer arithmetischen Rechenoperation zweier Bitsequenzen effektiv und sicher erkannt werden können. Against this background, it is an object of the present invention to specify an improved method and an improved apparatus with which bit errors can be detected effectively and reliably during the calculation of an arithmetic operation of two bit sequences.

Die Aufgabe wird mit dem Verfahren gemäß Anspruch 1 erfindungsgemäß gelöst. Die Aufgabe wird auch mit dem Computerprogramm gemäß Anspruch 12 sowie der Halbleiterschaltung gemäß Anspruch 13 erfindungsgemäß gelöst. Die Aufgabe wird im Übrigen auch mit dem Computersystem gemäß Anspruch 14 erfindungsgemäß gelöst. The object is achieved by the method according to claim 1 according to the invention. The object is also achieved with the computer program according to claim 12 and the semiconductor circuit according to claim 13 according to the invention. Incidentally, the object is also achieved according to the invention with the computer system according to claim 14.

Gemäß Anspruch 1 wird ein Verfahren zum Erkennen von Bitfehlern in einem Ergebnis einer auf einer Rechenmaschine ausgeführten, arithmetischen Rechenoperation zweier Bitsequenzen vorgeschlagen, beim dem ein Paritätscode des Ergebnisses aus den Operanden-Bitsequenzen zum einen vorhergesagt und zum anderen aus der Ergebnis-Bitsequenz selbst berechnet wird. Durch Vergleich der vorhergesagten und berechneten Paritätscodes kann dann auf einen entsprechenden Bitfehler geschlossen werden. According to claim 1, a method is provided for detecting bit errors in a result of an arithmetic operation of two bit sequences performed on a calculating machine, in which a parity code of the result from the operand bit sequences is predicted on the one hand and calculated from the result bit sequence itself , By comparing the predicted and calculated parity codes, a corresponding bit error can then be deduced.

Hierfür werden erfindungsgemäß zunächst zwei Bitsequenzen dem Mikroprozessor bereitgestellt, auf denen dann die arithmetische Rechenoperation bitweise durchgeführt werden soll. Der erste Operand wird dabei als erste Operanden-Bitsequenz bereitgestellt, während der zweite Operand als zweite Operanden-Bitsequenz bereitgestellt wird, wobei beide Operanden-Bitsequenzen eine vorgegebene Anzahl von Bits aufweisen. In der Regel werden dies 8, 16 oder 32 bzw. 64 Bit sein. For this purpose, according to the invention initially two bit sequences are provided to the microprocessor, on which then the arithmetic operation is to be performed bit by bit. The first operand is provided as a first operand bit sequence, while the second operand is provided as a second operand bit sequence, wherein both operand bit sequences have a predetermined number of bits. Usually this will be 8, 16 or 32 or 64 bits.

Im nächsten Schritt werden nun aus der ersten Operanden-Bitsequenz und der zweiten Operanden-Bitsequenz ein erster Operanden-Paritätscode und ein zweiter Operanden-Paritätscode berechnet, wobei der erste Operanden-Paritätscode aus der ersten Operanden-Bitsequenz und der zweite Operanden-Paritätscode aus der zweiten Operanden-Bitsequenz berechnet werden. Die Berechnung des Paritätscodes erfolgt dabei in Abhängigkeit von einem vorgegebenen Paritätscode-Berechnungsschema, gemäß dem eine Mehrzahl von Paritätsbits berechnet werden und jedes Paritätsbit des Paritätscodes in Abhängigkeit von den Bitwerten eines jeweils vorgegebenen Teils von Bits der zugrunde gelegten Bitsequenz berechnet wird. In the next step, a first operand parity code and a second operand parity code are calculated from the first operand bit sequence and the second operand bit sequence, the first operand parity code being from the first operand bit sequence and the second operand parity code being from the first operand parity code second operand bit sequence. The calculation of the parity code is effected in dependence on a predetermined parity code calculation scheme, according to which a plurality of parity bits are calculated and each parity bit of the parity code is calculated in dependence on the bit values of a respective predetermined part of bits of the underlying bit sequence.

Ein derartiger Paritätscode bzw. ein derartiges Paritätscode-Berechnungsschema kann beispielsweise ein Hamming-Code sein, bei dem die einzelnen Paritätsbits jeweils aus einer Kombination verschiedener Bits der zugrunde gelegten Bitsequenz berechnet werden. Bei dem Paritätscode handelt es sich somit um eine Folge von mehreren Bits, die jeweils für sich ein Paritätsbit darstellen, das sich aus einem Teil der Bits der zugrunde gelegten Bitsequenz berechnen lässt. Die Anwendung des Paritätscode-Berechnungsschemas zur Berechnung der einzelnen Paritätsbits auf die jeweilige Operanden-Bitsequenz erzeugt somit im Ergebnis den Operanden-Paritätscode. Such a parity code calculation scheme may, for example, be a Hamming code in which the individual parity bits are each calculated from a combination of different bits of the underlying bit sequence. The parity code is thus a sequence of several bits, each of which represents a parity bit that can be calculated from a portion of the bits of the underlying bit sequence. The application of the parity-code calculation scheme for calculating the individual parity bits to the respective operand bit sequence thus generates the operand parity code as a result.

Im nächsten Schritt wird nun ein Übertragscode in Abhängigkeit von den Bitwerten der beiden Operanden-Bitsequenzen berechnet, in dem für jede Bitposition bezüglich der bitweisen arithmetischen Rechenoperation festgestellt wird, ob ausgehend von der jeweiligen Bitposition für die nächst höherwertige Bitposition ein Übertrag bei der bitweisen arithmetischen Rechenoperation zu berücksichtigen ist oder nicht. Dies bedeutet, dass ausgehend von den Bitwerten der Operanden-Bitsequenz an einer Bitposition ermittelt wird, ob ausgehend von dieser Bitposition an der nächst folgenden Bitposition bei der Durchführung der arithmetischen Rechenoperation ein Übertrag bei der bitweisen Berechnung im Ergebnis berücksichtigt werden muss oder nicht. Ein solcher Übertragscode (BC) kann beispielsweise das Borrow Carry Signalfeld sein, wie es mittels der eingangs genannten Formeln 4 und 5 berechenbar ist. In the next step, a carry code is now calculated as a function of the bit values of the two operand bit sequences, in which it is determined for each bit position with respect to the bitwise arithmetic operation whether a carry in the bitwise arithmetic operation starting from the respective bit position for the next higher bit position to take into account or not. This means that, based on the bit values of the operand bit sequence at a bit position, it is determined whether, starting from this bit position at the next following bit position during execution of the arithmetic arithmetic operation, a carry must be taken into account in the result during the bitwise calculation or not. Such a carry code (BC) can be, for example, the Borrow Carry signal field, as can be calculated by means of formulas 4 and 5 mentioned at the outset.

Aus diesem Übertragscode wird dann entsprechend dem Paritätscode-Berechnungsschema ein Korrektur-Paritätscode berechnet, so dass sich gemäß dem Paritätscode-Berechnungsschema für den Übertragscode eine Mehrzahl von Paritätsbits in Abhängigkeit von den jeweiligen Bitwerten des Übertragscodes ergeben. Mit anderen Worten, jedes Paritätsbit des Paritätscode-Berechnungsschemas wird nun auf Basis der Bitwerte des Übertragscodes und somit auf Basis der Bitwerte der Überträge an den einzelnen Bitpositionen des Übertragscodes berechnet, so dass für jedes Paritätsbit des Paritätscode-Berechnungsschemas ein Wert aus der ersten Operanden-Bitsequenz, der zweiten Operanden-Bitsequenz und des Übertragscodes, beispielsweise den BC-Feldern vorliegt. From this carry code, a correction parity code is then calculated in accordance with the parity-code calculation scheme so that a plurality of parity bits depending on the respective bit values of the carry code are obtained according to the carry code parity code calculation scheme. In other words, each parity-code calculation scheme parity bit is now calculated based on the bit values of the carry code and thus based on the bit values of the carries at the individual bit positions of the carry code such that a value from the first operand code is provided for each parity bit of the parity code calculation scheme. Bit sequence, the second operand bit sequence and the carry code, for example the BC fields.

Anschließend wird ein Vorausberechnungs-Paritätscode basierend auf dem ersten Operanden-Paritätscode, dem zweiten Operanden-Paritätscode und dem Korrektur-Paritätscode berechnet, in dem für jedes Paritätsbit des Vorausberechnungs-Paritätscodes die Parität aus dem zu dem jeweiligen Paritätsbit des Vorausberechnungs-Paritätscodes entsprechenden Paritätsbits des ersten Operanden-Paritätscodes, des zweiten Operanden-Paritätscodes und des Korrektur-Paritätscodes ermittelt wird. Dies kann beispielsweise dadurch erfolgen, dass die Paritätsbits der einzelnen Paritätscodes XOR miteinander verknüpft werden, wodurch sich das Ergebnis des Paritätscodes vorausberechnen lässt. Subsequently, a preprocessing parity code is calculated based on the first operand parity code, the second operand parity code and the correction parity code in which, for each parity bit of the preprocessing parity code, the parity bit from the parity bit of the parity bit corresponding to the parity bit of the preprocessing parity code first operand parity codes, the second operand parity codes and the correction parity code. This can be done, for example, by linking the parity bits of the individual parity codes XOR, which allows the result of the parity code to be calculated in advance.

Es wurde erkannt, dass der Paritätscode des Berechnungsergebnisses anhand der nachstehenden Formel vorausberechnet werden kann, PC(A◦B) = PC(A) ⊕ PC(B) ⊕ PC(BC(A◦B)) (8) wobei PC eine Funktion zur Berechnung des Paritätscodes gemäß dem Paritätscode-Berechnungsschema darstellt, ◦ die Rechenoperation darstellt, ⊕ die XOR Operation darstellt, und BC eine Funktion zur Berechnung des Übertrags an jeder Bitposition basierend auf der Rechenoperation ◦. Die Rechenoperation kann beispielsweise die Addition oder Subtraktion sein. It has been recognized that the parity code of the calculation result can be predicted using the formula below, PC (A◦B) = PC (A) ⊕ PC (B) ⊕ PC (BC (A◦B)) (8) wherein PC represents a function for calculating the parity code according to the parity code calculation scheme, ◦ represents the arithmetic operation, ⊕ represents the XOR operation, and BC a function for calculating the carry at each bit position based on the arithmetic operation ◦. The arithmetic operation may be, for example, addition or subtraction.

Dies bedeutet, dass durch eine XOR-Verknüpfung der beiden Paritätscodes der Operanden-Bitsequenz zusammen mit dem Paritätscode aus den Überträgen bezüglich der Rechenoperation der Paritätscode des Ergebnisses der Rechenoperation angewendet auf die beiden Operanden-Bitsequenzen sich vorausberechnen lässt. Der Vorausberechnungs-Paritätscode enthält somit jene Paritätsbits, die sich ergeben, wenn man den Paritätscode gemäß dem Paritätscode-Berechnungsschema des Ergebnisses der arithmetischen Rechenoperation berechnen würde. This means that, by XORing the two parity codes of the operand bit sequence together with the parity code from the carry over operations, the parity code of the result of the arithmetic operation applied to the two operand bit sequences can be predicted. The precomputation parity code thus contains those parity bits that result when calculating the parity code according to the parity code calculation scheme of the result of the arithmetic operation.

In einem zweiten Weg, der vorher, parallel oder im Nachgang zu dem oben Genannten durchgeführt werden kann, wird eine Ergebnis-Bitsequenz berechnet, indem die arithmetische Rechenoperation mit der ersten Operanden-Bitsequenz und der zweiten Operanden-Bitsequenz durchgeführt wird. Eine solche Rechenoperation kann beispielsweise die Addition oder Subtraktion der beiden Operanden sein, wobei gemäß den Rechenregeln einer solchen arithmetischen, binären Rechenoperation die Berechnung, wie in der Einleitung bereits angedeutet, bitweise für jede Bitposition unter Berücksichtigung eine jeweiligen Übertrages aus der vorhergehenden Bitposition erfolgt. Das Ergebnis ist eine Ergebnis-Bitsequenz, die das Ergebnis der Rechenoperation angewendet auf die beiden Operanden in binärer Form enthält. In a second way, which may be performed before, in parallel with or subsequent to the above, a result bit sequence is calculated by performing the arithmetic operation on the first operand bit sequence and the second operand bit sequence. Such an arithmetic operation can be, for example, the addition or subtraction of the two operands, wherein according to the calculation rules of such an arithmetic, binary arithmetic operation, the calculation, as already indicated in the introduction, is done bit by bit for each bit position taking into account a respective carry from the previous bit position. The result is a result bit sequence containing the result of the arithmetic operation applied to the two operands in binary form.

Aus dieser Ergebnis-Bitsequenz wird nun ein Ergebnis-Paritätscode berechnet, wobei die Berechnung des Ergebnis-Paritätscodes aus der Ergebnis-Bitsequenz entsprechend dem Paritätscode-Berechnungsschema in Abhängigkeit von den jeweiligen Bitwerten der Ergebnis-Bitsequenz erfolgt. Auch hier werden entsprechende Paritätsbits auf Basis der Bitwerte der Ergebnis-Bitsequenz gemäß dem Paritätscode-Berechnungsschema ermittelt. From this result bit sequence, a result parity code is calculated, wherein the calculation of the result parity code from the result bit sequence according to the parity code calculation scheme is done in response to the respective bit values of the result bit sequence. Again, corresponding parity bits are determined based on the bit values of the result bit sequence according to the parity code calculation scheme.

Im Anschluss hieran liegen nunmehr der Ergebnis-Paritätscode mit den jeweiligen Paritätsbits sowie der Vorausberechnungs-Paritätscode mit seinen jeweiligen Paritätsbits vor, so dass durch einen Vergleich der einzelnen Paritätsbits des Ergebnis-Paritätscodes und des Vorausberechnungs-Paritätscodes festgestellt werden kann, ob ein Fehler innerhalb der Berechnung der arithmetischen Rechenoperation vorliegt oder nicht. Sind sämtliche Paritätsbits des Ergebnis-Paritätscodes und des Vorausberechnungs-Paritätscodes identisch, so war die Berechnung erfolgreich. Wurde jedoch eine Abweichung festgestellt, so ist davon auszugehen, dass die Berechnung fehlerhaft war. Following this, the result parity code with the respective parity bits and the precomputation parity code with its respective parity bits are now present, so that it can be determined by comparing the individual parity bits of the result parity code and the preprocessing parity code whether an error within the Calculation of the arithmetic operation is present or not. If all the parity bits of the result parity code and the precomputation parity code are identical, the calculation was successful. However, if a deviation has been detected, it can be assumed that the calculation was incorrect.

Unter der Grundannahme, dass die Vorausberechnung des Paritätscodes immer korrekt abläuft, kann so auf einen Fehler in der Rechenoperation der beiden Operanden geschlossen werden. Wird diese Grundannahme nicht angenommen, so ist bei einem erkannten Fehler zumindest davon auszugehen, dass eine der beiden Berechnungen, sei es das Ergebnis oder sei es die Vorausberechnung des Paritätscodes, fehlerhaft war, so dass zumindest hier eine entsprechende Fehlerbehandlung durchgeführt werden kann. Under the basic assumption that the precalculation of the parity code always runs correctly, it is thus possible to conclude an error in the arithmetic operation of the two operands. If this basic assumption is not accepted, it must at least be assumed that one of the two calculations, whether the result or the precalculation of the parity code, was erroneous, so that at least here a corresponding error treatment can be carried out.

Dabei ist es unter Umständen sogar möglich, entsprechende Bitfehler zu korrigieren wenn anhand des verwendeten Paritätscodes und eines erkannten Fehlers auf das entsprechende fehlerhafte Bit in der Ergebnis-Bitsequenz geschlossen werden kann, was beispielsweise bei der Verwendung eines Hamming-Codes als Paritätscode möglich ist. Under certain circumstances, it is even possible to correct corresponding bit errors if, based on the parity code used and a detected error, it is possible to conclude the corresponding erroneous bit in the result bit sequence, which is possible, for example, when using a Hamming code as a parity code.

Die vorliegende Erfindung hat dabei den wesentlichen Vorteil, dass eine arithmetische Rechenoperation mit beliebigen Operanden hinsichtlich der Korrektheit der Berechnung überwacht werden kann und so Fehler innerhalb der arithmetischen Logikeinheit (ALU – Admatic Logic Unit) sicher festgestellt werden können, ohne dass hierfür eine redundante Auslegung der ALU notwendig ist. Dabei können neben den klassischen 1-Bit-Fehlern auch unter Umständen einige oder alle 2-Bit-Fehler erkannt werden, ohne dass es hier für den Aufbau einer redundanten Ausführung bedarf. Wurde ein Fehler beim Vergleich des Eingangs-Paritätscodes mit dem Vorausberechnungs-Paritätscode festgestellt, so kann das Gesamtsystem beispielsweise in einen sicheren Zustand überführt werden, was insbesondere bei sicherheitskritischen Anwendungsfällen besonders vorteilhaft ist. Durch den Aufbau einer weiteren Redundanzebene, beispielsweise durch den Aufbau eines zweiten Vorausberechnungs-Berechnungspfad gemäß der vorliegenden Erfindung lässt sich somit darüber hinaus feststellen, ob der Fehler, der aufgrund des Vergleiches der entsprechenden Ergebnis-Paritätscodes und der Vorausberechnungs-Paritätscode festgestellt wurde, in der Vorausberechnung liegt oder in dem Ergebnis der Rechenoperation. Dabei ist im Ergebnis die Vorausberechnung des Paritätscodes gemäß der vorliegenden Erfindung hinsichtlich der benötigten Siliziumfläche bei Halbleiterschaltungen kleiner als der redundante Aufbau der ALU, was den besonderen Vorteil der vorliegenden Erfindung ausspielt. The present invention has the significant advantage that an arithmetic arithmetic operation with arbitrary operands can be monitored with regard to the correctness of the calculation and thus errors within the arithmetic logic unit (ALU - Admatic Logic Unit) can be reliably determined without requiring a redundant design of the ALU is necessary. In addition to the classic 1-bit errors, some or all 2-bit errors may also be detected without this being the case here Structure of a redundant design required. If an error was found in the comparison of the input parity code with the preprocessing parity code, then the overall system can be transferred to a safe state, for example, which is particularly advantageous in safety-critical applications. Further, by constructing another level of redundancy, for example, by constructing a second prediction calculation path according to the present invention, it can be further determined whether the error which has been detected by comparing the corresponding result parity codes and the preprocessing parity code is determined in the Precalculation is or in the result of the arithmetic operation. As a result, the pre-calculation of the parity code according to the present invention with respect to the required silicon area in semiconductor circuits is smaller than the redundant structure of the ALU, which constitutes the particular advantage of the present invention.

Vorteilhafterweise handelt es sich bei dem Paritätscode-Berechnungsschema um einen linearen Blockcode, bei dem jedes Paritätsbild des linearen Blockcodes in Abhängigkeit von den Bitwerten der für das jeweilige Paritätsbit des linearen Blockcodes vorgegebenen Bits der zugrundeliegenden Bitsequenz berechnet wird. Ein solcher derartiger linearer Blockcode kann beispielsweise ein Hamming-Paritätscode sein, bei dem eine Mehrzahl von Paritätsbits aus jeweils einer verschiedenen Kombination von Bits der zugrunde gelegten Bitsequenz berechnet werden, wodurch Befehle nicht mehr erkannt, sondern fehlerhafte Bits auch korrigiert werden können. Advantageously, the parity-code calculation scheme is a linear block code in which each parity image of the linear block code is calculated in response to the bit values of the bits of the underlying bit sequence specified for each parity bit of the linear block code. Such a linear block code may, for example, be a Hamming parity code, in which a plurality of parity bits are calculated from each of a different combination of bits of the underlying bit sequence, whereby commands can no longer be recognized, but erroneous bits can also be corrected.

Bei der Berechnung eines klassischen Hamming-Paritätscodes für eine 32-Bit-Bitsequenz werden zunächst insgesamt 6 Paritätsbits benötigt, die sich jeweils aus unterschiedlichen Bits der 32-Bit-Bitsequenz berechnen lassen. Wie in der nachstehenden Tabelle gezeigt, wird die 32-Bit-Bitsequenz d0 bis d31 um zusätzliche 6 Paritätsbits an entsprechenden Stellen erweitert:

Figure DE102013112021B4_0007
Figure DE102013112021B4_0008
When calculating a classical Hamming parity code for a 32-bit bit sequence, a total of 6 parity bits are needed, each of which can be calculated from different bits of the 32-bit bit sequence. As shown in the table below, the 32-bit bit sequence d 0 to d 31 is extended by an additional 6 parity bits at appropriate locations:
Figure DE102013112021B4_0007
Figure DE102013112021B4_0008

Die Paritätsbits p1 bis p6 des Hamming-Paritätscodes werden dann wie folgt berechnet: c1 = p1 = c3 ⊕ c5 ⊕ c7 ⊕ c9 ⊕ c11 ⊕ c13 ⊕ c15 ⊕ c17 ⊕ c19 ⊕ c21 ⊕ c23 ⊕ c25 ⊕ c27 ⊕ c29 ⊕ c31 ⊕ c33 ⊕ c35 ⊕ c37 c2 = p2 = c3 ⊕ c6 ⊕ c7 ⊕ c10 ⊕ c11 ⊕ c14 ⊕ c15 ⊕ c18 ⊕ c19 ⊕ c22 ⊕ c23 ⊕ c26 ⊕ c27 ⊕ c30 ⊕ c31 ⊕ c34 ⊕ c35 ⊕ c38 c4 = p3 = c5 ⊕ c6 ⊕ c7 ⊕ c12 ⊕ c13 ⊕ c14 ⊕ c15 ⊕ c20 ⊕ c21 ⊕ c22 ⊕ c23 ⊕ c28 ⊕ c29 ⊕ c30 ⊕ c31 ⊕ c36 ⊕ c37 ⊕ c38 c8 = p4 = c9 ⊕ c10 ⊕ c11 ⊕ c12 ⊕ c13 ⊕ c14 ⊕ c15 ⊕ c24 ⊕ c25 ⊕ c26 ⊕ c27 ⊕ c28 ⊕ c29 ⊕ c30 ⊕ c31 c16 = p5 = c17 ⊕ c18 ⊕ c19 ⊕ c20 ⊕ c21 ⊕ c22 ⊕ c23 ⊕ c24 ⊕ c25 ⊕ c26 ⊕ c27 ⊕ c28 ⊕ c29 ⊕ c30 ⊕ c31 c32 = p6 = c33 ⊕ c34 ⊕ c35 ⊕ c36 ⊕ c37 ⊕ c38 (10) The parity bits p 1 to p 6 of the Hamming parity code are then calculated as follows: c 1 = p 1 = c 3 ⊕ c 5 ⊕ c 7 ⊕ c 9 ⊕ c 11 ⊕ c 13 ⊕ c 15 ⊕ c 17 ⊕ c 19 ⊕ c 21 ⊕ c 23 ⊕ c 25 ⊕ c 27 ⊕ c 29 ⊕ c 31 33 c 33 ⊕ c 35 ⊕ c 37 c 2 = p 2 = c 3 ⊕ c 6 ⊕ c 7 ⊕ c 10 ⊕ c 11 ⊕ c 14 ⊕ c 15 ⊕ c 18 ⊕ c 19 ⊕ c 22 ⊕ c 23 ⊕ c 26 ⊕ c 27 ⊕ c 30 ⊕ c 31 ⊕ c 34 ⊕ c 35 ⊕ c 38 c 4 = p 3 = c 5 ⊕ c 6 ⊕ c 7 ⊕ c 12 ⊕ c 13 ⊕ c 14 ⊕ c 15 ⊕ c 20 ⊕ c 21 22 c 22 ⊕ c 23 ⊕ c 28 ⊕ c 29 ⊕ c 30 ⊕ c 31 ⊕ c 36 ⊕ c 37 ⊕ c 38 c 8 = p 4 = c 9 ⊕ c 10 ⊕ c 11 ⊕ c 12 ⊕ c 13 ⊕ c 14 ⊕ c 15 ⊕ c 24 ⊕ c 25 ⊕ c 26 ⊕ c 27 ⊕ c 28 ⊕ c 29 ⊕ c 30 ⊕ c 31 c 16 = p 5 = c 17 ⊕ c 18 ⊕ c 19 ⊕ c 20 ⊕ c 21 ⊕ c 22 23 c 23 ⊕ c 24 ⊕ c 25 ⊕ c 26 ⊕ c 27 ⊕ c 28 ⊕ c 29 ⊕ c 30 ⊕ c 31 c 32 = p 6 = c 33 ⊕ c 34 ⊕ c 35 ⊕ c 36 ⊕ c 37 ⊕ c 38 (10)

Somit kann aus einer 32-Bit-Bitsequenz b0 bis b31 der Hamming-Paritätscode mit den Paritätsbits p1 bis p6 entsprechend dem vorgegebenen Paritätscode-Berechnungsschema berechnet werden. Thus, from a 32-bit bit sequence b 0 to b 31, the Hamming parity code having the parity bits p 1 to p 6 may be calculated according to the predetermined parity code calculation scheme.

In einer anderen Alternative kann das vorgegebene Paritätscode-Berechnungsschema vorsehen, die zugrundeliegende Bitsequenz einer Matrix anzuordnen, indem die Bits der zugrundeliegenden Bitsequenz nacheinander zeilenweise in der Matrix angeordnet werden, wobei für jede Zeile und jede Spalte der Matrix ein Paritätsbit in Abhängigkeit von den Bitwerten der die jeweilige Zeile oder Spalte betreffenden Bits der zugrundeliegenden Bitsequenz berechnet wird. Zur Berechnung des Operanden-Paritätscodes kann somit die Operanden-Bitsequenz b[0...31] in einer Matrix zeilenweise und aufeinanderfolgend angeordnet werden, wie beispielsweise nachfolgend dargestellt:

Figure DE102013112021B4_0009
In another alternative, the predetermined parity-code calculation scheme may provide for arranging the underlying bit sequence of a matrix by sequentially arranging the bits of the underlying bit sequence line-by-line in the matrix, with a parity bit for each row and column of the matrix depending on the bit values of the matrix the respective row or column related bits of the underlying bit sequence is calculated. To calculate the operand parity code can thus the Operand bit sequence b [0 ... 31] are arranged in a matrix line by line and consecutively, as shown below, for example:
Figure DE102013112021B4_0009

Anschließend wird für jede Zeile und jede Spalte die Parität berechnet. Die Paritätsbits für die Zeilen ergeben sich dabei in diesem Beispiel wie folgt: pr[0] = b[0] ⊕ b[1] ⊕ b[2] ⊕ b[3] ⊕ b[4] ⊕ b[5] ⊕ b[6] ⊕ b[7] pr[1] = b[8] ⊕ b[9] ⊕ b[10] ⊕ b[11] ⊕ b[12] ⊕ b[13] ⊕ b[14] ⊕ b[15] pr[2] = b[16] ⊕ b[17] ⊕ b[18] ⊕ b[19] ⊕ b[20] ⊕ b[21] ⊕ b[22] ⊕ b[23] pr[3] = b[24] ⊕ b[25] ⊕ b[26] ⊕ b[27] ⊕ b[28] ⊕ b[29] ⊕ b[39] ⊕ b[31] (12) Then parity is calculated for each row and each column. The parity bits for the rows in this example are as follows: pr [0] = b [0] ⊕ b [1] ⊕ b [2] ⊕ b [3] ⊕ b [4] ⊕ b [5] ⊕ b [6] ⊕ b [7] pr [1] = b [8] ⊕ b [9] ⊕ b [10] ⊕ b [11] ⊕ b [12] ⊕ b [13] ⊕ b [14] ⊕ b [15] pr [2] = b [16] ⊕ b [ 17] ⊕ b [18] ⊕ b [19] ⊕ b [20] ⊕ b [21] ⊕ b [22] ⊕ b [23] pr [3] = b [24] ⊕ b [25] ⊕ b [26 ] ⊕ b [27] ⊕ b [28] ⊕ b [29] ⊕ b [39] ⊕ b [31] (12)

Wobei sich für die Spalten die Paritätsbits des Paritätscodes wie folgt ergeben: pc[0] = b[0] ⊕ b[8] ⊕ b[16] ⊕ b[24]; pc[1] = b[1] ⊕ b[9] ⊕ b[17] ⊕ b[25]; pc[2] = b[2] ⊕ b[10] ⊕ b[18] ⊕ b[26]; pc[3] = b[3] ⊕ b[11] ⊕ b[19] ⊕ b[27]; pc[4] = b[4] ⊕ b[12] ⊕ b[20] ⊕ b[28] pc[5] = b[5] ⊕ b[13] ⊕ b[21] ⊕ b[29]; pc[6] = b[6] ⊕ b[14] ⊕ b[22] ⊕ b[30]; pc[7] = b[7] ⊕ b[15] ⊕ b[23] ⊕ b[31]; (13) Where the parity bits of the parity code for the columns are as follows: pc [0] = b [0] ⊕b [8] ⊕b [16] ⊕b [24]; pc [1] = b [1] ⊕ b [9] ⊕ b [17] ⊕ b [25]; pc [2] = b [2] ⊕b [10] ⊕b [18] ⊕b [26]; pc [3] = b [3] ⊕b [11] ⊕b [19] ⊕b [27]; pc [4] = b [4] ⊕b [12] ⊕b [20] ⊕b [28] pc [5] = b [5] ⊕b [13] ⊕b [21] ⊕b [29]; pc [6] = b [6] ⊕ b [14] ⊕ b [22] ⊕ b [30]; pc [7] = b [7] ⊕b [15] ⊕b [23] ⊕b [31]; (13)

Die Paritätsbits der Spalten sowie die Paritätsbits der Zeilen der Matrix ergeben dann das Paritätscode-Berechnungsschema zur Berechnung des Paritätscodes. The parity bits of the columns as well as the parity bits of the rows of the matrix then give the parity code calculation scheme for calculating the parity code.

Der Übertragscode kann als Bitsequenz mit gleicher Länge wie die Operanden-Bitsequenzen vorliegen, wobei an jeder Bitposition innerhalb des Übertragscodes durch den Bitwert festgelegt wird, ob an dieser Bitposition bei der Durchführung der arithmetischen Rechenoperation ein Übertrag zu berücksichtigen ist oder nicht. Wird dies durch ein sogenanntes Borrow Carry Flag angezeigt, so ist der Bitwert logisch 1, wenn ein solcher Übertrag zu berücksichtigen ist, sonst logisch 0. Dabei ist das jeweilige Carry Flag an der entsprechenden Bitposition innerhalb des Übertragscodes bei der Durchführung der arithmetischen Rechenoperation an der jeweiligen Bitposition zu berücksichtigen und ergibt sich aus den Bitwerten der vorhergehenden Bitposition der Operanden-Bitsequenz und des Carry Flags. Durch diese Definition des Übertragscodes lässt sich somit ein Übertrag aus einer vorhergehenden Rechenoperation an der ersten Bitposition mit berücksichtigen. Ein Äquivalent hierzu stellt der Übertragscode aus mehreren Bitsequenzen dar, wobei jede Bitsequenz eine Bitposition repräsentiert und das Carry Flag somit nicht die Form eines einzelnen Bits an der jeweiligen Bitposition definiert wird, sondern insgesamt durch eine Dezimalzahl in Form einer Zweierpotenz repräsentierend die jeweilige Bitposition, für die die Bitsequenz steht. In dieser mathematisch äquivalenten Form lässt sich dann der Korrektur-Paritätscode so berechnen, indem entweder alle Bitsequenzen des Übertragscodes XOR verknüpft werden und anschließend auf dieses Ergebnis das vorgegebene Paritätscode-Berechnungsschema angewendet wird, um den Korrektur-Paritätscode zu erhalten oder indem für jede einzelne Bitsequenz des Übertragscodes das Paritätscode-Berechnungsschema angewendet wird, so dass für jede Bitsequenz ein Teil-Korrektur-Paritätscode erhalten wird, wobei der Korrektur-Paritätscode dann durch XOR-Verknüpfung aller Teil-Korrektur-Paritätscodes errechnet wird. The carry code can be present as a bit sequence with the same length as the operand bit sequences, wherein at each bit position within the carry code is determined by the bit value, whether or not a carry is to be considered at this bit position in the execution of the arithmetic operation. If this is indicated by a so-called Borrow Carry Flag, then the bit value is logical 1, if such a carry is to be considered, otherwise logical 0. Here, the respective Carry Flag at the corresponding bit position within the carry code in performing the arithmetic operation on the respective bit position and results from the bit values of the preceding bit position of the operand bit sequence and the carry flag. This definition of the carry code thus makes it possible to take into account a carry from a preceding arithmetic operation at the first bit position. An equivalent to this is the carry code of a plurality of bit sequences, each bit sequence representing a bit position and the carry flag is thus not defined in the form of a single bit at the respective bit position, but in total by a decimal number in the form of a power of two representing the respective bit position, for which is the bit sequence. In this mathematically equivalent form, the correction parity code can then be computed by either combining all the bit sequences of the carry code XOR and then applying the predetermined parity code calculation scheme to this result to obtain the correction parity code or for each individual bit sequence of the carry code, the parity code calculation scheme is applied so that a partial correction parity code is obtained for each bit sequence, the correction parity code then being calculated by XORing all the partial correction parity codes.

Mit dem vorliegenden Verfahren wird es somit möglich, jedwede Rechenoperation, die auf zwei beliebige binäre Operanden angewendet wird, hinsichtlich ihrer Korrektheit zu überprüfen. Dies hat allerdings zur Folge, dass die benötigte Hardware und die für die Operation durchzuführenden Kosten vergleichsweise relativ hoch sind, wobei gegenüber einer redundanten Ausführung es wünschenswert ist, mehr Hardware einzusparen. Es hat sich gezeigt, dass die Größe zu über 90 % durch den Carry Look-Ahead Generator, der den Übertragscode generiert, bestimmt wird. Thus, with the present method, it becomes possible to check for correctness any arithmetic operation applied to any two binary operands. However, this has the consequence that the required hardware and the costs to be performed for the operation comparatively are relatively high, and over a redundant design, it is desirable to save more hardware. It has been shown that over 90% of the size is determined by the carry look-ahead generator that generates the carry code.

In einer vorteilhaften Ausführungsform wird somit eine verbesserte Möglichkeit angegeben, den Übertragscode für eine bestimmte Anzahl von Fällen zu ermitteln, wobei dann zwar nicht mehr alle durchzuführenden Rechenoperationen mit beliebigen Operanden überprüft werden, sondern nur noch jene, bei denen sich der Übertragscode gemäß den vereinfachten Berechnungsregeln ermitteln lässt. Hierfür wird mit Hilfe eines Tests überprüft, ob die Bitwerte der Operanden-Bitsequenzen in die Gruppe dieser Fälle zur vereinfachten Berechnung des Übertragscodes fallen, wobei bei einer positiven Feststellung dann der Übertragscode durch die vereinfachte Berechnung ermittelt wird und das Verfahren dann entsprechend ausgeführt wird. Entsprechen die Operanden-Bitsequenzen dieser Feststellung nicht, so wird das Verfahren nicht ausgeführt. In an advantageous embodiment, an improved possibility is thus given of determining the transfer code for a specific number of cases, in which case not all the arithmetic operations to be performed are checked with arbitrary operands, but only those in which the transfer code conforms to the simplified calculation rules can be determined. For this purpose, it is checked by means of a test whether the bit values of the operand bit sequences fall into the group of these cases for the simplified calculation of the carry code, wherein in the case of a positive determination the carry code is determined by the simplified calculation and the method is then carried out accordingly. If the operand bit sequences do not match this determination, then the method is not executed.

Ein solcher Build-In self-Test auf arithmetisch/logischem Gebiet ist eine ideale Beobachtungsplattform, um die gewünschte Funktionalität ständig zu monitoren, ohne in den Programmfluss eingreifen zu müssen oder, im Falle der eingelagerten Testdaten mit der Möglichkeit einer nur minimalen Störung/Beeinflussung des Programmablaufs. So kann beispielsweise mit Hilfe vorgegebener Testparameter in Form von gültigen Operanden-Bitsequenzen die Funktionalität der Hardware insbesondere bei geringer Hardwareauslastung ständig oder sporadisch überprüft werden, wodurch sich insbesondere konstante Hardwarefehler (beispielsweise STUCK-AT Fehler) auffinden lassen. Such an arithmetic / logic build-in self-test is an ideal observation platform for constantly monitoring the desired functionality without having to interfere with the program flow or, in the case of stored test data, with the possibility of only minimal disruption / interference of the test program flow. Thus, for example, with the aid of predetermined test parameters in the form of valid operand bit sequences, the functionality of the hardware can be constantly or sporadically checked, especially with low hardware utilization, whereby in particular constant hardware errors (for example STUCK-AT errors) can be found.

Hierfür wird nun vorgeschlagen, dass zunächst ein Übertrags-Generierungscode (bcg) und ein Übertrags-Propagierungscode (bcp) berechnet wird, sowie dies bereits anfänglich beschrieben wurde. Der Übertrags-Generierungscode wird dabei derart berechnet, indem für jede Bitposition bezüglich der bitweisen arithmetischen Rechenoperation festgestellt wird, ob ausgehend von den Bitwerten an der jeweiligen vorhergehenden Bitposition der ersten Operanden-Bitsequenz und der zweiten Operanden-Bitsequenz ein Übertrag für die jeweilige Bitposition erzeugt wird oder nicht. Daneben wird ein Übertrags-Propagierungscode berechnet, in dem für jede Bitposition bezüglich der bitweisen arithmetischen Rechenoperation festgestellt wird, ob ausgehend von den Bitwerten an der jeweiligen Bitposition der Operanden-Bitsequenzen ein an dieser Bitposition zu berücksichtigender Übertrag auf die nächst folgende Bitposition weitergetragen bzw. weitergeleitet wird oder nicht. Für die Subtraktion ergibt sich somit für die Berechnung des Übertrags-Generierungscodes (Borrow Carry Generate Feld) und des Übertrags-Propagierungscodes (Borrow Carry Propagate Feld) folgendes Berechnungsschema: bcg0 = bcin bcgn = not xn-1·yn-1 bcpn = not xn + y (14) wobei bcg das Borrow Carry Generate Feld und bcp das Borrow Carry Propagate Feld bezeichnet. For this purpose, it is now proposed that a carry generation code (bcg) and a carry propagation code (bcp) are first calculated, as already described initially. The carry generation code is calculated in such a way by determining, for each bit position relative to the bitwise arithmetic operation, whether a carry for the respective bit position is generated starting from the bit values at the respective preceding bit position of the first operand bit sequence and the second operand bit sequence or not. In addition, a carry propagation code is calculated, in which for each bit position with respect to the bitwise arithmetic arithmetic operation it is determined whether, based on the bit values at the respective bit position of the operand bit sequences, a carry to be taken into account at this bit position is carried forward to the next following bit position will or not. For the subtraction, the following calculation scheme thus results for the calculation of the carry-over generation code (Borrow Carry Generate field) and the carry-propagation code (Borrow Carry Propagate field): bcg 0 = bc in bcg n = not x n-1 · y n-1 BCP n = not x n + y (14) where bcg denotes the Borrow Carry Generate field and bcp the Borrow Carry Propagate field.

Das Borrow Carry Generate Feld (bcg) ist dabei gegenüber der ursprünglichen Definition um ein Bit nach links verschoben und zeigt somit nicht mehr an, dass der Übertrag an der aktuellen Bitposition erzeugt wird, sondern dass er an der vorhergehenden Bitposition erzeugt wurde und an der aktuellen Bitposition zu berücksichtigen ist. Dies macht die Auswertung etwas einfacher und lässt sogleich eine Integration eines Eingangsübertrags bcin zu. The Borrow Carry Generate field (bcg) is shifted one bit to the left compared to the original definition and thus no longer indicates that the carry is generated at the current bit position, but that it was generated at the previous bit position and at the current one Bit position is to be considered. This makes the evaluation a little easier and immediately allows an integration of an input carry bc in .

In Abhängigkeit von dem Übertrags-Generierungscode und dem Übertrags-Propagierungscode wird nun festgestellt, ob bei der bitweisen arithmetischen Rechenoperation eine vorgegebene Anzahl von bitweise aufeinander folgenden Überträgen, die es bei der Rechenoperation zu berücksichtigen gilt, nicht überschritten wird. Dabei wurde erkannt, dass sich aus dem Übertrags-Generierungscode und die Übertrags-Propagierungscode der Übertragscode mit wenig Aufwand ableiten lässt, wenn eine vorgegebene Anzahl von bitweise aufeinander folgenden Überträgen bei der arithmetischen Rechenoperation nicht überschritten wird. Sowohl das Erkennen, dass eine vorgegebene Anzahl von Überträgen nicht überschritten wird, als auch das Ermitteln des eigentlichen Übertragscodes, der die einzelnen Überträge angibt, lässt sich vereinfacht aus dem Übertrags-Generierungscode und dem Übertrags-Propagierungscode berechnen. Dabei ist nicht gemeint, dass nur einmal eine solche Sequenz von Überträgen mit dieser Anzahl existiert. Depending on the carry generation code and the carry propagation code, a determination is then made as to whether the bitwise arithmetic operation does not exceed a predetermined number of bitwise successive carry-over items to be considered in the arithmetic operation. In this case, it was recognized that the carry code can be derived from the carry generation code and the carry propagation code with little effort if a predefined number of bitwise successive carry-overs is not exceeded in the arithmetic operation. Both the recognition that a predetermined number of carry-overs is not exceeded and the determination of the actual carry-code, which indicates the individual carry-overs, can be calculated in a simplified manner from the carry-generating code and the carry-propagation code. It does not mean that only one such sequence of carries with this number exists.

So kann beispielsweise in einem ganz einfach gelagerten Fall die Anzahl der vorgegebenen Überträge 0 sein, was bedeutet, dass bei der arithmetischen Rechenoperation keine Überträge zu berücksichtigen sind. In diesem Falle wäre der Übertrags-Generierungscode 0, was sich beispielsweise mittels des folgenden Tests erprüfen lässt:

Figure DE102013112021B4_0010
mit bcg als das Borrow Carry Generate Bitfeld (Übertrags-Generierungscode). For example, in a very simple case, the number of predetermined carries may be 0, which means that no carry over is to be considered in the arithmetic operation. In this case, the carry generation code would be 0, which can be tested by, for example, the following test:
Figure DE102013112021B4_0010
with bcg as the Borrow Carry Generate bit field (carry generation code).

In diesem Fall ist der Übertragungscode gleich dem Übertrags-Generierungscode. In this case, the transmission code is equal to the carry generation code.

Vorteilhaft ist es auch, wenn überprüft wird, ob die Anzahl der bitweise aufeinander folgenden Überträge 1 nicht überschreitet, d.h. dass in dem Übertragscode, wenn er denn auf herkömmliche Weise berechnet werden würde, die Anzahl der benachbarten Überträge maximal 1 ist, was nicht bedeutet, dass nur ein einziger Übertrag zu berücksichtigen ist. Vielmehr existieren keine Überträge, deren vorhergehende oder nachfolgende Bitposition ebenfalls einen Übertrag aufweisen. In diesem Fall ist eine UND-Verknüpfung des Übertrags-Generierungscodes und des Übertrags-Propagierungscodes 0, was mit der nachstehenden Formel geprüft werden kann.

Figure DE102013112021B4_0011
It is also advantageous if it is checked whether the number of bitwise consecutive carry-overs does not exceed 1, ie that in the carry code, if it were calculated conventionally, the number of adjacent carries is a maximum of 1, which does not mean that only a single carryover has to be considered. Rather, there are no carries whose previous or subsequent bit position also have a carry. In this case, an AND of the carry generation code and the carry propagation code is 0, which can be checked by the following formula.
Figure DE102013112021B4_0011

Das Kriterium für den Fall ist dann erfüllt, wenn der in einer Spalte entstehende Übertrag in der nächsten bereits wieder gelöscht wird, was durch die oben genannte Bedingung ausgedrückt werden kann. In diesem Fall ist der Übertragscode ebenfalls identisch mit dem Übertrags-Generierungscode bcg (Borrow Carry Generate). The criterion for the case is fulfilled when the carry in one column is already deleted in the next one, which can be expressed by the above-mentioned condition. In this case, the carry code is also identical to the carry generation code bcg (Borrow Carry Generate).

In einer weiteren vorteilhaften Ausführungsform hierzu kann überprüft werden, ob die vorgegebene Anzahl von maximal zwei Überträgen, die aufeinander folgen, in dem Übertragscode vorliegen wird oder nicht. Hierfür muss bei der Auswertung des Übertrags-Generierungscodes und des Übertrags-Propagierungscodes nicht nur der Fall abgedeckt werden, dass aufgrund der Bitwerte in den Operanden-Bitsequenzen zwei Überträge an zwei benachbarten Positionen direkt erzeugt werden, sondern dass ein generierter Übertrag auf die nächste Bitposition weitergeleitet wird, wobei er dann anschließend an der darauf folgenden Bitposition eliminiert wird. In a further advantageous embodiment, it is possible to check whether or not the predetermined number of maximally two carry-over events that follow one another will be present in the carry code. For this, in the evaluation of the carry generation code and the carry propagation code, not only the case must be covered that due to the bit values in the operand bit sequences, two carries are directly generated at two adjacent positions, but a generated carry is forwarded to the next bit position which is then eliminated at the subsequent bit position.

Es wurde erkannt, dass dies mit der Formel

Figure DE102013112021B4_0012
überprüft werden kann, wobei sich dann das BC-Feld aus der folgenden Formel ergibt bc = (bcg + (bcg << 1))·(bcp << 1). (18) It was recognized that this with the formula
Figure DE102013112021B4_0012
can be checked, in which case the BC field results from the following formula bc = (bcg + (bcg << 1)) · (bcp << 1). (18)

Die Operation << bezeichnet dabei eine Shiftoperation um die dahinter angegebene Anzahl von Bitpositionen nach links, während die Operation >> eine Bitshiftoperation und die dahinter angegebene Anzahl von Bits nach rechts angibt. The operation << denotes a shift operation around the number of bit positions specified behind it to the left, while the operation >> specifies a bit shift operation and the number of bits specified behind it to the right.

Da dies bei diesem Fall vergleichsweise recht häufig vorkommt, kann so die arithmetische Rechenoperation der beiden Operanden-Bitsequenzen überprüft werden, wenn der entsprechende Test gültig ist und somit maximal zwei Überträge existieren. Since this occurs quite frequently in this case, the arithmetic operation of the two operand bit sequences can be checked, if the corresponding test is valid and thus a maximum of two carries exist.

Dieses Prinzip lässt sich auch auf die Länge von drei aufeinander folgenden Überträgen, die zu berücksichtigen sind, durch die Formel

Figure DE102013112021B4_0013
erweitern, wobei der Übertragscode sich dann aus bc = (bcg + (bcg << 1) + (bcg << 2))·((bcp << 1) + (bcp << 2)) (20) ergibt. This principle can also be extended to the length of three consecutive carries, which must be taken into account by the formula
Figure DE102013112021B4_0013
expand, where the transfer code is then off bc = (bcg + (bcg << 1) + (bcg << 2)) · ((bcp << 1) + (bcp << 2)) (20) results.

Dabei wird letztendlich immer überprüft, ob zunächst an einer Bitposition ein Übertrag erstmalig erzeugt wird, was bedeutet, dass an der vorherigen Bitposition kein Übertrag zu berücksichtigen ist, und ob ein so erzeugter Übertrag auf die nächste Bitposition weitergetragen oder an der nächst folgenden Bitposition erneut erzeugt wird, und zwar solange, bis die vorgegebene Anzahl von maximal aufeinander folgenden Überträgen erreicht ist, wobei dann an der darauf folgenden Bitposition der zuletzt vorliegende Übertrag eliminiert werden muss. In the process, it is always checked whether a carry is first generated at a bit position, which means that no carry has to be taken into account at the previous bit position, and whether a carry thus generated is carried forward to the next bit position or recreated at the next following bit position is, until the predetermined number of maximum successive carries is reached, in which case the last present carry must be eliminated at the following bit position.

Hierdurch lassen sich beliebige Anzahlen von aufeinander folgenden Überträgen berücksichtigen, wobei eine derartige Feststellung dann dazu führt, dass der Übertragscode aus dem Übertrags-Generierungscode und dem Übertrags-Propagierungscode berechnet wird. This allows any number of successive carry-overs to be taken into account, such determination then resulting in the carry code being calculated from the carry-generate code and the carry-propagate code.

In einer weiteren vorteilhaften Ausführungsform werden zunächst auf Basis der beiden Operanden-Bitsequenzen wieder der Übertrags-Generierungscode und der Übertrags-Propagierungscode berechnet. Anschließend werden die Operanden-Bitsequenzen in eine Mehrzahl von Teilsequenzen unterteilt, vorzugsweise derart, dass die Anzahl der Teilbereiche ein Teiler der Länge der Bitsequenz ist. Daraufhin wird nun das vereinfachte Verfahren zur Berechung des Übertragscodes, wie vorstehend beschrieben, für jede Teilsequenz separat angewendet, und zwar auf Basis der für die jeweilige Teilsequenz entsprechenden Bitwerte des Übertrags-Generierungscodes und Übertrags-Propagierungscodes. Als Ergebnis erhält man für jede Teilsequenz einen separaten Teil-Übertragscode, wobei der vollständige Übertragscode sich aus der Zusammenführung der einzelnen Teil-Übertragscodes ergibt. In a further advantageous embodiment, first the carry generation code and the carry propagation code are calculated on the basis of the two operand bit sequences. Subsequently, the operand bit sequences are subdivided into a plurality of subsequences, preferably such that the number of subregions is a divisor of the length of the bit sequence. Then, the simplified method for calculating the carry code as described above is separately applied to each subsequence based on the bit values of the carry generation code and carry propagation code corresponding to the respective subsequence. As a result, a separate partial carry code is obtained for each partial sequence, the complete carry code resulting from the combination of the individual partial carry codes.

Hierdurch wird es möglich, auch Rechenoperationen zu überprüfen, bei denen die vorgegebene Anzahl von zusammenhängenden Überträgen nicht überschritten wird, jedoch die Anzahl der zusammenhängenden Überträge unterschiedlich ist. Hierdurch kann die Trefferwahrscheinlichkeit signifikant erhöht werden, ohne den Hardwareaufwand drastisch zu erhöhen. This makes it possible to also check arithmetic operations in which the predetermined number of contiguous carry-over is not exceeded, but the number of related carries is different. As a result, the hit probability can be significantly increased without drastically increasing the hardware expenditure.

In einer weiteren vorteilhaften Ausführungsform, deren Fall statistisch jedoch relativ selten vorkommt, wird überprüft, ob die beiden Operanden-Bitsequenzen derartige Bitwerte aufweisen, so dass ein einmal erzeugter Übertrag bis zur letzten Bitposition weitergereicht wird. Dies kann mit der nachstehenden Formel überprüft werden:

Figure DE102013112021B4_0014
In a further advantageous embodiment, the case of which, however, is statistically relatively rare, it is checked whether the two operand bit sequences have such bit values, so that a carry once generated is forwarded to the last bit position. This can be verified by the following formula:
Figure DE102013112021B4_0014

Der Übertrag an einer bestimmten Bitposition n ergibt sich dann aus der folgenden Formel:

Figure DE102013112021B4_0015
The carry at a certain bit position n then results from the following formula:
Figure DE102013112021B4_0015

Zweckmäßigerweise wird für jedes Paritätsbit des Paritätscode-Berechnungsschemas aus dem jeweiligen Paritätsbit des Vorausberechnungs-Paritätscodes und des Ergebnis-Paritätscodes ein Fehlersyndrom in Abhängigkeit von den jeweiligen Bitwerten der Paritätsbits berechnet, wobei ein Bitfehler dann erkannt wird, wenn zumindest eines der Fehlersyndrome eine Fehlererkennung enthält. Hierzu kann das jeweilige Fehlersyndrom eine Fehlererkennung aufweisen, die angibt, ob ein Fehler vorliegt oder nicht und ggf. was für ein Fehler vorliegt. Wie für die Ermittlung der Syndrome die XOR-Operation verwendet, so liegt ein Bitfehler immer dann vor, wenn zumindest eines der Syndrome die Parität des Paritätscodes ungleich logisch 0 ist. Bei dem linearen Code ist ein Syndrom definiert als eine Operation eines empfangenen, ggf. ungültigen Codeworts am Empfänger mit einer Kontrollmatrix, wobei der einfachste Fall einer Syndromoperation die XOR-Operation ist. Conveniently, for each parity bit of the parity code calculation scheme, an error syndrome is calculated from the respective parity bit of the pre-calculation parity code and the result parity code in accordance with the respective bit values of the parity bits, wherein a bit error is detected when at least one of the error syndromes includes error detection. For this purpose, the respective error syndrome can have an error detection which indicates whether or not there is an error and, if appropriate, what kind of error exists. As for the determination of the syndromes uses the XOR operation, a bit error is always present when at least one of the syndromes, the parity of the parity code is not equal to logic 0. In the linear code, a syndrome is defined as an operation of a received, possibly invalid code word at the receiver with a control matrix, the simplest case of a syndrome operation being the XOR operation.

Die Aufgabe wird im Übrigen auch mit einem Computersystem gemäß Anspruch 11 gelöst, wobei das Computersystem eingerichtet ist, mittels eines Mikroprozessors das vorstehend beschriebene Verfahren durchzuführen. Die Aufgabe wird im Übrigen auch mit einer Halbleiterschaltung gemäß Anspruch 12 sowie an dem Computersystem gemäß Anspruch 13 erfindungsgemäß gelöst, wobei sowohl die Halbleiterschaltung als auch das Computersystem zur Durchführung des vorstehend genannten Verfahrens eingerichtet ist. Incidentally, the object is also achieved with a computer system according to claim 11, wherein the computer system is set up to carry out the method described above by means of a microprocessor. The object is also solved according to the invention with a semiconductor circuit according to claim 12 and to the computer system according to claim 13, wherein both the semiconductor circuit and the computer system for implementing the aforementioned method is set up.

Die Erfindung wird anhand der beigefügten Zeichnung beispielhaft erläutert. Es zeigt: The invention will be explained by way of example with reference to the accompanying drawing. It shows:

1 – Schematische Darstellung der Einbettung der vorliegenden Erfindung im Bereich der schematischen Rechenoperationen 1 - Schematic representation of the embedding of the present invention in the field of schematic arithmetic operations

1 zeigt schematisch die Einbettung der vorliegenden Erfindung im Bereich der schematischen Rechenoperation eines Computersystems, insbesondere eines Mikroprozessors bzw. einer Halbleiterschaltung. Kernstück ist die sogenannte ALU (Arithmetic Logic Unit), die als Eingang zwei Operanden OP1 und OP2 als Bitsequenz erhält und hieraus je nach zugrunde gelegter arithmetischer Rechenoperation ein Ergebnis in Form einer Bitsequenz R berechnet. 1 schematically shows the embedding of the present invention in the field of the schematic arithmetic operation of a computer system, in particular a microprocessor or a semiconductor circuit. The core element is the so-called ALU (Arithmetic Logic Unit), which receives as input two operands OP1 and OP2 as a bit sequence and calculates therefrom a result in the form of a bit sequence R depending on the arithmetic arithmetic operation.

Um nun bei einer derartigen arithmetischen Rechenoperation Bitfehler bei der Berechnung in der ALU feststellen zu können, wird parallel zu der ALU eine Paritäts-Vorausberechnungsbaugruppe 1 vorgesehen, die als Eingang die beiden Operanden OP1 und OP2 der ALU erhält. Die Paritäts-Vorausberechnungsbaugruppe 1 berechnet nun gemäß dem vorliegenden erfindungsgemäßen Verfahren den entsprechenden Vorausberechnungs-Paritätscode mit seinen entsprechenden Paritäten und liefert diese als Eingang an eine Bitfehler-Erkennungsbaugruppe 2. Die Bitfehler-Erkennungsbaugruppe 2 erhält als zweiten Eingang das Berechnungsergebnis der ALU, nämlich die Ergebnis-Bitsequenz R[0...n]. In order to be able to detect bit errors in the calculation in the ALU in such an arithmetic arithmetic operation, a parity preprocessing module is set up in parallel with the ALU 1 is provided, which receives as input the two operands OP1 and OP2 of the ALU. The Parity Predictive Assembly 1 Now, according to the present inventive method, calculates the corresponding precomputation parity code with its corresponding parities and provides them as input to a bit error detection module 2 , The bit error detection module 2 receives as the second input the calculation result of the ALU, namely the result bit sequence R [0 ... n].

Die Bitfehler-Erkennungsbaugruppe 2 berechnet nun die Ergebnis-Paritäten des Paritätscodes aus der Ergebnis-Bitsequenz R, die es von der ALU erhalten hat, und vergleicht diese Ergebnis-Paritäten mit dem Vorausberechnungs-Paritäten der Pariäts-Vorausberechnungsbaugruppe 1. The bit error detection module 2 Now calculates the result parities of the parity code from the result bit sequence R received from the ALU and compares these result parities to the parity preprocessing preprocessing parity 1 ,

Die Bitfehler-Erkennungsbaugruppe 2 kann je nach Fehlertyp, beispielsweise einen Bitfehler, zwei Bitfehler oder mehr Bitfehler, einen entsprechenden Errorcode ausgeben, der dann beispielsweise über eine Exeption im Programmablauf des übergeordneten Computerprogramms abgefangen werden kann. The bit error detection module 2 Depending on the type of error, for example a bit error, two bit errors or more bit errors, a corresponding error code can be output, which can then be intercepted, for example, via an option in the program sequence of the superordinate computer program.

Anhand eines Ausführungsbeispiels im Bezug auf den Hamming-Paritätscode als Paritätscode-Berechnungsschema soll die vorliegende Erfindung kurz erläutert werden. Als Grundlage werden die Operanden als Bitsequenz mit vorgegebener Länge bereitgestellt. In diesem Ausführungsbeispiel seien die beiden Operanden OP1 und OP2 jeweils 32-Bit-Bitsequenzen. With reference to an embodiment relating to the Hamming parity code as a parity code calculation scheme, the present invention will be briefly explained. As a basis, the operands are provided as a bit sequence of predetermined length. In this embodiment, the two operands OP1 and OP2 are each 32-bit bit sequences.

Gemäß dem Paritätscode-Berechnungsschema für den Hamming-Paritätscode, so wie er in Formel (10) angegeben ist, werden nun die Paritätsbits p[0]...p[6] für den Operanden OP1 und Operanden OP2 berechnet. Die Paritätsbits p[0] bis p[5] sind dabei die eigentlichen Hamming-Paritätsbits, während p[6] als Erweiterung um die gerade Parität über alle Bits zu sehen ist. Der erste Operanden-Paritätscode Pop1 sowie der zweite Operanden-Paritätscode Pop2 ergeben sich somit wie folgt: Pop1 = Pop1[0]...Pop1[6] Pop2 = Pop2[0]...Pop2[6] (23) According to the parity code calculation scheme for the Hamming parity code, as indicated in formula (10), the parity bits p [0]... P [6] are now calculated for the operand OP1 and operand OP2. The parity bits p [0] to p [5] are the actual Hamming parity bits, while p [6] can be seen as an extension around the even parity over all bits. The first operand parity code P op1 and the second operand parity code P op2 thus result as follows: P op1 = P op1 [0] ... P op1 [6] P op2 = P op2 [0] ... P op2 [6] (23)

Anschließend wird der Übertragscode BC berechnet, der angibt, an welcher Bitposition ein Übertrag berücksichtigt werden muss. Im einfachsten Fall handelt es sich dabei um eine Bitsequenz mit der gleichen Länge wie die Operanden, wobei an der jeweiligen Bitposition in dem Übertragscode dann durch den entsprechenden Bitwert festgelegt wird, ob ein Übertrag bei dieser Bitposition berücksichtigt werden muss oder nicht. Subsequently, the carry code BC is calculated, which indicates at which bit position a carry must be taken into account. In the simplest case, this is a bit sequence with the same length as the operands, wherein at the respective bit position in the carry code is then determined by the corresponding bit value, whether a carry must be considered in this bit position or not.

Aus diesem Übertragscode lässt sich nun gemäß dem Paritätscode-Berechnungsschema, vorliegend der Hamming-Code, ein Korrektur-Paritätscode Pbc berechnen, um so die Paritätsbits des Paritätscodes vorauszuberechnen. Hierfür wird gemäß der nachstehenden Formel das Paritätscode-Berechnungsschema auf den Übertragscode angewendet. Pbc[0] = bc[0] ⊕ bc[1] ⊕ bc[3] ⊕ bc[4] ⊕ bc[6] ⊕ bc[8] ⊕ bc[10] ⊕ bc[11] ⊕ bc[13] ⊕ bc[15] ⊕ bc[17] ⊕ bc[19] ⊕ bc[21] ⊕ bc[23] ⊕ bc[25] ⊕ bc[26] ⊕ bc[28] ⊕ bc[30]; Pbc[1] = bc[0] ⊕ bc[2] ⊕ bc[3] ⊕ bc[5] ⊕ bc[6] ⊕ bc[9] ⊕ bc[10] ⊕ bc[12] ⊕ bc[13] ⊕ bc[16] ⊕ bc[17] ⊕ bc[20] ⊕ bc[21] ⊕ bc[24] ⊕ bc[25] ⊕ bc[27] ⊕ bc[28] ⊕ bc[31]; Pbc[2] = bc[1] ⊕ bc[2] ⊕ bc[3] ⊕ bc[7] ⊕ bc[8] ⊕ bc[9] ⊕ bc[10] ⊕ bc[14] ⊕ bc[15] ⊕ bc[16] ⊕ bc[17] ⊕ bc[22] ⊕ bc[23] ⊕ bc[24] ⊕ bc[25] ⊕ bc[29] ⊕ bc[30] ⊕ bc[31]; Pbc[3] = bc[4] ⊕ bc[5] ⊕ bc[6] ⊕ bc[7] ⊕ bc[8] ⊕ bc[9] ⊕ bc[10] ⊕ bc[18] ⊕ bc[19] ⊕ bc[20] ⊕ bc[21] ⊕ bc[22] ⊕ bc[23] ⊕ bc[24] ⊕ bc[25]; Pbc[4] = bc[11] ⊕ bc[12] ⊕ bc[13] ⊕ bc[14] ⊕ bc[15] ⊕ bc[16] ⊕ bc[17] ⊕ bc[18] ⊕ bc[19] ⊕ bc[20] ⊕ bc[21] ⊕ bc[22] ⊕ bc[23] ⊕ bc[24] ⊕ bc[25]; Pbc[5] = bc[26] ⊕ bc[27] ⊕ bc[28] ⊕ bc[29] ⊕ bc[30] ⊕ bc[31]; Pbc[6] = bc[0] ⊕ bc[1] ⊕ bc[2] ⊕ bc[4] ⊕ bc[5] ⊕ bc[7] ⊕ bc[10] ⊕ bc[11] ⊕ bc[12] ⊕ bc[14] ⊕ bc[17] ⊕ bc[21] ⊕ bc[23] ⊕ bc[24] ⊕ bc[26] ⊕ bc[27] ⊕ bc[29]; (24) From this carry code, a correction parity code P bc can now be calculated according to the parity code calculation scheme, in this case the Hamming code, so as to precompute the parity bits of the parity code. For this purpose, the parity code calculation scheme is applied to the carry code according to the following formula. P bc [0] = bc [0] ⊕ bc [1] ⊕ bc [3] ⊕ bc [4] ⊕ bc [6] ⊕ bc [8] ⊕ bc [10] ⊕ bc [11] ⊕ bc [13] ⊕ bc [15] ⊕ bc [17] ⊕ bc [19] ⊕ bc [21] ⊕ bc [23] ⊕ bc [25] ⊕ bc [26] ⊕ bc [28] ⊕ bc [30]; P bc [1] = bc [0] ⊕ bc [2] ⊕ bc [3] ⊕ bc [5] ⊕ bc [6] ⊕ bc [9] ⊕ bc [10] ⊕ bc [12] ⊕ bc [13] ⊕ bc [16] ⊕ bc [17] ⊕ bc [20] ⊕ bc [21] ⊕ bc [24] ⊕ bc [25] ⊕ bc [27] ⊕ bc [28] ⊕ bc [31]; P bc [2] = bc [1] ⊕ bc [2] ⊕ bc [3] ⊕ bc [7] ⊕ bc [8] ⊕ bc [9] ⊕ bc [10] ⊕ bc [14] ⊕ bc [15] ⊕ bc [16] ⊕ bc [17] ⊕ bc [22] ⊕ bc [23] ⊕ bc [24] ⊕ bc [25] ⊕ bc [29] ⊕ bc [30] ⊕ bc [31]; P bc [3] = bc [4] ⊕ bc [5] ⊕ bc [6] ⊕ bc [7] ⊕ bc [8] ⊕ bc [9] ⊕ bc [10] ⊕ bc [18] ⊕ bc [19] ⊕ bc [20] ⊕ bc [21] ⊕ bc [22] ⊕ bc [23] ⊕ bc [24] ⊕ bc [25]; P bc [4] = bc [11] ⊕ bc [12] ⊕ bc [13] ⊕ bc [14] ⊕ bc [15] ⊕ bc [16] ⊕ bc [17] ⊕ bc [18] ⊕ bc [19] ⊕ bc [20] ⊕ bc [21] ⊕ bc [22] ⊕ bc [23] ⊕ bc [24] ⊕ bc [25]; P bc [5] = bc [26] ⊕ bc [27] ⊕ bc [28] ⊕ bc [29] ⊕ bc [30] ⊕ bc [31]; P bc [6] = bc [0] ⊕ bc [1] ⊕ bc [2] ⊕ bc [4] ⊕ bc [5] ⊕ bc [7] ⊕ bc [10] ⊕ bc [11] ⊕ bc [12] ⊕ bc [14] ⊕ bc [17] ⊕ bc [21] ⊕ bc [23] ⊕ bc [24] ⊕ bc [26] ⊕ bc [27] ⊕ bc [29]; (24)

Pbc mit seinen Paritätsbits Pbc[0]...Pbc[6] stellt somit den Korrektur-Paritätscode dar. P bc with its parity bits P bc [0]... P bc [6] thus represents the correction parity code.

Durch die Verknüpfung des ersten Operanden-Paritätscodes Pop1 mit dem zweiten Operanden-Paritätscode Pop2 zusammen mit dem Korrektur-Paritätscode Pbc lässt sich somit das Ergebnis bezüglich des Paritätscodes vorausberechnen, und zwar so, als ob das Paritätscode-Berechnungsschema auf die Ergebnis-Bitsequenz angewendet wird. Die Ergebnis-Bitsequenz erhält man durch Durchführung der zugrunde gelegten arithmetischen Rechenoperation auf die beiden Operanden. Ppre = Pop1 ⊕ Pop2 ⊕ Pbc (25) By combining the first operand parity code P op1 with the second operand parity code P op2 together with the correction parity code P bc , the result with respect to the parity code can thus be predicted in such a way as if the parity code calculation scheme applied to the result code. Bit sequence is applied. The result bit sequence is obtained by performing the underlying arithmetic operation on the two operands. P pre = P op1 ⊕ P op2 ⊕ P bc (25)

Dabei werden die jeweiligen Paritätsbits des Paritätscodes mittels der XOR-Operation verknüpft. Für das Paritätsbit 0 des Hamming-Codes ergibt sich somit folgende Formel: Ppre[0] = Pop1[0] ⊕ Pop2[0] ⊕ Pbc[0] (26) The respective parity bits of the parity code are linked by means of the XOR operation. For the parity bit 0 of the Hamming code, the following formula results: P pre [0] = P op1 [0] ⊕ P op2 [0] ⊕ P bc [0] (26)

Für die weiteren Paritätsbits des Hamming-Codes lässt sich diese Berechnungsvorschrift entsprechend anwenden. For the other parity bits of the Hamming code, this calculation rule can be applied accordingly.

Wird nun der Vorausberechnungs-Paritätscode Ppre zusammen mit dem Ergebnis-Paritätscode Pres verglichen, so kann festgestellt werden, ob ein Fehler in der Rechenoperation vorliegt oder nicht. Den Ergebnis-Paritätscode erhält man wenn auf das Ergebnis der Rechenoperation das Paritätscode-Berechnungsschema angewendet wird und die einzelnen Paritätsbits gemäß der Formel (10) des Hamming-Codes berechnet werden. Now, if the pre-calculation parity code P pre is compared with the result parity code P res , it can be determined whether or not there is an error in the arithmetic operation. The result parity code is obtained when the parity code calculation scheme is applied to the result of the arithmetic operation and the individual parity bits are calculated according to the formula (10) of the Hamming code.

Um aus dem Hamming-Code, der einen Hamming-Abstand von 3 besitzt, einen Code zu generieren, der einen Hamming-Abstand von 4 besitzt und die Detektion von zwei Bitfehlern erlaubt, wird im erweiterten Hamming-Code noch ein weiteres gerades Paritätsbit P[7] über alle Daten und bisherigen Paritäts- bzw. Hamming-Codes hinzugefügt. Dieses zusätzliche Paritätsbit kann auf die XOR-Verknüpfung aller Bits die in ungerader Anzahl vorkommen reduziert werden. Für die Auswertung der Bitfehler folgt nun:

Figure DE102013112021B4_0016
In order to generate from the Hamming code, which has a Hamming distance of 3, a code which has a Hamming distance of 4 and allows the detection of two bit errors, in the extended Hamming code, another even parity bit P [ 7] is added over all data and past parity or Hamming codes. This extra parity bit can be reduced to the XOR of all odd-numbered bits. For the evaluation of the bit errors follows now:
Figure DE102013112021B4_0016

Um nun den Aufwand dieses Verfahrens zu reduzieren, kann der Übertragungscode in Spezialfällen vereinfacht berechnet werden, und zwar dann, wenn beispielsweise die Anzahl der aufeinander folgenden Überträge dem Übertragungscode ein vorgegebene Anzahl nicht übersteigt oder einer entsprechenden vorgegebenen Anzahl entspricht. Mit Hilfe der Formeln (15), (16), (17) und (19) lässt sich feststellen, ob in dem Übertragungscode die Anzahl aufeinander folgender Überträge einen vorgegebenen Wert nicht übersteigt und darüber hinaus konstant ist. Mit der Formel (18) und (20) lässt sich dann unter geringerem Hardwareaufwand der Übertragscode berechnen. Der geringere Hardwareaufwand kommt dabei dadurch zustande, dass das derartige Verfahren gut parallelisierbar ist, da für den Übertrag an einer entsprechenden Bitposition nicht Überträge aus den vorhergehenden Bitpositionen berechnet werden muss. In diesen Spezialfällen kann somit die Rekursivität bei der Berechnung des Übertragscodes durchbrochen werden. In order to reduce the complexity of this method, the transmission code can be calculated in a simplified manner in special cases, specifically if, for example, the number of successive transmissions does not exceed the transmission code a predetermined number or corresponds to a corresponding predetermined number. With the aid of the formulas (15), (16), (17) and (19), it can be determined whether the number of consecutive transfers in the transmission code does not exceed a predetermined value and, moreover, is constant. With the formulas (18) and (20), the carry code can then be calculated with less hardware expenditure. The lower hardware outlay is due to the fact that the method of this type can be easily parallelized since it is not necessary to calculate carry-overs from the preceding bit positions for the transfer to a corresponding bit position. In these special cases, the recursiveness in the calculation of the carry code can thus be broken.

Um das Verfahren auch dann anzuwenden, wenn die Anzahl der zusammenhängenden Überträge nicht konstant ist, dennoch eine gewisse vorgegebene Länge nicht überschreiten, wurde des Weiteren vorgeschlagen, dass die Berechnung segmentiert durchgeführt werden soll. Dieses soll anhand des nachstehenden Beispiels näher erläutert werden:

Figure DE102013112021B4_0017
In order to apply the method even if the number of contiguous carries is not constant but does not exceed a certain predetermined length, it has further been proposed that the calculation should be performed in a segmented manner. This will be explained in more detail with reference to the following example:
Figure DE102013112021B4_0017

Gemäß diesem Beispiel soll von der Dezimalzahl 50209 die Dezimalzahl 8452 abgezogen werden. Beide Zahlen liegen als Operanden in Form einer 32-Bit-Bitsequenz vor. According to this example, the decimal number 50209 should be subtracted from the decimal number 8452. Both numbers are available as operands in the form of a 32-bit bit sequence.

Zunächst werden die Operanden in 8 Teilbereiche mit je 4 Bits unterteilt. Im oben genannten Beispiel sind nur die ersten vier Teilbereiche angegeben, da die übrigen Teilbereiche für das Ergebnis keine Relevanz darstellen. Zuvor wurden für die Operanden der Übertrags-Generierungscode BCG und der Übertrags-Propagierungscode BCP berechnet, sowie in dieser Anmeldung angegeben. First, the operands are subdivided into 8 subareas with 4 bits each. In the above example, only the first four subareas are given, as the remaining subareas are not relevant to the result. Previously, the carry generation code BCG and the carry propagation code BCP were calculated for the operands, as indicated in this application.

Jeder Teilbereich wird nun unter Zugrundelegung des jeweiligen Bereiches des Übertrags-Generierungscodes und des Übertrags-Propagierungscodes dahingehend untersucht, ob innerhalb dieses Teilbereiches eine vorgegebene Anzahl von benachbarten Überträgen vorhanden ist. Dies kann mit den oben genannten Formeln für jeden Teilbereich separat überprüft werden, wobei die BCP-Teile leicht überlappend vorgesehen sind. Liegt ein entsprechend vereinfachtes Verfahren vor, so kann der Übertragscode für diesen jeweiligen Teilbereich anhand der oben genannten Formeln entsprechend vereinfacht aus dem BCG-Feld und dem BCP-Feld für den jeweiligen Teilbereich ermittelt werden. Each subarea is now examined for whether there is a predetermined number of adjacent carries within that subarea, based on the particular range of the carry generation code and the carry propagation code. This can be checked separately for each subarea using the above formulas, with the BCP parts being slightly overlapping. If a correspondingly simplified method is available, then the carry code for this particular subarea can be determined in a correspondingly simplified manner from the BCG field and the BCP field for the respective subarea using the above-mentioned formulas.

Anschließend liegen nunmehr vier relevante Teil-Übertragungscodes BC_Teil (0)...BC_Teil (3) vor, wobei durch eine Oder-Verknüpfung der jeweiligen Teil-Übertragungscodes BC_Teil der gesamte Übertragungscode ermittelbar ist. Dabei gilt, dass für alle in den Teilfeldern nicht ausgeführten Bits der logische Wert 0 angenommen wird. Subsequently, there are now four relevant partial transmission codes BC_Teil (0) ... BC_Teil (3), wherein the entire transmission code can be determined by ORing the respective partial transmission codes BC_Teil. In this case, the logical value 0 is assumed for all bits not executed in the subfields.

Hierzu zusätzlich lässt sich noch der Fall abdecken, dass die Operanden eine derartige Kombination von Bitwerten aufweisen, bei denen an jeder Bitposition eine Übertragung bis zum Ende weitergereicht wird. In diesem Fall ist das Feld BCP = 1, so dass auch hier eine vereinfachte Ermittlung des Übertragscodes, wie bereits vorstehend angegeben ermittelbar ist. In addition to this, the case can be covered that the operands have such a combination of bit values in which a transmission is passed on to the end at each bit position. In this case, the field BCP = 1, so that here too a simplified determination of the carry code, as already stated above can be determined.

Diese Ansätze lassen sich nun zusammenführen, wodurch eine hohe Anzahl von zu prüfenden Möglichkeiten abgedeckt werden kann. Dazu wird zunächst der Übertrags-Generierungscode und der Übertrags-Propagierungscode BCP und BCG berechnet. Anschließend werden parallel zum einen versucht, den Übertragungscode mit fest vorgegebener Länge von Überträgen ohne Segmentierung zu berechnen, den Übertragungscode gemäß der Segmentierung zu berechnen sowie den Übertragungscode gemäß dem Spezialfall, dass ein einmal erzeugter Übertrag bis ans Ende durchgereicht wird, zu erzeugen. Anschließend werden die Ergebnisse zusammengeführt, wobei bei Vorliegen einer gültigen Operanden-Kombination dann der Übertragscode vorliegt und so der entsprechende Paritätscode, der dem Verfahren zugrunde gelegt wird, vorausberechnet werden kann. Anschließend kann durch Vergleich des Ergebnis-Paritätscodes entsprechend ein Fehler festgestellt werden. These approaches can now be combined, which can cover a large number of possibilities to be tested. For this purpose, first the carry generation code and the carry propagation code BCP and BCG are calculated. Then, parallel to one, an attempt is made to compute the transmission code of fixed length of carries without segmentation, to calculate the transmission code according to the segmentation and to generate the transmission code according to the special case that a carry once generated is passed through to the end. Subsequently, the results are merged, wherein in the presence of a valid operand combination then the carry code is present and so the corresponding parity code, which is based on the method, can be calculated in advance. Subsequently, an error can be determined by comparing the result parity code accordingly.

Dabei wurde erkannt, dass durch die Zusammenführung der verschiedenen Verfahren nur noch in etwa die Hälfte an Kosten für einen Vollsubtrahierer notwendig sind, so dass dieses Verfahren gegenüber einer redundanten Auslegung sehr vorteilhaft ist. It was recognized that only about half of the costs for a full subtractor are necessary due to the merging of the different methods, so that this method is very advantageous compared to a redundant design.

Claims (14)

Verfahren zum Erkennen von Bitfehlern in einem Ergebnis einer auf einer Rechenmaschine ausgeführten arithmetischen Rechenoperation zweier Bitsequenzen, gekennzeichnet durch die mittels eines Mikroprozessors ausführbaren Schritte: a) Bereitstellen einer ersten Operanden-Bitsequenz (op1) und einer zweiten Operanden-Bitsequenz (op2), die eine vorgegebene Anzahl von Bits aufweisen; b) Berechnen eines ersten Operanden-Paritätscode (pop1) aus der ersten Operanden-Bitsequenz (op1) und Berechnen eines zweiten Operanden-Paritätscode (pop2) aus der zweiten Operanden-Bitsequenz (op2) in Abhängigkeit von einem vorgegebenen Paritätscode-Berechnungsschema (p), das eine Mehrzahl von Paritätsbits (p[0]...p[6]) aufweist und bei dem jedes Paritätsbit in Abhängigkeit von den Bitwerten eines jeweils vorgegebenen Teils von Bits der zugrundeliegenden Bitsequenz berechnet wird; c) Berechnen eines Übertragscodes (bc), indem für jede Bitposition (i) bezüglich der bitweisen arithmetischen Rechenoperation festgestellt wird, ob ausgehend von der jeweiligen Bitposition für die nächstfolgende Bitposition ein Übertrag bei der bitweisen arithmetischen Rechenoperation zu berücksichtigen ist; d) Berechnen eines Korrektur-Paritätscodes (pbc) aus dem Übertragscode (bc) entsprechend dem Paritätscode-Berechnungsschema (p) in Abhängigkeit von den Bitwerten der für das jeweilige Paritätsbit vorgegebenen Bits des Übertragscodes (bc); e) Berechnen eines Vorausberechnungs-Paritätscodes (ppre) basierend auf dem ersten Operanden-Paritätscode (pop1), dem zweiten Operanden-Paritätscode (pop2) und dem Korrektur-Paritätscode (pbc), indem für jedes Paritätsbit des Vorausberechnungs-Paritätscode (ppre) die Parität aus den zu dem jeweiligen Paritätsbit des Vorausberechnungs-Paritätscode (ppre) entsprechenden Paritätsbits des ersten Operanden-Paritätscodes (pop1), des zweiten Operanden-Paritätscodes (pop2) und des Korrektur-Paritätscodes (pbc) ermittelt wird; f) Berechnen einer Ergebnis-Bitsequenz (r), indem die arithmetische Rechenoperation mit der ersten Operanden-Bitsequenz (op1) und der zweiten Operanden-Bitsequenz (op2) durchgeführt wird; g) Berechnen eines Ergebnis-Paritätscodes (pres) aus der Ergebnis-Bitsequenz (r) entsprechend dem Paritätscode-Berechnungsschema in Abhängigkeit von den Bitwerten der für das jeweilige Paritätsbit vorgegebenen Bits der Ergebnis-Bitsequenz (r); und h) Erkennen von Bitfehlern (error) in Abhängigkeit von einem Vergleich des Vorausberechnungs-Paritätscodes (ppre) mit dem Ergebnis-Paritätscode (pres). A method of detecting bit errors in a result of an arithmetic operation of two bit sequences performed on a computing machine, characterized by the steps executable by a microprocessor: a) providing a first operand bit sequence (op1) and a second operand bit sequence (op2) comprising a have predetermined number of bits; b) calculating a first operand parity code (p op1 ) from the first operand bit sequence (op1) and calculating a second operand parity code (p op2 ) from the second operand bit sequence (op2) in response to a predetermined parity code calculation scheme ( p) having a plurality of parity bits (p [0] ... p [6]) and wherein each parity bit is calculated in response to the bit values of a respective predetermined portion of bits of the underlying bit sequence; c) calculating a carry code (bc) by determining for each bit position (i) with respect to the bitwise arithmetic operation whether a carry is to be taken into account in the bitwise arithmetic operation starting from the respective bit position for the next bit position; d) calculating a correction parity code (p bc ) from the carry code (bc) in accordance with the parity code calculation scheme (p) in response to the bit values of the bits of the carry code (bc) specified for the respective parity bit; e) calculating a preprocessing parity code (p pre ) based on the first operand parity code (p op1 ), the second operand parity code (p op2 ), and the correction parity code (p bc ) by incrementing for each parity bit the preprocessing parity code (p pre ) the parity of the parity bits of the first operand parity code (p op1 ), the second operand parity code (p op2 ), and the correction parity code (p bc ) corresponding to the respective parity bit of the pre-calculation parity code (p pre ). is determined; f) calculating a result bit sequence (r) by performing the arithmetic operation on the first operand bit sequence (op1) and the second operand bit sequence (op2); g) calculating a result parity code (p res ) from the result bit sequence (r) in accordance with the parity code calculation scheme in response to the bit values of the bits of the result bit sequence (r) specified for the respective parity bit; and h) detecting bit errors (error) in response to a comparison of the preprocessing parity code (p pre ) with the result parity code (p res ). Verfahren nach Anspruch 1, dadurch gekennzeichnet, dass das vorgegebene Paritätscode-Berechnungsschema ein linearer Blockcode ist, bei dem jedes Paritätsbit des linearen Blockcodes in Abhängigkeit von den Bitwerten der für das jeweilige Paritätsbit des linearen Blockcodes vorgegebenen Bits der zugrundeliegenden Bitsequenz berechnet wird. A method according to claim 1, characterized in that the predetermined parity-code calculation scheme is a linear block code in which each parity bit of the linear block code is calculated in response to the bit values of the bits of the underlying bit sequence specified for the respective parity bit of the linear block code. Verfahren nach Anspruch 2, gekennzeichnet durch einen Hamming-Code als linearen Blockcode.  Method according to claim 2, characterized by a Hamming code as a linear block code. Verfahren nach Anspruch 1, dadurch gekennzeichnet, dass das vorgegebene Paritätscode-Berechnungsschema vorsieht, die zugrundeliegende Bitsequenz in einer Matrix anzuordnen, indem die Bits der zugrundeliegenden Bitsequenz nacheinander zeilenweise in der Matrix angeordnet werden, wobei für jede Zeile und jede Spalte der Matrix ein Paritätsbit in Abhängigkeit von den Bitwerten der die jeweilige Zeile oder Spalte betreffenden Bits der zugrundeliegenden Bitsequenz berechnet wird. A method according to claim 1, characterized in that the predetermined parity-code calculation scheme provides for arranging the underlying bit sequence in a matrix by sequentially arranging the bits of the underlying bit sequence line-by-line in the matrix, one parity bit in each row and column of the matrix Depending on the bit values of the respective row or column bits of the underlying bit sequence is calculated. Verfahren nach einem der vorhergehenden Ansprüche, dadurch gekennzeichnet, dass ein Übertrags-Generierungscode (bcg) berechnet wird, indem für jede Bitposition (i) der Operanden-Bitsequenzen (op1, op2) bezüglich der bitweisen arithmetischen Rechenoperation festgestellt wird, ob ausgehend von den Bitwerten an der jeweils vorherigen Bitposition (i – 1) der ersten Operanden-Bitsequenz (op1) und der zweiten Operanden-Bitsequenz (op2) ein Übertrag für die jeweilige Bitposition (i) erzeugt wird, und dass ein Übertrags-Propagierungscode (bcp) berechnet wird, indem für jede Bitposition (i) der Operanden-Bitsequenzen (op1, op2) bezüglich der bitweisen arithmetischen Rechenoperation festgestellt wird, ob ausgehend von den Bitwerten an der jeweiligen Bitposition (i) der ersten Operanden-Bitsequenz (op1) und der zweiten Operanden-Bitsequenz (op2) ein an dieser Bitposition (i) zu berücksichtigender Übertrag auf die nächstfolgende Bitposition (i + 1) weitergeleitet wird, wobei in Abhängigkeit von dem Übertrags-Generierungscode (bcg) und dem Übertrags-Propagierungscode (bcp) festgestellt wird, ob bei der bitweisen arithmetischen Rechenoperation eine vorgegebene Anzahl von bitweise aufeinanderfolgenden Überträgen vorliegt oder nicht überschritten wird, und wobei bei einer derartigen Feststellung der Übertragscode (bc) in Abhängigkeit von dem Übertrags-Generierungscode (bcg) und dem Übertrags-Propagierungscode (bcp) berechnet wird und das Verfahren gemäß den Schritten a), b), d), e), f), g), h) ausgeführt wird, und wobei bei einer derartigen Nicht-Feststellung das Verfahren gemäß den Schritten a), b), d), e), f), g), h) nicht ausgeführt wird. Method according to one of the preceding claims, characterized in that a carry generation code (bcg) is calculated by determining for each bit position (i) of the operand bit sequences (op1, op2) with respect to the bitwise arithmetic operation whether based on the bit values at the respective previous bit position (i-1) of the first operand bit sequence (op1) and the second operand bit sequence (op2) a carry for the respective bit position (i) is generated, and that a carry propagate code (bcp) is calculated, by determining, for each bit position (i) of the operand bit sequences (op1, op2) with respect to the bitwise arithmetic operation, whether from the bit values at the respective bit position (i) of the first operand bit sequence (op1) and the second operand bit sequence (op2) a carry to be taken into account in this bit position (i) is forwarded to the next following bit position (i + 1), it being determined in dependence on the carry generation code (bcg) and the carry propagation code (bcp) whether bitwise arithmetic operation, a predetermined number of bitwise successive carries is present or not exceeded, and wherein in such a Festst calculation of the carry code (bc) in dependence on the carry generation code (bcg) and the carry propagation code (bcp) and the method according to the steps a), b), d), e), f), g), h) is carried out, and in such a non-determination, the method according to the steps a), b), d), e), f), g), h) is not carried out. Verfahren nach Anspruch 5, dadurch gekennzeichnet, dass festgestellt wird, ob die vorgegebene Anzahl von maximal einem Übertrag vorliegt, indem basierend auf dem Übertrags-Generierungscode (bcg) und dem Übertrags-Propagierungscode (bcp) überprüft wird, ob ein für die jeweilige Bitposition (i) erzeugter Übertrag auf die nächstfolgende Bitposition (i + 1) nicht weitergeleitet wird, wobei bei einer derartigen Feststellung der Übertragscode (bc) dem Übertrags-Generierungscode (bcg) entspricht. A method according to claim 5, characterized in that it is determined whether the predetermined number of maximum one carry exists by checking, based on the carry generation code (bcg) and the carry propagation code (bcp), whether one for the respective bit position ( i) is not forwarded to the next following bit position (i + 1), in such a determination the carry code (bc) corresponds to the carry generation code (bcg). Verfahren nach Anspruch 5 oder 6, dadurch gekennzeichnet, dass festgestellt wird, ob die vorgegebene Anzahl von maximal zwei Überträgen vorliegt, indem basierend auf dem Übertrags-Generierungscode (bcg) und dem Übertrags-Propagierungscode (bcp) überprüft wird, ob für eine auf eine Bitposition (i – 1) ohne Übertrag folgende Bitposition (i) ein Übertrag erzeugt wird, der auf die nächstfolgende Bitposition (i + 1) weitergeleitet wird oder ob für die nächstfolgende Bitposition (i + 1) wiederum ein Übertrag erzeugt wird, wobei auf die darauf folgende Bitposition (i + 2) kein Übertrag weitergeleitet oder dort erzeugt wird, wobei bei einer derartigen Feststellung der Übertragscode (bc) in Abhängigkeit von dem Übertrags-Generierungscode (bcg) und dem Übertrags-Propagierungscode berechnet wird. A method according to claim 5 or 6, characterized in that it is determined whether the predetermined number of maximum two carries is present, by checking whether for one on one based on the carry generation code (bcg) and the carry propagation code (bcp) Bit position (i-1) without carry the following bit position (i) a carry is generated, which is forwarded to the next bit position (i + 1) or whether for the next bit position (i + 1) again a carry is generated, wherein the in the following bit position (i + 2) no carry is forwarded or generated there, whereby in such a determination the carry code (bc) is calculated in dependence on the carry generation code (bcg) and the carry propagation code. Verfahren nach einem der Ansprüche 5 bis 7, dadurch gekennzeichnet, dass festgestellt wird, ob die vorgegebene Anzahl von aufeinanderfolgenden Überträgen vorliegt, indem basierend auf dem Übertrags-Generierungscode (bcg) und dem Übertrags-Propagierungscode (bcp) überprüft wird, ob für eine auf eine Bitposition (i – 1) ohne Übertrag folgende Bitposition (i) ein Übertrag erzeugt wird und ob an den darauffolgenden Bitpositionen (i + n) gemäß der vorgegebenen Anzahl ein Übertrag erzeugt oder ob ein erzeugter Übertrag weitergeleitet wird, bis die vorgegebene Anzahl von aufeinanderfolgenden Überträgen erreicht ist, wobei bei einer derartigen Feststellung der Übertragscode (bc) in Abhängigkeit von dem Übertrags-Generierungscode (bcg) und dem Übertrags-Propagierungscode berechnet wird. Method according to one of claims 5 to 7, characterized in that it is determined whether the predetermined number of successive carries exists by checking, based on the carry generation code (bcg) and the carry propagate code (bcp), whether for one a bit position (i-1) without carry following bit position (i) a carry is generated and whether at the subsequent bit positions (i + n) according to the predetermined number generates a carry or whether a generated carry is forwarded until the predetermined number of consecutive In such a determination, the carry code (bc) is calculated in response to the carry generation code (bcg) and the carry propagate code. Verfahren nach einem der Ansprüche 5 bis 8, dadurch gekennzeichnet, dass die Operanden-Bitsequenzen (op1, op2) in eine Mehrzahl von disjunkten Teilsequenzen unterteilt werden, wobei für jede Teilsequenz basierend auf den die jeweilige Teilsequenz betreffenden Bereichen des Übertrags-Generierungscode und des Übertrags-Propagierungscode festgestellt wird, ob die vorgegebene Anzahl von aufeinanderfolgenden Überträgen in der jeweiligen Teilsequenz vorliegt, und wobei bei einer derartigen Feststellung für jede Teilsequenz ein Teil-Übertragungscode (bc_teil) in Abhängigkeit von dem Übertrags-Generierungscode (bcg) und dem Übertrags-Propagierungscode berechnet wird und der Übertragungscode (bc) dann basierend auf den Teil-Übertragungscodes der einzelnen Teilsequenzen berechnet wird. Method according to one of Claims 5 to 8, characterized in that the operand bit sequences (op1, op2) are subdivided into a plurality of disjoint subsequences, wherein for each subsequence based on the respective subsequence regions of the carry generation code and the carry Propagation code is determined whether the predetermined number of successive carries in the respective subsequence exists, and in such a determination for each subsequence, a partial transfer code (bc_teil) calculated in dependence on the carry generation code (bcg) and the carry propagation code and the transmission code (bc) is then calculated based on the partial transmission codes of the individual partial sequences. Verfahren nach einem der vorhergehenden Ansprüche, dadurch gekennzeichnet, dass ein Übertrags-Generierungscode (bcg) berechnet wird, indem für jede Bitposition (i) der Operanden-Bitsequenzen (op1, op2) bezüglich der bitweisen arithmetischen Rechenoperation festgestellt wird, ob ausgehend von den Bitwerten an der jeweils vorherigen Bitposition (i – 1) der ersten Operanden-Bitsequenz (op1) und der zweiten Operanden-Bitsequenz (op2) ein Übertrag für die jeweilige Bitposition (i) erzeugt wird, und dass ein Übertrags-Propagierungscode (bcp) berechnet wird, indem für jede Bitposition (i) der Operanden-Bitsequenzen (op1, op2) bezüglich der bitweisen arithmetischen Rechenoperation festgestellt wird, ob ausgehend von den Bitwerten an der jeweiligen Bitposition (i) der ersten Operanden-Bitsequenz (op1) und der zweiten Operanden-Bitsequenz (op2) ein an dieser Bitposition (i) zu berücksichtigender Übertrag auf die nächstfolgende Bitposition (i + 1) weitergeleitet wird, wobei basierend auf dem Übertrags-Propagierungscode (bcp) festgestellt wird, ob ein einmal für eine Bitposition erzeugter Übertrag auf alle darauffolgenden Bitpositionen weitergeleitet wird, wobei bei einer derartigen Feststellung der Übertragungscode (bc) in Abhängigkeit von dem Übertrags-Generierungscode (bcg) berechnet wird. Method according to one of the preceding claims, characterized in that a carry generation code (bcg) is calculated by determining for each bit position (i) of the operand bit sequences (op1, op2) with respect to the bitwise arithmetic operation whether based on the bit values at the respective previous bit position (i-1) of the first operand bit sequence (op1) and the second operand bit sequence (op2) a carry for the respective bit position (i) is generated, and that a carry propagate code (bcp) is calculated in that for each bit position (i) of the operand bit sequences (op1, op2) with respect to the bitwise arithmetic arithmetic operation it is determined whether, based on the bit values at the respective bit position (i) of the first operand bit sequence (op1) and the second operand Bit sequence (op2) a carry to be taken into account at this bit position (i) is forwarded to the next following bit position (i + 1), being based d is determined on the carry propagate code (bcp), whether a carry once generated for one bit position is forwarded to all subsequent bit positions, upon such determination, the transmit code (bc) is calculated in response to the carry generation code (bcg). Verfahren nach einem der vorhergehenden Ansprüche, dadurch gekennzeichnet, dass für jedes Paritätsbit des Paritätscode-Berechnungsschema ein Fehlersyndrom in Abhängigkeit von dem jeweiligen Paritätsbit des Vorausberechnungs-Paritätscode und dem entsprechenden Paritätsbit des Ergebnis-Paritätscodes berechnet wird, wobei ein Bitfehler dann erkannt wird, wenn zumindest eines der Fehlersyndrome eine Fehlerkennung enthält. Method according to one of the preceding claims, characterized in that for each parity bit of the parity-code calculation scheme an error syndrome is calculated in dependence on the respective parity bit of the pre-calculation parity code and the corresponding parity bit of the result parity code, a bit error being detected if at least one of the error syndromes contains an error identifier. Computerprogramm mit Programmcodemitteln, insbesondere auf einem maschinenlesbaren Träger gespeichert, eingerichtet zur Durchführung des Verfahrens nach einem der vorhergehenden Ansprüche, wenn das Computerprogramm auf einer Datenverarbeitungsanlage abläuft.  Computer program with program code means, in particular stored on a machine-readable carrier, arranged for carrying out the method according to one of the preceding claims, when the computer program runs on a data processing system. Halbleiterschaltung, eingerichtet zur Durchführung des Verfahrens nach einem der Ansprüche 1 bis 11.  Semiconductor circuit configured to carry out the method according to one of Claims 1 to 11. Computersystem zum Erkennen von Bitfehlern in einem Ergebnis einer auf dem Computersystem auszuführenden, arithmetischen Inkrement- oder Dekrementoperation einer Bitsequenz, dadurch gekennzeichnet, dass das Computersystem mittels eines Mikroprozessors zur Durchführung des Verfahrens nach einem der Ansprüche 1 bis 11 eingerichtet ist. A computer system for detecting bit errors in a result of an arithmetic increment or decrement operation of a bit sequence to be executed on the computer system, characterized in that the computer system is arranged by means of a microprocessor for carrying out the method according to one of claims 1 to 11.
DE102013112021.0A 2013-10-31 2013-10-31 Method and device for detecting bit errors Expired - Fee Related DE102013112021B4 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
DE102013112021.0A DE102013112021B4 (en) 2013-10-31 2013-10-31 Method and device for detecting bit errors

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
DE102013112021.0A DE102013112021B4 (en) 2013-10-31 2013-10-31 Method and device for detecting bit errors

Publications (2)

Publication Number Publication Date
DE102013112021A1 DE102013112021A1 (en) 2015-04-30
DE102013112021B4 true DE102013112021B4 (en) 2016-03-31

Family

ID=52811533

Family Applications (1)

Application Number Title Priority Date Filing Date
DE102013112021.0A Expired - Fee Related DE102013112021B4 (en) 2013-10-31 2013-10-31 Method and device for detecting bit errors

Country Status (1)

Country Link
DE (1) DE102013112021B4 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4224680A (en) * 1978-06-05 1980-09-23 Fujitsu Limited Parity prediction circuit for adder/counter

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6990507B2 (en) 2002-05-21 2006-01-24 Hewlett-Packard Development Company, L.P. Parity prediction for arithmetic increment function

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4224680A (en) * 1978-06-05 1980-09-23 Fujitsu Limited Parity prediction circuit for adder/counter

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
NICOLAIDIS, M.: Carry Checking/Parity Prediction Adders and ALUs. Very Large Scale Integration (VLSI) Systems, IEEE Transactions on , Vol. 11, No. 1, Feb. 2003, S. 121 - 128 *

Also Published As

Publication number Publication date
DE102013112021A1 (en) 2015-04-30

Similar Documents

Publication Publication Date Title
DE102011078642A1 (en) Method for checking an m out of n code
DE2060643B2 (en) Circuit arrangement for correcting individual errors
DE102006005817B4 (en) An error detection device for an address decoder and an error detection device for an address decoder
DE102004011450A1 (en) Targeted fault tolerance through special CPU commands
DE2503152A1 (en) CIRCUIT ARRANGEMENT FOR DETECTION OF DEFECTS CAUSED BY COMPONENT FAILURE IN THE MULTIPLICATION UNIT OF A DATA PROCESSING SYSTEM
DE1937249B2 (en) SELF-CHECKING FAULT DETECTION CIRCUIT
DE102013112021B4 (en) Method and device for detecting bit errors
WO2013004490A1 (en) Method for generating a random output bit sequence
DE102015102363A1 (en) ARRANGEMENT AND METHOD FOR CHECKING THE ENTROPY OF A QUOTA NUMBER
DE19719654B4 (en) Error decoding method and apparatus for Reed-Solomon codes
DE102011078645A1 (en) Method for safely checking a code
DE102014105218A1 (en) Search device using finite automata for partial words
DE102006027448B4 (en) circuitry
DE102007040721B4 (en) Data processing device, data processing method, computer program element and memory verification device
DE102013219088B9 (en) Circuit arrangement and method for realizing check bit compaction for cross-parity codes
DE102014114157B4 (en) A method of data processing for determining whether an error has occurred during execution of a program and data processing arrangements for generating program code
DE102013112020B4 (en) Method and device for detecting bit errors
WO2003093968A2 (en) Device and method for converting a term
DE102015111729B4 (en) PROCEDURE AND DECODER FOR DETERMINING AN ERROR VECTOR FOR A DATA WORD ACCORDING TO A REED-MULLER CODE
DE102011080659B4 (en) DEVICE AND METHOD FOR TESTING A CIRCUIT TO BE TESTED
EP1579230B1 (en) Device and method for creating a signature
DE102018213512A1 (en) ERROR SENSE ARITHMETIC LOGIC UNIT SYSTEM
DE4406391C1 (en) Electronic computing unit (arithmetic unit)
DE102009051500B4 (en) Arithmetic logic unit
DE102022118280A1 (en) Error processing and correction of adjacent 2-bit errors

Legal Events

Date Code Title Description
R012 Request for examination validly filed
R081 Change of applicant/patentee

Owner name: TECHNISCHE UNIVERSITAET CLAUSTHAL, DE

Free format text: FORMER OWNER: FACHHOCHSCHULE NORDHAUSEN, TECHNISCHE UNIVERSITAET CLAUSTHA, , DE

Owner name: HOCHSCHULE NORDHAUSEN, DE

Free format text: FORMER OWNER: FACHHOCHSCHULE NORDHAUSEN, TECHNISCHE UNIVERSITAET CLAUSTHA, , DE

Owner name: HOCHSCHULE NORDHAUSEN, DE

Free format text: FORMER OWNERS: FACHHOCHSCHULE NORDHAUSEN, 99734 NORDHAUSEN, DE; TECHNISCHE UNIVERSITAET CLAUSTHAL, 38678 CLAUSTHAL-ZELLERFELD, DE

Owner name: TECHNISCHE UNIVERSITAET CLAUSTHAL, DE

Free format text: FORMER OWNERS: FACHHOCHSCHULE NORDHAUSEN, 99734 NORDHAUSEN, DE; TECHNISCHE UNIVERSITAET CLAUSTHAL, 38678 CLAUSTHAL-ZELLERFELD, DE

R082 Change of representative

Representative=s name: GRAMM, LINS & PARTNER GBR, DE

Representative=s name: GRAMM, LINS & PARTNER PATENT- UND RECHTSANWAEL, DE

R082 Change of representative

Representative=s name: GRAMM, LINS & PARTNER PATENT- UND RECHTSANWAEL, DE

R016 Response to examination communication
R018 Grant decision by examination section/examining division
R020 Patent grant now final
R119 Application deemed withdrawn, or ip right lapsed, due to non-payment of renewal fee