User’s Manual
C166S V1 SubSystem
Central Processing Unit
User’s Manual
3-5
V 1.6, 2001-08
3.2
CPU Special-Function Registers
The core CPU requires a set of CPU Special-Function Registers (CSFRs) to maintain
the system state information, to control system and bus configuration, and to manage
code memory segmentation and data memory paging. The CPU also uses CSFRs to
access the General-Purpose Registers (GPRs) and the System Stack, to supply the ALU
with register-addressable constants, and to support multiply and divide ALU operations.
The access mechanism for these CSFRs in the CPU core is identical to the access
mechanism for any other SFR. Since all SFRs can be controlled by any instruction that
is capable of addressing the SFR/CSFR memory space, there is no need for special
system control instructions.
However, to ensure proper processor operations, certain restrictions on the user access
to some CSFRs must be applied. For example, the Instruction Pointer (IP) and Code
Segment Pointer (CSP) registers cannot be accessed directly at all. They can only be
changed indirectly via branch instructions.
The Program Status Word (PSW), Stack Pointer (SP), and Multiply/Divide Control
Register (MDC) registers can be modified explicitly by the programmer, and implicitly by
the CPU during normal instruction processing.
Note: Note that any explicit write request (via software) to a (C)SFR supersedes a
simultaneous modification by hardware of the same register.
Note: All (C)SFRs may be accessed word-wise, or byte-wise (some of them even
bitwise). Reading bytes from word (C)SFRs is a non-critical operation. Any write
operation to a single byte of an (C)SFR clears the non-addressed complementary
byte within the specified (C)SFR.
Non-implemented (reserved) (C)SFR-Bits cannot be modified, and will always
supply a read value of 0. Non-implemented (C)SFR will always supply a read
value of FFFF
H
.
Programming Hints
Access to SFRs
All SFRs reside in dedicated page of the memory space. The following addressing
mechanisms allow to access the (C)SFRs:
• indirect or direct addressing with 16-bit (mem) addresses must guarantee that the
used data page pointer (DPP0...DPP3) selects data page 3.
• accesses via the Peripheral Event Controller (PEC) use the SRCPx and DSTPx
pointers instead of the data page pointers.
• short 8-bit (reg) addresses to the standard SFR area do not use the data page
pointers but directly access the registers within this 512 Byte area.
• short 8-bit (reg) addresses to the extended ESFR area require switching to the 512
Byte extended SFR area. This is done via the EXTension instructions EXTR,
EXTP(R), EXTS(R).
Содержание C166S V1 SubSystem
Страница 10: ...User s Manual C166S V1 SubSystem User s Manual I 6 V 1 6 2001 08...
Страница 16: ...User s Manual C166S V1 SubSystem Introduction User s Manual 1 6 V 1 6 2001 08...
Страница 126: ...User s Manual C166S V1 SubSystem Central Processing Unit User s Manual 3 96 V 1 6 2001 08...
Страница 178: ...User s Manual C166S V1 SubSystem Memory Organization User s Manual 4 52 V 1 6 2001 08...
Страница 206: ...User s Manual C166S V1 SubSystem Instruction Set User s Manual 5 28 V 1 6 2001 08...
Страница 306: ...User s Manual C166S V1 SubSystem Detailed Instruction Set User s Manual 6 100 V 1 6 2001 08...
Страница 362: ...User s Manual C166S V1 SubSystem The External Bus Interface User s Manual 8 40 V 1 6 2001 08...
Страница 452: ...User s Manual C166S V1 SubSystem General Purpose Timer Unit User s Manual 12 44 V 1 6 2001 08...
Страница 454: ...User s Manual C166S V1 SubSystem Instruction Index User s Manual 13 2 V 1 6 2001 08...
Страница 459: ......