![Infineon Technologies XC2200 User Manual Download Page 161](http://html1.mh-extra.com/html/infineon-technologies/xc2200/xc2200_user-manual_2055439161.webp)
XC2200 Derivatives
System Units (Vol. 1 of 2)
Central Processing Unit (CPU)
User’s Manual
4-23
V2.1, 2008-08
CPUSV2_X, V2.2
CSFRs Affecting the Whole CPU
Some CSFRs affect the whole CPU or the pipeline before the Memory stage. The CPU-
SFRs CPUCON1, CP, SP, STKUN, STKOV, VECSEG, TFR, and PSW affect the overall
CPU function, while the CPU-SFRs IDX0, IDX1, QX1, QX0, DPP0, DPP1, DPP2, and
DPP3 only affect the DECODE, ADDRESS, and MEMORY stage when they are
modified
explicitly
. In this case the pipeline behavior depends on the instruction and
addressing mode used to modify the CSFR.
In the case of modification of these CSFRs by “POP CSFR” or by instructions using the
reg,#data16 addressing mode, a special mechanism is implemented to improve
performance during the initialization.
For further explanation, the instruction which modifies the CSFR can be called
“instruction_modify_CSFR”. This special case is detected in the DECODE stage when
the instruction_modify_CSFR enters the processing pipeline. Further on, instructions
described in the following list are held in the DECODE stage (all other instructions are
not held):
•
Instructions using long addressing mode (mem)
•
Instructions using indirect addressing modes ([R
w
], [R
w
+]…), except JMPI and CALLI
•
ENWDT, DISWDT, EINIT
•
All CoXXX instructions
If the CPUCON1, CP, SP, STKUN, STKOV, VECSEG, TFR, or the PSW are modified
and the instruction_modify_CSFR reaches the EXECUTE stage, the pipeline is
canceled. The modification affects the entire pipeline and the instruction prefetch. A
clean cancel and restart mechanism is required to guarantee a correct instruction flow.
In case of modification of IDX0, IDX1, QX1, QX0, DPP0, DPP1, DPP2, or DPP3 only the
DECODE, ADDRESS, and MEMORY stages are affected and the pipeline needs not to
be canceled. The modification does not affect the instructions in the ADDRESS,
MEMORY stage because they are not using this resource. Other kinds of instructions are
held in the DECODE stage until the CSFR is modified.
The following example shows a case in which the pipeline is stalled. The instruction
“MOV R6, R1” after the “MOV IDX1, #12” instruction which modifies the CSFR will be
held in DECODE Stage until the IDX1 register is updated. The next example shows an
optimized initialization routine.