
C165UTAH
Central Processor Unit
Data Sheet
60
2001-02-23
Particular Pipeline Effects
Since up to four different instructions are processed simultaneously, additional hardware
has been spent in the C165UTAH to consider all causal dependencies which may exist
on instructions in different pipeline stages without a loss of performance. This extra
hardware (ie. for 'forwarding' operand read and write values) resolves most of the
possible conflicts (eg. multiple usage of buses) in a time optimized way and thus avoids
that the pipeline becomes noticeable for the user in most cases. However, there are
some very rare cases, where the circumstance that the C165UTAH is a pipelined
machine requires attention by the programmer. In these cases the delays caused by
pipeline conflicts can be used for other instructions in order to optimize performance.
Context Pointer Updating
An instruction, which calculates a physical GPR operand address via the CP register, is
mostly not capable of using a new CP value, which is to be updated by an immediately
preceding instruction. Thus, to make sure that the new CP value is used, at least one
instruction must be inserted between a CP-changing and a subsequent GPR-using
instruction, as shown in the following example:
I
n
I
n+1
I
n+2
: SCXT CP, #0FC00h
: ....
: MOV R0, #dataX
; select a new context
; must not be an instruction using a GPR
; write to GPR 0 in the new context
Data Page Pointer Updating
An instruction, which calculates a physical operand address via a particular DPPn (n=0
to 3) register, is mostly not capable of using a new DPPn register value, which is to be
updated by an immediately preceding instruction. Thus, to make sure that the new DPPn
register value is used, at least one instruction must be inserted between a DPPn-
changing instruction and a subsequent instruction which implicitly uses DPPn via a long
or indirect addressing mode, as shown in the following example:
I
n
I
n+1
I
n+2
: MOV DPP0, #4
: ....
: MOV DPP0:0000H, R1
; select data page 4 via DPP0
; must not be an instruction using DPP0
; move contents of R1 to address location 01
’
0000
H
; (in data page 4) supposed segmentation is enabled
Explicit Stack Pointer Updating
None of the RET, RETI, RETS, RETP or POP instructions is capable of correctly using
a new SP register value, which is to be updated by an immediately preceding instruction.
Thus, in order to use the new SP register value without erroneously performed stack
accesses, at least one instruction must be inserted between an explicitly SP-writing and
any subsequent of the just mentioned implicitly SP-using instructions, as shown in the
following example:
I
n
: MOV SP, #0FA40H
; select a new top of stack