1. Field of the Invention
The present invention relates to an object, a method, or a manufacturing method. Further, the present invention relates to a process, a machine, manufacture, or a composition of matter. In particular, the present invention relates to, for example, a semiconductor device, a display device, a light-emitting device, a power storage device, a driving method thereof, or a manufacturing method thereof. In particular, the present invention relates to a semiconductor device including a register and a processing unit including the semiconductor device.
2. Description of the Related Art
The processing speed of a processing unit is significantly affected by the speed at which an arithmetic portion accesses data (the speed of reading operation and writing operation). For that reason, the processing unit is provided with a memory circuit called a register, which operates at high speed.
The arithmetic portion needs to execute an interrupt instruction in some cases. When the arithmetic portion executes an interrupt instruction, data in the register is temporarily stored in another memory circuit so that another data can be written to the register before the interrupt instruction is executed. After the interrupt instruction is executed, the stored data is restored to the register. The memory circuit in which data in the register can be temporarily stored is called a stack register, and is provided in the processing unit.
Note that the processing unit includes not only the arithmetic portion and the memory portion but also a control portion, a transmission path (also referred to as a bus), and the like. The control portion controls components of the processing unit, and the transmission path is a common signal line connecting the components. The transmission path is used when data is transferred between the register and the stack register, for example.
A semiconductor device that can hold stored data even without power supply and has an unlimited number of write cycles has been known (Patent Document 1).