XC2200 Derivatives
System Units (Vol. 1 of 2)
Central Processing Unit (CPU)
User’s Manual
4-20
V2.1, 2008-08
CPUSV2_X, V2.2
4.3.4
Pipeline Conflicts Caused by CPU-SFR Updates
CPU-SFRs control the CPU functionality and behavior. Changes and updates of CSFRs
influence the instruction flow in the pipeline. Therefore, special care is required to ensure
that instructions in the pipeline always work with the correct CSFR values. CSFRs are
updated late on the EXECUTE stage of the pipeline. Meanwhile, without conflict
detection, the instructions in the DECODE, ADDRESS, and MEMORY stages would still
work without updated register values. The CPU detects conflict cases and stalls the
pipeline to guarantee a correct execution. For performance reasons, the CPU
differentiates between different classes of CPU-SFRs. The flow of instructions through
the pipeline can be improved by following the given rules used for instruction re-ordering.
There are three classes of CPU-SFRs:
•
CSFRs not generating pipeline conflicts (ONES, ZEROS, MCW)
•
CSFR result registers updated late in the EXECUTE stage, causing one stall cycle
•
CSFRs affecting the whole CPU or the pipeline, causing canceling
CSFR Result Registers
The CSFR result registers MDH, MDL, MSW, MAH, MAL, and MRW of the ALU and
MAC-Unit are updated late in the EXECUTE stage of the pipeline. If an instruction
(except CoSTORE) accesses explicitly these registers in the memory stage, the value
cannot be forwarded. The instruction must be stalled for one cycle on the MEMORY
stage.