Method in a computer system, computer program and data processing system
09722628 · 2017-08-01
Assignee
Inventors
- Jan Richter (Lauf an der Pegnitz, DE)
- Maximilian Walter (Nürnberg, DE)
- Karl-Hermann Witte (Nürnberg, DE)
Cpc classification
H03M7/00
ELECTRICITY
G06F11/0796
PHYSICS
International classification
H03M7/00
ELECTRICITY
G06F11/07
PHYSICS
G06F11/10
PHYSICS
Abstract
In a method in a computer system for recoding a coded intermediate variable into a recoded result variable a product is formed by multiplying an input constant by an input variable to be coded. The coded intermediate variable is formed as a function of the product and a multiplicative inverse is determined on the basis of the input constant. The multiplicative inverse is applied to the coded intermediate variable, so that no uncoded or partially uncoded interim result is produced and/or an error information potentially contained in the coded intermediate variable is still detectable in the interim result.
Claims
1. A method in a computer system for recoding a coded intermediate variable into a recoded result variable, comprising: forming a product by multiplying an input constant by an input variable to be coded; forming the coded intermediate variable as a function of the product; determining a multiplicative inverse on the basis of the input constant; and applying the multiplicative inverse to the coded intermediate variable, so that no uncoded or partially uncoded interim result is produced and/or an error information potentially contained in the coded intermediate variable is still detectable in the interim result.
2. The method of claim 1, further comprising applying a product of the multiplicative inverse and a recoded result constant to the coded intermediate variable, so that no uncoded or partially uncoded interim result is produced and/or an error information potentially contained in the coded intermediate variable is still detectable in the interim result.
3. The method of claim 1, wherein an input signature and/or an input operand is constantly zero, and/or other, additional input signatures and/or other, additional input operands are used.
4. The method of claim 2, wherein the step of applying the multiplicative inverse to the coded intermediate variable or the step of applying the product of the multiplicative inverse and the recoded result constant to the coded intermediate variable represents a first step.
5. The method of claim 1, wherein the multiplicative inverse has a remainder class ring modulo 2powern, with n representing a bit width of the coded intermediate variable.
6. The method of claim 1, further comprising ignoring arithmetic overruns.
7. The method of claim 1, wherein any potentially existing error is inverted by applying the multiplicative inverse.
8. The method of claim 2, further comprising forming the result constant in such a way that the input variable is replicated.
9. The method of claim 1, wherein the coded intermediate variable is formed by multiplying the input variable by the input constant and by adding a static, variable-dependent input signature and a dynamic, cycle-dependent input operand, further comprising recoding the intermediate variable into a recoded result variable with a recoded result constant, a recoded, static variable-dependent result signature, and a recoded, dynamic cycle-dependent result operand, by: creating a first interim result by multiplying the intermediate variable by a first parameter, with the first parameter being a multiplication of the multiplicative inverse with reference to the input constant and the recoded result constant, creating a second interim result by adding a second parameter to the first interim result, with the second parameter being the recoded result signature minus the multiplication of the input signature by the first interim result creating a third interim result by adding the recoded dynamic, cycle-dependent result operand to the second interim result, and creating the recoded result variable by subtracting the first parameter from the third interim result.
10. The method of claim 9, wherein the result constant is formed by one minus the input constant multiplied by 2powern, with n being a bit width of the intermediate variable, so that any potentially existing error value is inverted.
11. The method of claim 10, wherein the recoded, static variable-dependent result signature and the recoded dynamic, cycle-dependent result operand are freely selectable.
12. The method of claim 9, wherein the result constant is replicated by adding 2powern to one, so that the input variable is replicated.
13. The method of claim 10, wherein the recoded static variable-dependent result signature and the recoded dynamic, cycle-dependent result operand (D′) are set to zero.
14. The method of claim 9, wherein the result constant is set to one, and at the same time the recoded static, variable-dependent result signature and the recoded dynamic, cycle-dependent result operand are set to zero, so that the recoding is a decoding of the coded intermediate variable, wherein the error information potentially contained in the coded intermediate variable is still detectable.
15. A computer program comprising computer executable program code recorded on a computer readable non-transitory storage medium to carry out a method as claimed in claim 1, when the computer program is executed on a computer.
16. A data processing system for providing a recoded result variable from a coded intermediate variable, comprising: a product by multiplying an input constant by an input variable to be coded; an intermediate variable coded at least on the basis of the product; a multiplicative inverse of the input constant; the recoded result variable by applying the multiplicative inverse to the coded intermediate variable, so that no uncoded or partially uncoded interim result is produced and/or an error information potentially contained in the coded intermediate variable is still detectable in the interim result.
17. The data processing system of claim 16, wherein the coded intermediate variable is formed by multiplying an input variable by an input constant and by adding a static, variable-dependent input signature and a dynamic, cycle-dependent input operand, further comprising: provision of a first interim result by multiplying the intermediate variable by a first parameter, with the first parameter being a multiplication of the multiplicative inverse with reference to the input constant and the recoded result constant, provision of a second interim result by adding a second parameter to the first interim result, with the second parameter being the recoded result signature minus the multiplication of the input signature by the first interim result, provision of a third interim result by adding the recoded dynamic, cycle-dependent result operand to the second interim result, and provision of the recoded result variable by subtracting the first parameter from the third interim result.
Description
BRIEF DESCRIPTION OF THE DRAWING
(1) Other features and advantages of the present invention will be more readily apparent upon reading the following description of currently preferred exemplified embodiments of the invention with reference to the accompanying drawing, in which the sole
DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS
(2) The depicted embodiment is to be understood as illustrative of the invention and not as limiting in any way. It should also be understood that in certain instances, details which are not necessary for an understanding of the present invention or which render other details difficult to perceive may have been omitted.
(3) Turning now to the drawing, and in particular to
z*K1, with a constant K1=A.sup.−1*A′. Step 1:
This leads to the first interim result R1:
A′*xf+A.sup.−1*A′*B_x+A.sup.−1*A′*D.
R1+K2, with a constant K2=B_x*K1+B_x′. Step 2:
(4) This leads to the second interim result R2:
A′*xf+B.sub.—x′+A.sup.−1*A′*D.
R2+D′. Step 3:
This leads to the third interim result R3:
A′*xf+B_x′+A.sup.−1*A.sup.−1*D+D′.
R3+K3*D, with the constant K3=−K1=−A.sup.−1*A′. Step 4:
This leads to the recoded result variable z′:
z′: A′*xf+B_x′+D′.
(5) Overruns, if any, can be ignored. The value A.sup.−1 signifies the multiplicative inverse of A in the remainder class ring modulo 2powern (
/2.sup.n), wherein n represents the bit width of the coded intermediate variable z (e.g. n=32 or n=64). A.sup.−1 can be calculated e.g. with the help of the extended Euclidean algorithm. As can be seen from this, all interim results R1, R2, R3 are coded. It is easy to detect that, in all interim results R1, R2, R3, the functional input variable xf is multiplied by a prime number A or A′, that multiples of a static signature B_x and/or B_x′ are always contained additively, and that multiples of a dynamic signature D or D′ are always contained. All interim results R1,R2,R3 thus fulfill the requirements of a coded variable.
(6) In contrast to conventional recoding by means of decoding by division and subsequent recoding, no uncoded or partially uncoded interim result is produced. The method can therefore also be used within coded operations, even though there is no independent testing instance (redundant hardware) available there. This characteristic is an important prerequisite for each straightforward implementation of coded processing, which takes place without additional diagnosis.
(7) According to the invention, errors remain detectable. During recoding, according to the invention no uncoded interim result is produced, so that any new error occurring is detected by the coding. This is necessary at several critical points, e.g. when decoding variables while simultaneously checking for errors, when implementing negating operations without inverting the error syndrome, and when implementing bitwise Boolean operators.
(8) A further example is the recoding of an ANBD-coded intermediate variable z=(A*xf+B_x+D+e) into an A′NB′D′-coded variable z′=(A′*xf+B_x′+D′) in which A′=1, B_x′=0 and D′=0 and an error e.
(9) This leads to the result variable:
z′:=xf+A.sup.−1*e.
(10) A decoding of the operand z is obtained here as the recoding. Unlike in traditional decoding by means of division, however, an invalid coding in the input operand can be detected in the result: it is precisely in this case that the higher-value bits are not equal to 0 (positive numbers and zero) or not equal to −1 (negative numbers). This can be used in the implementation of result drivers, in that invalid values in the higher-value bits lead to the checksum of outgoing telegrams being specifically interrupted and thereby made detectable for the recipient as being erroneous.
(11) A further example is the recoding of an ANBD-coded intermediate variable z′=(A*xf+B_x+D+e) into an A′NB′D′-coded variable z′=(A′*xf+B_x′+D′) as well, wherein A.sup.1=(1−2.sup.n*A) is selected. As a result of this the recoding is carried out in such a way that any potentially existing error value is inverted. If this coding is used in the implementation in coded negation operations, an operation is produced overall that does not invert the error value, since the double negation of the error cancels itself out. This makes it possible to prevent an error from being systematically masked out.
(12) An additional example is the recoding of an ANBD-coded intermediate variable z=(A*xf+B_x+D+e) into an A′NB′D′-coded variable z′=(A′*xf+B_x′+D′) as well, wherein A′=2n+1, B_x′=0 and D′=0 is selected. Recoding results in the replication of the uncoded value. This coding is useful, since bitwise Boolean operations such as AND, OR or XOR can be applied directly to it.
(13) It is to be noted that D=D′ is selected in many cases. The process can then be simplified to:
z′=(z*K1+K2)+K3*D
in which K1=A−1*A′, K2=−Bx*K1+Bx′, K3=−K1+1.
(14) While the invention has been illustrated and described in connection with currently preferred embodiments shown and described in detail, it is not intended to be limited to the details shown since various modifications and structural changes may be made without departing in any way from the spirit and scope of the present invention. The embodiments were chosen and described in order to explain the principles of the invention and practical application to thereby enable a person skilled in the art to best utilize the invention and various embodiments with various modifications as are suited to the particular use contemplated.