MCCNDD 16BitDest {, CNDF}
(continued)
Call Conditional Delayed
Pipeline
The MCCNDD instruction by itself is a single-cycle instruction. As shown in
,
for each call 6 instruction slots are executed; three before the call instruction (I2-I4) and
three after the call instruction (I5-I7). The total number of cycles for a call taken or not
taken depends on the usage of these slots. That is, the number of cycles depends on how
many slots are filled with a MNOP as well as which slots are filled. The effective number
of cycles for a call can, therefore, range from 1 to 7 cycles. The number of cycles for a call
taken may not be the same as for a call not taken.
Referring to the following code fragment and the pipeline diagrams in
, the instructions before and after MCCNDD have the following properties:
•
I1
– I1 is the last instruction that can effect the CNDF flags for the MCCNDD instruction.
The CNDF flags are tested in the D2 phase of the pipeline. That is, a decision is
made whether to branch or not when MCCNDD is in the D2 phase.
– There are no restrictions on the type of instruction for I1.
•
I2, I3 and I4
– The three instructions proceeding MCCNDD can change MSTF flags but will
have no effect on whether the MCCNDD instruction makes the call or not. This
is because the flag modification will occur after the D2 phase of the MCCNDD
instruction.
– These instructions must not be the following: MSTOP, MDEBUGSTOP, MBCNDD,
MCCNDD or MRCNDD.
•
I5, I6 and I7
– The three instructions following MBCNDD are always executed irrespective of
whether the branch is taken or not.
– These instructions must not be the following: MSTOP, MDEBUGSTOP, MBCNDD,
MCCNDD or MRCNDD.
<Instruction 1> ; I1 Last instruction that can affect flags for
; the MCCNDD operation
<Instruction 2> ; I2 Cannot be stop, branch, call or return
<Instruction 3> ; I3 Cannot be stop, branch, call or return
<Instruction 4> ; I4 Cannot be stop, branch, call or return
MCCNDD _func, NEQ ; Call to func if not eqal to zero
; Three instructions after MCCNDD are always
; executed whether the call is taken or not
<Instruction 5> ; I5 Cannot be stop, branch, call or return
<Instruction 6> ; I6 Cannot be stop, branch, call or return
<Instruction 7> ; I7 Cannot be stop, branch, call or return
<Instruction 8> ; I8 The address of this instruction is saved
; in the RPC field of the MSTF register.
; Upon return this value is loaded into MPC
; and fetching continues from this point.
<Instruction 9> ; I9
....
_func:
<Destination 1> ; d1 Can be any instruction
<Destination 2> ; d2
<Destination 3> ; d3
<Destination 4> ; d4 Last instruction that can affect flags for
; the MRCNDD operation
<Destination 5> ; d5 Cannot be stop, branch, call or return
<Destination 6> ; d6 Cannot be stop, branch, call or return
<Destination 7> ; d7 Cannot be stop, branch, call or return
MRCNDD UNC ; Return to <Instruction 8>, unconditional
; Three instructions after MRCNDD are always
; executed whether the return is taken or not
<Destination 8> ; d8 Cannot be stop, branch, call or return
<Destination 9> ; d9 Cannot be stop, branch, call or return
Control Law Accelerator (CLA)
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
TMS320x2806x Microcontrollers
611
Copyright © 2022 Texas Instruments Incorporated
Содержание TMS320 2806 Series
Страница 2: ......