![Infineon Technologies XC2200 Скачать руководство пользователя страница 169](http://html1.mh-extra.com/html/infineon-technologies/xc2200/xc2200_user-manual_2055439169.webp)
XC2200 Derivatives
System Units (Vol. 1 of 2)
Central Processing Unit (CPU)
User’s Manual
4-31
V2.1, 2008-08
CPUSV2_X, V2.2
4.5.1
GPR Addressing Modes
Because the GPRs are the working registers and are accessed frequently, there are
three possible ways to access a register bank:
•
Short GPR Address
(mnemonic: Rw or Rb)
•
Short Register Address
(mnemonic: reg or bitoff)
•
Long Memory Address
(mnemonic: mem), for the global bank only
Short GPR Addresses
specify the register offset within the current register bank
(selected via bitfield BANK). Short 4-bit GPR addresses can access all sixteen registers,
short 2-bit addresses (used by some instructions) can access the lower four registers.
Depending on whether a relative word (Rw) or byte (Rb) GPR address is specified, the
short GPR address is either multiplied by two (Rw) or not (Rb) before it is used to
physically access the register bank. Thus, both byte and word GPR accesses are
possible in this way.
Note: GPRs used as indirect address pointers are always accessed wordwise.
For the local register banks the resulting offset is used directly, for the global register
bank the resulting offset is logically added to the contents of register CP which points to
the memory location of the base of the current global register bank (see
).
Short 8-Bit Register Addresses
within a range from F0
H
to FF
H
interpret the four least
significant bits as short 4-bit GPR addresses, while the four most significant bits are
ignored. The respective physical GPR address is calculated in the same way as for short
4-bit GPR addresses. For single bit GPR accesses, the GPR’s word address is
calculated in the same way. The accessed bit position within the word is specified by a
separate additional 4-bit value.
Figure 4-7
Implicit CP Use by Logical Short GPR Addressing Modes
1
4-Bit GPR
Address
MCA04922
0
11
1
1
1 1
12-Bit Context Pointer
Specified by reg or bitoff
*1
*2
+
For word GPR
accesses
For byte
GPR
accesses
GPRs
Must be
within
the internal
DPRAM area
Internal
DRAM