108
Chapter 3
CPU System Functions
Preliminary User’s Manual U17566EE1V2UM00
(1)
PC - Program counter
The program counter holds the instruction address during program execution.
The lower 26 bits are valid, and bits 31 to 26 are fixed to 0. If a carry occurs
from bit 25 to 26, it is ignored. Branching to an odd address cannot be
performed. Bit 0 is fixed to 0.
Access
This register can not be accessed by any instruction.
Initial Value
0000 0000
H
. The program counter is cleared by any reset.
(2)
EIPC, FEPC, DBPC, CTPC - PC saving registers
The PC saving registers save the contents of the program counter for different
occasions, see
Table 3-4
.
When one of the occasions listed in
Table 3-4
occurs, except for some
instructions, the address of the instruction following the one being executed is
saved to the saving registers.
For more details refer to
Table 3-9 on page 112
and to the
“Interrupt Controller
(INTC)“ on page 187
.
All PC saving registers are built up as the PC, with the initial value 0xxx xxxx
H
(x = undefined).
Note
When multiple interrupt servicing is enabled, the contents of EIPC or FEPC
must be saved by program—because only one PC saving register for
maskable interrupts and non-maskable interrupts is provided, respectively.
Caution
When setting the value of any of the PC saving registers, use even values
(bit 0 = 0). If bit 0 is set to 1, the setting of this bit is ignored.
This is because bit 0 of the program counter is fixed to 0.
31
26
25
1
0
fixed to 0
instruction address during execution
0
Table 3-4
PC saving registers
Register
Shortcut Saves contents of PC in case of
Status saving register
during interrupt
EIPC
•
software exception
•
maskable interrupt
Status saving register
during non-maskable
interrupts
FEPC
•
non-maskable interrupt
Status saving register
during exception/debug
trap
DBPC
a
a)
Reading from this register is only enabled between a DBTRAP exception (excep-
tion handler address 0000 0060
H
) and the exception handler terminating DBRET
instruction. DBTRAP exceptions are generated upon ILGOP and ROM Correction
detections (refer to
“Interrupt Controller (INTC)“ on page 187
and
“ROM Correction
Function (ROMC)“ on page 331
).
•
exception trap
•
debug trap
•
debug break
•
during a single-step operation
Status saving register
during CALLT execution
CTPC
•
execution of CALLT instruction
electronic components distributor