摘要 |
PROBLEM TO BE SOLVED: To provide a semiconductor device capable of reducing the area scale of a circuit that is unnecessary in normal operation.SOLUTION: A semiconductor device includes a first circuit and a second circuit. The first circuit includes: a third circuit that stores a singular or a plurality of combinations of first data, which contains a history about whether or not a branch condition of a branch instruction is satisfied, and first address corresponding to the branch instruction; a fourth circuit that compares a second address of the instruction and the first address; and a fifth circuit that selects the first data of one combination out of the singular or the plurality of combinations. The second circuit includes a plurality of sixth circuits which include the functions of: generating a signal for testing the operation of the circuit by controlling a mutual conduction state and the logic value of an output signal with respect to the logic value of an input signal according to second data; and storing the singular or the plurality of combinations together with the second circuit after the operation is tested according to the signal. |