Semiconductor device and electronic device
A semiconductor device that restores degraded data is provided. The semiconductor device includes a first circuit, a storage portion, and an arithmetic portion. The first circuit includes a current source and a first switch. The storage portion includes a first transistor and a first capacitor. The arithmetic portion includes a second transistor. A first terminal of the first transistor is electrically connected to a control terminal of the first switch, a first terminal of the first switch is electrically connected to an output terminal of the current source, and a second terminal of the first switch is electrically connected to a first terminal of the second transistor. When data retained in the arithmetic portion is restored, the first transistor is turned on, and the data retained in the storage portion is supplied to the control terminal of the first switch through the first transistor. The first switch is brought into an on state or an off state in accordance with the data and supplies current from the current source to the arithmetic portion through the second transistor to supply electric charge to a retention portion of the arithmetic portion.
1. A semiconductor device comprising:
a first circuit;
a second circuit; and
a third circuit,
wherein the first circuit comprises a current source and a first switch,
wherein the second circuit comprises a first transistor, a third transistor, a fourth transistor, and a first capacitor,
wherein the third circuit comprises a second transistor,
wherein a first terminal of the first transistor is electrically connected to a control terminal of the first switch,
wherein a second terminal of the first transistor is electrically connected to a first terminal of the fourth transistor,
wherein a second terminal of the fourth transistor is electrically connected to a first terminal of the first capacitor,
wherein a gate of the fourth transistor is electrically connected to a second terminal of the first capacitor and a first terminal of the third transistor,
wherein a first terminal of the first switch is electrically connected to an output terminal of the current source, and
wherein a second terminal of the first switch is electrically connected to a first terminal of the second transistor.
2. The semiconductor device according to claim 1 , further comprising a fourth circuit,
wherein the fourth circuit comprises a latch circuit.
3. A semiconductor device comprising:
a first circuit;
a second circuit;
a third circuit; and
a sense amplifier,
wherein the first circuit comprises a current source and a first switch,
wherein the second circuit comprises a first transistor and a first capacitor,
wherein the third circuit comprises a second transistor,
wherein a first terminal of the first transistor is electrically connected to a control terminal of the first switch through the sense amplifier,
wherein a second terminal of the first transistor is electrically connected to a first terminal of the first capacitor,
wherein a first terminal of the first switch is electrically connected to an output terminal of the current source, and
wherein a second terminal of the first switch is electrically connected to a first terminal of the second transistor.
4. The semiconductor device according to claim 1 , wherein a gate of the first transistor is electrically connected to a gate of the second transistor.
5. A semiconductor device comprising:
a first circuit;
a second circuit; and
a third circuit;
wherein the first circuit comprises a current source and a first switch,
wherein the second circuit comprises a first transistor, a third transistor, and a first capacitor,
wherein the third circuit comprises a second transistor,
wherein a first terminal of the first transistor is electrically connected to a control terminal of the first switch,
wherein a first terminal of the third transistor is electrically connected to a first terminal of the first capacitor and a gate of the first transistor,
wherein a first terminal of the first switch is electrically connected to an output terminal of the current source, and
wherein a second terminal of the first switch is electrically connected to a first terminal of the second transistor.
6. The semiconductor device according to claim 5 , further comprising a fourth circuit,
wherein the fourth circuit comprises a latch circuit.
7. The semiconductor device according to claim 5 , wherein a second terminal of the first capacitor is electrically connected to a gate of the second transistor.
8. A semiconductor device, comprising:
a first circuit; and
a fifth circuit,
wherein the first circuit comprises a first current source, a second current source, a first switch, a fifth transistor, and a sixth transistor,
wherein the fifth circuit comprises a seventh transistor, an eighth transistor, a second capacitor, a second switch, a third switch, and a current comparison circuit,
wherein an output terminal of the first current source is electrically connected to a first terminal of the first switch,
wherein an output terminal of the second current source is electrically connected to a gate of the fifth transistor, a gate of the sixth transistor, and a first terminal of the sixth transistor,
wherein a first terminal of the seventh transistor is electrically connected to a first terminal of the eighth transistor, a first terminal of the second switch, and a first terminal of the third switch,
wherein a gate of the seventh transistor is electrically connected to a second terminal of the eighth transistor and a first terminal of the second capacitor,
wherein a second terminal of the first switch is electrically connected to a second terminal of the second switch,
wherein a first terminal of the current comparison circuit is electrically connected to a second terminal of the third switch, and
wherein a second terminal of the current comparison circuit is electrically connected to a first terminal of the fifth transistor.
9. A semiconductor device comprising:
a first circuit; and
a fifth circuit,
wherein the first circuit comprises a first current source, a third current source, a first switch, and a fourth switch,
wherein the fifth circuit comprises a seventh transistor, an eighth transistor, a second capacitor, a second switch, a third switch, a fifth switch, and a current comparison circuit,
wherein an output terminal of the first current source is electrically connected to a first terminal of the first switch,
wherein an input terminal of the third current source is electrically connected to a first terminal of the fourth switch,
wherein a first terminal of the seventh transistor is electrically connected to a first terminal of the eighth transistor, a first terminal of the second switch, and a first terminal of the third switch,
wherein a gate of the seventh transistor is electrically connected to a second terminal of the eighth transistor and a first terminal of the second capacitor,
wherein a second terminal of the first switch is electrically connected to a second terminal of the second switch,
wherein a second terminal of the fourth switch is electrically connected to a first terminal of the fifth switch,
wherein a first terminal of the current comparison circuit is electrically connected to a second terminal of the third switch, and
wherein a second terminal of the current comparison circuit is electrically connected to a second terminal of the fifth switch.
10. The semiconductor device according to claim 8 ,
wherein the seventh transistor comprises silicon in a channel formation region, and
wherein the eighth transistor comprises a metal oxide in a channel formation region.
11. The semiconductor device according to claim 9 ,
wherein the fifth circuit further comprises a ninth transistor, a tenth transistor, a third capacitor, and a sixth switch,
wherein a first terminal of the ninth transistor is electrically connected to a first terminal of the tenth transistor, a first terminal of the second switch, and a first terminal of the sixth switch,
wherein a gate of the ninth transistor is electrically connected to a second terminal of the tenth transistor and a first terminal of the third capacitor,
wherein a second terminal of the sixth switch is electrically connected to a first terminal of the fifth switch and a second terminal of the fourth switch, and
wherein a gate of the eighth transistor is not directly connected to a gate of the tenth transistor.
12. The semiconductor device according to claim 11 ,
wherein each of the seventh transistor and the ninth transistor comprises silicon in a channel formation region, and
wherein each of the eighth transistor and the tenth transistor comprises a metal oxide in a channel formation region.
13. The semiconductor device according to claim 3 , wherein a gate of the first transistor is electrically connected to a gate of the second transistor.
14. The semiconductor device according to claim 1 , wherein each of the first transistor, the third transistor, and the fourth transistor comprises a metal oxide in a channel formation region.
15. The semiconductor device according to claim 3 , wherein the first transistor comprises a metal oxide in a channel formation region.
16. The semiconductor device according to claim 5 , wherein each of the first transistor and the third transistor comprises a metal oxide in a channel formation region.