US 6721905 B2 Abstract The present invention provides a processor including a self-diagnostic function. The processor comprises: an arithmetic circuit including an adder-subtracter, which is a diagnostic object; a data storing unit which stores a self-diagnostic data; and a self-diagnostic processing unit. The self-diagnostic processing unit inputs the self-diagnostic data, and then, carries out diagnostic processing so that every bit of the operation result becomes all zero “0” (or all “1”) by the arithmetic circuit.
Claims(14) 1. A processor comprising:
an arithmetic circuit including an adder-subtracter, which is a diagnostic object;
a data store unit which stores a self-diagnostic data; and
a self-diagnostic processing unit which inputs the self-diagnostic data, and carrying out diagnostic processing so that every bit of operation result become all zero “0” or all “1” by the arithmetic circuit.
2. The processor according to
a first source register which stores a first operand A;
a second source register which stores a second operand B;
a complement circuit which inverts the second operand B so as to output one's (1′s) complement B
1's; a first adder-subtracter with carry input of being as a diagnostic object, which inputs the first operand A as a minuend and inputting the output value B
1's of the complement circuit as a subtrahend together with carry input, and adds “1” to one's (1′s) complement B1's so as to generate two's (2′s) complement B2's, and further, adds the generated complement B2's to the first operand A so as to carry out a subtraction C=(A−B); and a second adder-subtracter provided on the next stage of the first adder-subtracter,
the self-diagnostic processing unit uses arbitrary self-diagnostic data X and Y having a predetermined bit length stored in the first and second source registers,
carries out a subtraction Z=(X=Y) as Z=(X+Y
2's)=(X+Y1's+1) using the complement circuit and the first adder-subtracter in a first cycle, replaces the minuend X with the subtrahend Y each other, and carries out a subtraction Z′=(Y−X) as Z′=(Y+X
2's)=(Y+X1's+1) using the complement circuit and the first adder-subtracter in a second cycle, carries out an addition Z″ of the subtraction results Z and Z′ in the first and second cycles, that is, Z″=(Z+Z′)=(X+X
1's +1+Y+Y1's+1) using the second adder-subtracter in a third cycle, and makes a judgment such that the first adder-subtracter is normal in the case where every bit of the addition result is all zero “0” while making a judgment such that the first adder-subtracter has a failure in the case where every bit of the addition result is other than zero “0”. 3. The processor according to
a first source register which stores a first operand A;
a second source register which stores a second operand B;
a first complement circuit which inverts the second operand B so as to output one's (1′s) complement B
1's; an adder-subtracter with carry input of being as a diagnostic object, which inputs the first operand A as a minuend and inputting the output value B
1's of the complement circuit as a subtrahend together with carry input, and adds “1” to one's (1′s) complement B1's so as to generate two's (2′s) complement B2's, and further, adds the generated complement B2's to the first operand so as to carry out a subtraction C=(A−B); and a second complement circuit which inverts the subtraction value C of the adder-subtracter and adding “1” thereto so as to output two's (2′s) complement C
2's; a second adder-subtracter provided on the next stage of the first adder-subtracter; and
a comparator which compares an output of the adder-subtracter with an output of the second complement circuit, and further,
the arithmetic circuit uses arbitrary self-diagnostic data X and Y having a predetermined bit length stored in the first and second source registers,
carries out a subtraction Z=(X−Y) as Z=(X+Y
2's)=(X+Y1's+1) using the first complement circuit and the adder-subtracter in a first cycle, replaces the minuend X with the subtrahend Y each other, and carries out a subtraction Z′=(Y−X) as Z=(Y+X
2's)=(Y+X1's+1) using the first complement circuit and the adder-subtracter in a second cycle, outputs a complement Z′2s=(Z1's+1) of the subtraction result Z′ from the second complement circuit so as to compare it with the subtraction result Z of the first cycle, and makes a judgment such that the first adder-subtracter is normal in the case where the subtraction results Z′ and Z are correspondent (Z′2's=Y2's−X2's=X+Y2's=Z) while making a judgment such that the first adder-subtracter has a failure in the case where the subtraction results Z′ and Z are not correspondent. 4. The processor according to
a first source register which stores a first operand A;
a second source register which stores a second operand B;
a complement circuit which inverts the second operand B and adding “1” so as to output two's (2's) complement B
2's; a first adder-subtracter of being as a diagnostic object, which inputs the first operand A as an augend and inputting the output value B
2's of the complement circuit as an addend so as to carry out a subtraction C=(A−B); and a second adder-subtracter provided on the next stage of the first adder-subtracter,
the self-diagnostic processing unit uses arbitrary self-diagnostic data X and Y having a predetermined bit length stored in the first and second source registers,
carries out a subtraction Z=(X=Y) as Z=(X+Y
2's)=(X+Y1's+1) using the complement circuit and the first adder-subtracter in a first cycle, replaces the minuend X with the subtrahend Y each other, and carries out a subtraction Z′=Y−X) as Z′=(Y+X
2's)=(Y+X1's+1) using the complement circuit and the first adder-subtracter in a second cycle, carries out an addition Z″ of the subtraction results Z and Z′ in the first and second cycles, that is, Z″=(Z+Z′)=(X+X
1's +1+Y+Y1's+1) using the second adder-subtracter in a third cycle, and makes a judgment such that the first adder-subtracter is normal in the case where every bit of the addition result is all zero “0” while making a judgment such that the first adder-subtracter has a failure in the case where every bit of the addition result is other than zero “0”. 5. The processor according to
a first source register which stores a first operand A;
a second source register which stores a second operand B;
a complement circuit which inverts the second operand B so as to output one's (1′s) complement B
1's; and a adder-subtracter with carry input of being as a diagnostic object, which inputs the first operand A as a minuend and inputting the output value B
1's of the complement circuit as a subtrahend together with carry input, and adds “1” to one's (1′s) complement B1's so as to generate two's (2′s) complement B2's, and further, adds the generated complement B2's to the first operand so as to carry out a subtraction C=(A−B); the self-diagnostic processing unit uses arbitrary self-diagnostic data X and Y having a predetermined bit length stored in the first and second source registers,
carries out a subtraction Z=(X=Y) as Z=(X+Y
2's)=(X+Y1's+1) using the complement circuit and the adder-subtracter in a first cycle, replaces the minuend X with the subtrahend Y each other, and carries out a subtraction Z′=(Y−X) as Z′=(Y+X
2's)=(Y+X1's+1) using the complement circuit and the first adder-subtracter in a second cycle, carries out an addition Z″ of the subtraction results Z and Z′ in the first and second cycles, that is, Z″=(Z+Z′)=(X+X
1's+1+Y+Y1's+1) using the adder-subtracter in a third cycle, and makes a judgment such that the first adder-subtracter is normal in the case where every bit of the addition result is all zero “0” while making a judgment such that the first adder-subtracter has a failure in the case where every bit of the addition result is other than zero “0”. 6. The processor according to
a first source register which stores a first operand A;
a second source register which stores a second operand B;
a complement circuit which inverts the second operand B and adding “1” so as to output two's (2′s) complement B
2's; and a adder-subtracter of being as a diagnostic object, which inputs the first operand A as an augend and inputting the output value B
2's of the complement circuit as an addend so as to carry out a subtraction C=(A−B); carries out a subtraction Z=(X=Y) as Z=(X+Y
2's)=(X+Y1's+1) using the complement circuit and the adder-subtracter in a first cycle, replaces the minuend X with the subtrahend Y each other, and carries out a subtraction Z′=Y−X) as Z′=(Y+X
2's)=(Y+X1's+1) using the complement circuit and the adder-subtracter in a second cycle, carries out an addition Z″ of the subtraction results Z and Z′ in the first and second cycles, that is, Z″=(Z+Z′)=(X+X
1's+1+Y+Y1's+1) using the adder-subtracter in a third cycle, and makes a judgment such that the first adder-subtracter is normal in the case where every bit of the addition result is all zero “0” while making a judgment such that the first adder-subtracter has a failure in the case where every bit of the addition result is other than zero “0”. 7. The processor according to
a first source register which stores a first operand A;
a second source register which stores a second operand B;
a first complement circuit which inverts the second operand B so as to output one's (1′s) complement B
1's; a second complement circuit which inverts the first operand A so as to output one's (1′s) complement A
1's; a first adder-subtracter with carry input of being as a diagnostic object, which inputs the first operand A as a minuend and inputting the output value B
1's of the second complement circuit as a subtrahend together with carry input, and adds “1” to one's (1′s) complement B1's so as to generate two's (2's) complement B2's, and further, adds the generated complement B2's to the first operand A so as to carry out a subtraction C=(A−B); a second adder-subtracter with carry input, which inputs the second operand B as a minuend and inputting the output value A
1's of the first complement circuit as a subtrahend together with carry input, and adds “1” to one's (1′s) complement A1's so as to generate two's (2′s) complement A2's, and further, adds the generated complement B2's to the second operand B so as to carry out a subtraction C′=B−A); and a third adder-subtracter which adds an output of the first adder-subtracter and an output of the second adder-subtracter,
carries out a subtraction Z=(X=Y) as Z=(X+Y
2's)=(X+Y1's+1) using the first complement circuit and the first adder-subtracter in a first cycle, while concurrently carrying out a subtraction Z′=(Y−X) as Z=(Y+X2's)=(Y+X1's+1) using the second complement circuit and the second adder-subtracter in a first cycle, carries out an addition Z″ of the subtraction results Z and Z′ of the first and second adder-subtracters, that is, Z′=(Z+Z′)=(X+X
1's+1+Y+Y1's+1) using the third adder-subtracter in a second cycle, and makes a judgment such that the first adder-subtracter is normal in the case where every bit of the addition result is all zero “0” while making a judgment such that the first adder-subtracter has a failure in the case where every bit of the addition result is other than zero “0”. 8. The processor according to
a first source register which stores a first operand A;
a second source register which stores a second operand B;
a first complement circuit which inverts the second operand B so as to output one's (1′s) complement B
1's; a second complement circuit which inverts the first operand A so as to output one's (1′s) complement A
1's; a first adder-subtracter with carry input of being as a diagnostic object, which inputs the first operand A as a minuend and inputting the output value B
1's of the second complement circuit as a subtrahend together with carry input, and adds “1” to one's (1′s) complement B1's so as to generate two's (2′s) complement B2's, and further, adds the generated complement B2's to the first operand A so as to carry out a subtraction C=(A−B); a second adder-subtracter with carry input of being as a diagnostic object, which inputs the second operand B as a minuend and inputting the output value A
1's of the first complement circuit as a subtrahend together with carry input, and adds “1” to one's (1′s) complement A1's so as to generate two's (2′s) complement A2's, and further, adds the generated complement B2's to the second operand B so as to carry out a subtraction C′=(B−A); a third complement circuit which inverts the subtraction value C′ of the second adder-subtracter and adding “1” thereto so as to output two's (2′s) complement C′
2's; and a comparator which compares an output of the adder-subtracter with an output of the third complement circuit,
carries out a subtraction Z=(X=Y) as Z=(X+Y
2's)=(X+Y1's+1) using the first complement circuit and the first adder-subtracter in a first cycle, while concurrently carrying out a subtraction Z′=(Y−X) as Z=(Y+X2's)=(Y+X1's+1) using the second complement circuit and the second adder-subtracter in a first cycle, outputs a complement Z′
2s=(Z1's+1) of the subtraction result Z′ of the second adder-subtracter from the third complement circuit so as to compare it with the subtraction result Z of the first adder-subtracter in a second cycle, and makes a judgment such that the first adder-subtracter is normal in the case where the subtraction results Z′ and Z are correspondent (Z′2's=Y2's−X2's=X+Y2's=Z) while making a judgment such that the first adder-subtracter has a failure in the case where the subtraction results Z′ and Z are not correspondent. 9. The processor according to
a first source register which stores a first operand A;
a second source register which stores a second operand B;
a first complement circuit which inverts the second operand B and adding “1” thereto so as to output two's (2′s) complement B
2's; a second complement circuit which inverts the first operand A and adding “1” thereto so as to output two's (2′s) complement A
2's; a first adder-subtracter of being as a diagnostic object, which inputs the first operand A as a minuend and inputting the output value B
2's of the first complement circuit as a subtrahend so as to carry out a subtraction C=(A−B); a second adder-subtracter, which inputs the second operand B as a minuend and inputting the output value A
2's of the second complement circuit as a subtrahend so as to carry out a subtraction C′=(B−A); and a third adder-subtracter which adds an output of the first adder-subtracter and an output of the second adder-subtracter,
carries out a subtraction Z=(X=Y) as Z=(X+Y
2's)=(X+Y1's+1) using the first complement circuit and the first adder-subtracter in a first cycle, while concurrently carrying out a subtraction Z′=(Y−X) as Z=(Y+X2's)=(Y+X1's+1) using the second complement circuit and the second adder-subtracter in a first cycle, carries out an addition Z″ of the subtraction results Z and Z′ of the first and second adder-subtracters, that is, Z″=(Z+Z′)=(X+X
1's+1+Y+Y1's+1) using the third adder-subtracter in a second cycle, and makes a judgment such that the first adder-subtracter is normal in the case where every bit of the addition result is all zero “0” while making a judgment such that the first adder-subtracter has a failure in the case where every bit of the addition result is other than zero “0”. 10. The processor according to
a first source register which stores a first operand A;
a second source register which stores a second operand B;
1's; a second complement circuit which inverts the first operand A so as to output one's (1′s) complement A
1's; a first adder-subtracter with carry input of being as a diagnostic object, which inputs the first operand A as a minuend and inputting the output value B
1's of the second complement circuit as a subtrahend together with carry input, and adds “1” to one's (1′s) complement B1's so as to generate two's (2′s) complement B2's, and further, adds the generated complement B2's to the first operand A so as to carry out a subtraction C=(A−B); and a second adder-subtracter with carry input, which inputs the second operand B as a minuend and inputting the output value A
1's of the first complement circuit as a subtrahend together with carry input, and adds “1” to one's (1′s) complement A1's so as to generate two's (2′s) complement A2's, and further, adds the generated complement B2's to the second operand B so as to carry out a subtraction C′=(B−A), carries out a subtraction Z=(X−Y) as Z=(X+Y
2's)=(X+Y1's+1) using the first complement circuit and the first adder-subtracter in a first cycle, while concurrently carrying out a subtraction Z′=(Y−X) as Z=(Y+X2's)=(Y+X1's+1) using the second complement circuit and the second adder-subtracter in a first cycle, carries out an addition Z″ of the subtraction results Z and Z′ of the first and second adder-subtracters in the second cycle, that is, Z′=(Z+Z′)=X+X
1's+1+Y+Y1's+1) using the first adder-subtracter in a second cycle, and makes a judgment such that the first adder-subtracter is normal in the case where every bit of the addition result is all zero “0” while making a judgment such that the first adder-subtracter has a failure in the case where every bit of the addition result is other than zero “0”. 11. The processor according to
a first source register which stores a first operand A;
a second source register which stores a second operand B;
a first complement circuit which inverts the second operand B and adding “1” thereto so as to output two's (2′s) complement B
2's; a second complement circuit which inverts the first operand A and adding “1” thereto so as to output two's (2′s) complement A
2's; a first adder-subtracter of being as a diagnostic object, which inputs the first operand A as a minuend and inputting the output value B
2's of the first complement circuit as a subtrahend so as to carry out a subtraction C=(A−B); and a second adder-subtracter, which inputs the second operand B as a minuend and inputting the output value A
2's of the second complement circuit as a subtrahend so as to carry out a subtraction C′=(B−A), 2's)=(X+Y1's+1) using the first complement circuit and the first adder-subtracter in a first cycle, while concurrently carrying out a subtraction Z′=(Y−X) as Z=(Y+X2's)=(Y+X1's+1) using the second complement circuit and the second adder-subtracter in a first cycle, carries out an addition Z″ of the subtraction results Z and Z′ of the first and second adder-subtracters in the first cycle, that is, Z″=(Z+Z′)=(X+X
1's+1+Y+Y1's+1) using the first adder-subtracter in a second cycle, and makes a judgment such that the first adder-subtracter is normal in the case where every bit of the addition result is all zero “0” while making a judgment such that the first adder-subtracter has a failure in the case, where every bit of the addition result is other than zero “0”. 12. The processor according to any of
a first pseudo-random number generator which carries out random number generation processing for each operation cycle after inputting the first operand A stored in the first source register as the initial value so as to generate a newly first operand, and which stores the newly generated operand in the first source register; and
a second pseudo-random number generator which carries out random number generation processing for each operation cycle after inputting the second operand B stored in the second source register as the initial value so as to generate a newly second operand, and which stores the newly generated operand in the second source register
the self-diagnostic processing unit repeatedly carries out self-diagnostic processing in a manner that the first and second pseudo-random number generators generate new self-diagnostic data X and Y every when self-diagnostic processing using arbitrary self-diagnostic data X and Y having a predetermined bit length stored in the first and second source registers is normally completed.
13. The processor according to
a first source register which stores a first operand A;
a second source register which stores a second operand B;
a pseudo-random number generator which carries out random number generation processing for each operation cycle after inputting either of the first or second operand as the initial value so as to generate a new operand, and which stores the newly generated operand in the first source register;
a complement circuit which inverts an operand A outputted by the random number generator and which stores one's (1′s) complement A
1's in the second source register; a first adder-subtracter with carry input of being as a diagnostic object, which inputs the first operand B as a minuend and inputs the second operand A
1's as a subtrahend together with carry input, and adds “1” thereto one's (1′s) complement A1's so as to generate two's (2′s) complement A2's, and further, adds the generated complement B2's to the first operand A so as to carry out a subtraction C=(A−A) the self-diagnostic processing unit inputs an arbitrary self-diagnostic data X and X
1's having a predetermined bit length stored in the first and second source registers to the adder-subtracter together with the carry input, and carries out a subtraction Z=(X−X) as Z=(X+X2's)=(X+X1's+1), and further, makes a judgment such that the adder-subtracter is normal in the case where every bit of the subtraction result Z is all zero “0” while making a judgment such that the adder-subtracter has a failure in the case where every bit of the subtraction result Z is not all zero “0”. 14. The processor according to
a first source register which stores a first operand A;
a second source register which stores a second operand B;
a pseudo-random number generator which carries out random number generation processing for each operation cycle after inputting either of the first or second operand as the initial value so as to generate a new operand, and which stores the newly generated operand in the first source register;
a complement circuit which inverts an operand A outputted by the random number generator and adding “1” thereto so as to generate two's (2′s) complement A
2's, and which stores two's (2′s) complement A2's in the second source register; a adder-subtracter of being as a diagnostic object, which inputs the first operand A as a minuend and inputs the second operand A
2's as a subtrahend so as to carry out a subtraction C=(A−A) the self-diagnostic processing unit inputs an arbitrary self-diagnostic data X and X
1's having a predetermined bit length stored in the first and second source registers to the adder-subtracter together with the carry input, and carries out a subtraction Z=(X−X) as Z=(X+X2's)=(X+X1's+1), and further, makes a judgment such that the adder-subtracter is normal in the case where every bit of the subtraction result Z is all zero “0” while making a judgment such that the adder-subtracter has a failure in the case where every bit of the subtraction result Z is not all zero “0”.Description 1. Field of the Invention The present invention relates to a processor including a self-diagnostic function, and in particular, to a processor, which can carry out a self-diagnosis with respect to an adder-subtracter without requiring an expected value data which evaluates a diagnostic result. 2. Description of the Related Arts Conventionally, in a manufacture process of an integrated circuit such as a processor including a self-diagnostic function, a TAP (Test Access Port) controller is built in the integrated circuit as a self-diagnostic circuit. Further, in a wafer manufacture step and a package manufacture step, a self-diagnostic test is carried out with respect to a built-in RAM and a built-in arithmetic unit. In this manner, an integrated circuit having a manufacturing defect is found and removed, and thereafter, an integrated circuit passing the self-diagnostic test is used. By doing so, it is possible to prevent a wasteful build-up of LSI package and processor module, and thus, to improve a yield in a process after wafer manufacture. FIG. 1 is a view showing a basic hardware configuration of a conventional processor. An instruction memory management unit (IMMU) FIG. 2 is a view showing a basic configuration of the integer arithmetic unit including an instruction decoder in the processor shown in FIG. The processor including the arithmetic unit as described above is mounted with a self-diagnostic circuit, which is used for an adder-subtracter as shown in FIGS. 3A and 3B provided in the arithmetic unit In a processor mounted with the aforesaid self-diagnostic circuit, prior to the start of self-diagnosis, the TAP controller Moreover, the arithmetic circuit of FIGS. 3A and 3B is provided with linear feedback shift registers (LFSR) However, in an integrated circuit such as the processor including the arithmetic unit as described above, in the case where the integrated circuit is mounted with a self-diagnostic function for an arithmetic unit, a large-scale and complicate self-diagnostic circuit is required resulting from the following reason. Namely, in the case of carrying out a self-diagnostic test, the following processings must be carried out. More specifically, first, there is a need of reading a great number of self-diagnostic input data and a great number of expected value data obtained when an arithmetic unit is normally operated by a self-diagnosis using the input data from the external RAM or the like. Further, there is a need of repeating processing which compares a signature register value storing the arithmetic result based on the input data with the expected value. For this reason, in the case where the integrated circuit is mounted with a self-diagnostic function for an arithmetic unit, a silicon semiconductor used as a main body of the integrated circuit is made into a small size, and the number of chips capable of being manufactured from a wafer is increased so as to improve a yield. In this case, however, the large-scale and complicate self-diagnostic circuit is mounted on the integrated circuit; for this reason, it is impossible to make small a die size. As a result, the yield is reduced. Moreover, the die size is made small so as to realize a low power consumption of processor. In this case, however, the self-diagnostic circuit is a large scale and complicate; for this reason, a problem has arisen such that it is impossible to make small the die size, and therefore, to sufficiently realize a low power consumption. In addition, in a manufacture of integrated circuit such as processor or the like, a time allocating to a self-diagnostic test per processor is determined depending upon the number of products month by month. In accordance with the allocated time, an input data and an expected value data used for self-diagnosis are remade; for this reason, a problem has arise such that much labor and time are spent for the preparation. It is, therefore, an object of the present invention to provide a processor, which can carry out a self-diagnosis with respect to arithmetic unit using only input data without requiring an expected value data. In order to achieve the above object, the present invention relates to a processor including a self-diagnostic function. The processor comprises: an arithmetic circuit including an adder-subtracter, which is a diagnostic object; a data store unit which stores a self-diagnostic data; and a self-diagnostic processing unit which inputs the self-diagnostic data, and carrying out diagnostic processing so that every bit of operation result become all zero “0” or all “1” by the arithmetic circuit. According to the present invention, the arithmetic circuit and the self-diagnostic processing unit are constructed in a manner that in order to easily make a check, every bit of the operation result is all zero “0” (or all “1”) with respect to an arbitrary self-diagnostic input data. By doing so, there is no need of providing an expected value required for a conventional self-diagnosis and a comparator circuit for the expected value. Therefore, it is possible to make small a circuit scale required for realizing a self-diagnosis; as a result, a die side processor can be made small. Further, it is possible to realize an integrated circuit such as a processor mounted with a self-diagnostic function contributing to an improvement of yield of processor and low power consumption. In this case, the self-diagnostic processing unit carries out a self-diagnosis such that the operation result by the following addition and subtraction becomes all zero “0” when two input data are set as X and Y. (i) subtraction Z=X−Y (X: minuend, Y: subtrahend) (i) subtraction Z′=Y−X (Y: minuend, X: subtrahend) (ii) addition of two subtraction results Z″=Z′+Z (iii) If the addition result is all zero “0”, the adder-subtracter is normal, and if not so, the adder-subtracter has a failure. More specifically, the arithmetic circuit includes: a first source register which stores a first operand A; a second source register which stores a second operand B; a complement circuit (inverter) which inverts the second operand B so as to output one's (1′s) complement B The self-diagnostic processing unit carries out the following diagnostic processing with respect to the aforesaid arithmetic circuit using arbitrary self-diagnostic data X and Y having a predetermined bit length stored in the first and second source registers. (i) The self-diagnostic processing unit carries out a subtraction Z=(X−Y) as Z=(X+Y (ii) The self-diagnostic processing unit replaces the minuend X with the subtrahend Y each other, and carries out a subtraction Z′=(Y−X) as Z=(Y+X (iii) The self-diagnostic processing unit carries out an addition Z″ of the subtraction results Z and Z′ in the first and second cycles, that is, Z″=(Z+Z′)=(X+X (iv) The self-diagnostic processing unit makes a judgment such that the first adder-subtracter is normal in the case where every bit of the addition result is all zero “0” while making a judgment such that the first adder-subtracter has a failure in the case where every bit of the addition result is other than zero “0”. Moreover, according to another embodiment, the self-diagnostic processing unit carries out a self-diagnosis based on the following subtraction, conversion and comparative judgment when two input data are set as X and Y. (i) subtraction Z=X−Y (X: minuend, Y: subtrahend) (ii) subtraction Z′=Y−X (Y: minuend, X: subtrahend) (iii) calculation of two's (2′s) Z (iv) comparison of the subtraction result Z with Z′ Z=Z′ (v) If the comparative result is correspondent, the adder-subtracter is normal, and if not so, the adder-subtracter has a failure. More specifically, the arithmetic circuit includes: a first source register which stores a first operand A; a second source register which stores a second operand B; a first complement circuit which inverts the second operand B so as to output one's (1′s) complement B (i) The self-diagnostic processing unit carries out a subtraction Z=(X−Y) as Z=(X+Y (ii) The self-diagnostic processing unit replaces the minuend X with the subtrahend Y each other, and carries out a subtraction Z′=(Y−X) as Z=(Y+X The comparator makes a judgment in the following manner. More specifically,
The above formation is certified in the following manner.
So, from the above equation (2),
From the above equation (3),
Accordingly, when the above equations (4) and (5) are substituted for the above equation (1) and is transformed, the following equation is obtained. Then, when substituting the above equation (2) for the second term “−Y” of the right side, Therefore, the relation Z′ Various modifications may be possible with respect to the configuration of arithmetic circuit and self-diagnostic processing such that the operation result of the self-diagnosis becomes all zero “0” or is made correspondent. FIG. 1 is a block diagram showing a basic hardware configuration of a conventional processor; FIG. 2 is a block diagram showing a basic configuration of an integer arithmetic unit including an instruction decoder in the processor shown in FIG. 1; FIGS. 3A and 3B are block diagrams showings a configuration of a conventional adder-subtracter circuit including a self-diagnostic circuit; FIG. 4 is a block diagram showing a basic configuration of a processor according to the present invention; FIGS. 5A and 5B are circuit block diagrams showing a processor according to a first embodiment of the present invention; FIG. 6 is a circuit diagram showing a two-input adder-subtracter with carry input, shown in FIGS. 5A and 5B; FIGS. 7A and 7B are circuit block diagrams showing a processor according to a second embodiment of the present invention; FIGS. 8A and 8B are circuit block diagrams showing a processor according to a third embodiment of the present invention; FIGS. 9A and 9B are circuit block diagrams showing a processor according to a fourth embodiment of the present invention; FIGS. 10A and 10B are circuit block diagrams showing a processor according to a fifth embodiment of the present invention; FIGS. 11A and 11B are circuit block diagrams showing a processor according to a sixth embodiment of the present invention; FIGS. 12A and 12B are circuit block diagrams showing a processor according to a seventh embodiment of the present invention; FIGS. 13A and 13B are circuit block diagrams showing a processor according to an eighth embodiment of the present invention; FIGS. 14A and 14B are circuit block diagrams showing a processor according to a ninth embodiment of the present invention; FIGS. 15A and 15B are circuit block diagrams showing a processor according to a tenth embodiment of the present invention; FIGS. 16A and 16B are a circuit block diagrams showing a processor according to an eleventh embodiment of the present invention using a pseudo-random number generation; FIG. 17 is a circuit diagram showing a linear feedback shift register generating a pseudo-random number shown in FIGS. 16A and 16B; FIGS. 18A and 18B are a circuit block diagrams showing a processor according to a twelfth embodiment of the present invention using a pseudo-random number generation; FIGS. 19A and 19B are a circuit block diagrams showing a processor according to a thirteenth embodiment of the present invention using a pseudo-random number generation; FIGS. 20A and 20B are a circuit block diagrams showing a processor according to a fourteenth embodiment of the present invention using a pseudo-random number generation; FIGS. 21A and 21B are circuit block diagrams showing a processor according to a fifteenth embodiment of the present invention using a pseudo-random number generation; FIG. 22 is a circuit block diagram showing a processor according to a sixteenth embodiment of the present invention using a pseudo-random number generation; and FIGS. 23A and 23B are a circuit block diagrams showing a processor according to a seventeenth embodiment of the present invention using a pseudo-random number generation. FIG. 4 is a circuit block diagram showing a basic configuration of a processor according to the present invention. The processor with a self-diagnostic function according to the present invention includes an arithmetic circuit (i) subtraction Z=X−Y (X: minuend, Y: subtrahend) (ii) subtraction Z′=Y−X (Y: minuend, X: subtrahend) (iii) addition of two subtraction results Z″=Z+Z′=0 Then, when a confirmation is made such that every bit of the final operation result ZZ becomes zero “0”, the TAP controller According to another embodiment of the self-diagnostic processing of the present invention, the following subtraction, conversion and comparative judgment are carried out with respect to the above two input test data X and Y. (i) subtraction Z=X−Y (X: minuend, Y: subtrahend) (ii) subtraction Z′=Y−X (Y: minuend, X: subtrahend) (iii) calculate two's complement Z (iv) comparison of subtraction result with convention result Z=Z Then, when a confirmation is such that the above comparative result is correspondent, the TAP controller FIGS. 5A and 5B are circuit block diagrams showing a processor including a self-diagnostic function according to a first embodiment of the present invention. This first embodiment has the following constituent features; more specifically, the arithmetic circuit makes an operation so that every bit of its operation result becomes all zero “0”, and thereafter, the operation result is confirmed. The processor of the first embodiment is composed of an arithmetic circuit unit
The two-input adder-subtracter Now, referring again to FIGS. 5A and 5B, a destination register Next, the following is a description on an operation with respect to C=A+B by the addition instruction ADD of a normal operation instruction in the first embodiment of FIGS. 5A and 5B and C′=A−B by the subtraction instruction SUB. First, the first operand A and the second operand B of the operation instruction are read from the read port of the general register file The operation result of the adder-subtracter Next, the following is a description on an operation of the self-diagnostic test of the present invention. In the case of the self-diagnostic test, the TAP controller As a result, in the first cycle of self-diagnostic processing, the adder-subtracter
Then, the adder-subtracter Moreover, the multiplexer
In this case, the previous operation result, that is, the value of Z=X−Y is held in the destination register Thus, the all-zero detector FIGS. 7A and 7B are circuit block diagrams showing a processor including a self-diagnostic function according to a second embodiment of the present invention. The processor requires no comparison of an operation result with an expected value. This second embodiment has the following constituent features. More specifically, the following subtractions of Z=X−Y and Z′=Y−X are carried out with respect to two input test data X and Y, and thereafter, the first time operation result Z and two's (2′s) complement Z′
The above formation is certified in the following manner. In this case,
So, from the above equation (7),
From the above equation (8),
Accordingly, when the above equations (9) and (10) are substituted for the above equation (6) and is transformed, the following equation is obtained. Then, when substituting the above equation (7) for the second term “−Y” of the right side, Therefore, the relation Z′ FIGS. 8A and 8B are circuit block diagrams showing a processor including a self-diagnostic function according to a third embodiment of the present invention. This third embodiment has the following constituent features; more specifically, the processor is provided with a two-input adder-subtracter having no carry input, as a test object. The self-diagnostic processing unit Next, the following is a description on an operation of self-diagnostic test according to the third embodiment shown in FIGS. 8A and 8B. When the TAP controller
Thereafter, the subtraction result is held in the destination register
The second time subtraction result is held in the destination register The addition result FIGS. 9A and 9B are circuit block diagrams showing a processor including a self-diagnostic function according to a fourth embodiment of the present invention. This fourth embodiment has the following features; more specifically, the adder-subtracter Next, the following is a description on an operation of a self-diagnostic test according to the fourth embodiment shown in FIGS. 9A and 9B. The TAP controller
Thereafter, the subtraction result Z is held in the destination register
The second time subtraction result is held in the destination register Thus, the all-zero detector FIGS. 10A and 10B are circuit block diagrams showing a processor including a self-diagnostic function according to a fifth embodiment of the present invention. This fifth embodiment has the following features; more specifically, the adder-subtracter Next, the following is a description on an operation of a self-diagnostic test according to the fifth embodiment shown in FIGS. 10A and 10B. The TAP controller
Thereafter, the operation result Z is held in the destination register
The second time subtraction result Z″ is held in the destination register Thus, when making a detection such that every bit is all zero from the above operation result In contrast with the third embodiment shown in FIGS. 8A and 8B, according to the third embodiment, the self-diagnostic test operation is completed at two cycles. On the contrary, according to the fifth embodiment shown in FIGS. 10A and 10B, three cycles are required to complete the self-diagnostic test operation; for this reason, the self-diagnostic test operation becomes late. However, in the fifth embodiment shown in FIGS. 10A and 10B, there is no need of providing another adder-subtracter on the output stage of the adder-subtracter FIGS. 11A and 11B are circuit block diagrams showing a processor including a self-diagnostic function according to a sixth embodiment of the present invention. This sixth embodiment has the following features; more specifically, in one cycle of self-diagnostic test, a subtraction of two test data, that is, Z=X−Y and a subtraction replacing the test data, that is, Z′=Y−X are simultaneously carried out, and then, an addition of the above two subtraction results, that is, Z″=Z+Z′ is carried out. In this sixth embodiment, an input side of the two-input adder-subtracter Next, the following is a description on an operation of a self-diagnostic test according to the sixth embodiment shown in FIGS. 11A and 11B. When the TAP controller Thus, the all-zero detector FIGS. 12A and 12B are circuit block diagrams showing a processor including a self-diagnostic function according to a seventh embodiment of the present invention. This seventh embodiment has the following features; more specifically, in order to achieve high-speed processing, the self-diagnostic test processing performed at two cycles in the second embodiment shown in FIGS. 7A and 7B is completed at one cycle. According to this seventh embodiment, the arithmetic circuit Next, the following is a description on an operation of a self-diagnostic test according to the seventh embodiment of FIGS. 12A and 12B. When the TAP controller FIGS. 13A and 13B are circuit block diagrams showing a processor including a self-diagnostic function according to an eighth embodiment of the present invention. This eighth embodiment has the following features. More specifically, like the sixth embodiment shown in FIGS. 11A and 11B, a subtraction of test data X and Y and a subtraction replacing these data each other are concurrently carried out with respect to the adder-subtracter Next, the following is a description on an operation of a self-diagnostic test according to the eighth embodiment shown in FIGS. 13A and 13B. When the TAP controller Thus, the all-zero detector FIGS. 14A and 14B are circuit block diagrams showing a processor including a self-diagnostic function according to a ninth embodiment of the present invention. This ninth embodiment has the following features. More specifically, the adder-subtracter Next, the following is a description on an operation of a self-diagnostic test according to the ninth embodiment shown in FIGS. 14A and 14B. When the TAP controller Thus, the all-zero detector FIGS. 15A and 15B are circuit block diagrams showing a processor including a self-diagnostic function according to a tenth embodiment of the present invention. This tenth embodiment has the following features. More specifically, the adder-subtracter Next, the following is a description on an operation of a self-diagnostic test according to the tenth embodiment of FIGS. 15A and 15B. When the TAP controller Thus, the all-zero detector FIGS. 16A and 16B are circuit block diagrams showing a processor including a self-diagnostic function according to an eleventh embodiment of the present invention. This eleventh embodiment has the following constituent features; more specifically, a pseudo-random number is generated as a test data for self-diagnostic test by using a linear feedback shift register (LFSR) In this eleventh embodiment, linear feedback shift registers FIG. 17 is a view showing a circuit configuration of the linear feedback shift register which generates a pseudo-random number. For example, the linear feedback shift register Next, the following is a description on an operation of a self-diagnostic test according to the eleventh embodiment. When the TAP controller FIGS. 18A and 18B are circuit block diagrams showing a processor including a self-diagnostic function according to a twelfth embodiment of the present invention. This twelfth embodiment has the following constituent features. More specifically, in addition to the configuration of the second embodiment of FIGS. 7A and 7B comparing two subtraction results, the linear feedback shift registers FIGS. 19A and 19B are circuit block diagrams showing a processor including a self-diagnostic function according to a thirteenth embodiment of the present invention. This thirteenth embodiment has the following constituent features. More specifically, in addition to the configuration of the fourth embodiment of FIGS. 9A and 9B, the linear feedback shift registers FIGS. 20A and 20B are circuit block diagrams showing a processor including a self-diagnostic function according to a fourteenth embodiment of the present invention. This fourteenth embodiment has the following constituent features. More specifically, in addition to the configuration of the sixth embodiment of FIG. 11A and FIGS. 21A and 21B are circuit block diagrams showing a processor including a self-diagnostic function according to a fifteenth embodiment of the present invention. This fifteenth embodiment has the following constituent features. More specifically, in addition to the configuration of the fifth embodiment shown in FIGS. 10A and 10B, the linear feedback shift registers FIG. 22 is circuit block diagram showing a processor including a self-diagnostic function according to a sixteenth embodiment of the present invention. According to this sixteenth embodiment, a test data X is generated as a pseudo-random number from a single linear feedback shift register, and then, one test data X is inverted so as to obtain one's (1′s) complement X Next, the following is a description on an operation of a self-diagnostic test according to the sixteenth embodiment shown in FIG.
Subsequently, the adder-subtracter holds the operation result Z in the destination register FIG. 22 is circuit block diagram showing a processor including a self-diagnostic function according to a seventeenth embodiment of the present invention. In this seventeenth embodiment, basically, the same arithmetic circuit Next, the following is a description on an operation of a self-diagnostic test according to the seventeenth embodiment of FIGS. 23A and 23B. When the TAP controller
Subsequently, the adder-subtracter holds the operation result in the destination register As described above, the embodiments of the present invention have been described. Likewise, the present invention discloses the invention described below. A processor including a self-diagnostic function, comprising: an arithmetic circuit, and a self-diagnostic processing unit, the arithmetic circuit unit including: a first source register which stores a first operand A; a second source register which stores a second operand B; a pseudo-random number generator which carries out random number generation processing for each operation cycle after inputting either of the first or second operand as the initial value so as to generate a new operand, and which stores the newly generated operand in the first source register; a complement circuit which inverts an operand B outputted by the random number generator and adding “1” the operand B so as to generate two's (2′s) complement B a two-input adder-subtracter having no carry input, which adds the two's (2′s) complement B the self-diagnostic processing unit inputting an arbitrary self-diagnostic data X having a predetermined bit length stored in the first and second source registers, and two's (2′s) complement X As is evident from the above description, according to the present invention, the arithmetic circuit and the self-diagnostic processing unit are constructed in a manner that in order to easily make a check, every bit of the operation result is all zero “0” or all “1” with respect to an arbitrary self-diagnostic input data. By doing so, there is no need of providing an expected value required for a conventional self-diagnosis and a comparator circuit for the expected value. Therefore, it is possible to make small a circuit scale required for realizing a self-diagnosis; as a result, a die side processor can be made small. Further, it is possible to realize an integrated circuit such as a processor mounted with a self-diagnostic function contributing to an improvement of yield of processor and low power consumption. Moreover, in the case of reading test data from the external unit, no expected value is required; therefore, it is possible to shorten a time for reading the external data. Further, in the case where a time spent for self-diagnosis per one processor varies by an integrated circuit product plan such as a processor or the like, no preparation of expected value is required; therefore, it is possible to flexibly and readily meet the processor product plan. In the above embodiments, the arithmetic circuit and the self-diagnostic processing unit have been constructed in a manner that the operation result is all zero “0” in the self-diagnostic test. Likewise, in order to easily make a check of the operation result without using the expected value, the arithmetic circuit and the self-diagnostic processing unit may be constructed in a manner that the operation result is all “1”. The above construction which obtains all “1” of the operation result is the case of taking a negative logic construction in the above each embodiment. The present invention is not limited to the above embodiments, and includes proper modifications without diverging from the objects and advantages of the invention. Further, the present invention is not limited to numerical values shown in the above embodiments. Patent Citations
Non-Patent Citations
Referenced by
Classifications
Legal Events
Rotate |