Semiconductor device
View Patent ↗Provided is a semiconductor device including a test mode circuit capable of changing the semiconductor device into a test mode with fewer malfunctions and without providing a test terminal. The semiconductor device includes a test circuit configured to compare data of a data input terminal and a data output terminal in synchronization with clock, and control whether or not to change the semiconductor device into a test mode in accordance with a result of the comparison.
1. A semiconductor device, comprising:
a clock input terminal, to which a clock signal is input;
an instruction data input terminal, to which instruction data is input;
a data output terminal, to/from which data is input/output;
a plurality of data registers connected in series that temporarily holds the instruction input from the data input terminal in synchronization with the clock signal;
an instruction decoder that identifies whether data output from the plurality of data registers is a normal instruction or a test instruction, and when the data is a test instruction, outputs a test instruction signal;
a comparator that compares instruction data input to the data input terminal and data of the data output terminal in synchronization with the clock signal, and outputs a detected signal having a signal level responsive to relative signal levels of the instruction data and the data of the data output terminal;
a latch circuit that designates the detected signal output from the comparator as a set signal; and
a logic circuit capable of selecting whether the test instruction signal is to be output or not in accordance with a signal output from the latch circuit.
2. The semiconductor device according to claim 1 , wherein the comparator compares instruction data input to the data input terminal and data of the data output terminal at a time of rising of the clock signal.
3. The semiconductor device according to claim 2 further comprising a second comparator that compares instruction data input to the data input terminal and data of the data output terminal at a time of falling of the clock signal,
wherein the latch circuit designates a detected signal output from the comparator and a detected signal output from the second comparator as a set signal.