3.5
Parallel Instructions
3.6
Invalid Delay Instructions
Parallel Instructions
www.ti.com
Parallel instructions are single opcodes that perform two operations in parallel. This can be a math
operation in parallel with a move operation, or two math operations in parallel. Math operations with a
parallel move are referred to as 2p/1 instructions. The math portion of the operation takes 2 pipelined
cycles while the move portion of the operation is single cycle. This means that NOPs or other non
conflicting instructions must be inserted to align the math portion of the operation. An example of an add
with parallel move instruction is shown in
Example 3-5. 2p/1 Parallel Instruction Software Pipeline Alignment
;
ADDF32 || MOV32 instruction: 32-bit floating-point add with parallel move
;
ADDF32 is a 2p operation
;
MOV32
is a 1 cycle operation
;
ADDF32
R0H, R1H, #2
; R0H = R1H + 2, 2 pipeline cycle operation
|| MOV32
R1H, @Val
; R1H gets the contents of Val, single cycle operation
; <-- MOV32 completes here (R1H is valid)
NOP
; 1 cycle delay or non-conflicting instruction
; <-- ADDF32 completes here (R0H is valid)
NOP
; Any instruction
Parallel math instructions are referred to as 2p/2p instructions. Both math operations take 2 cycles to
complete. This means that NOPs or other non conflicting instructions must be inserted to align the both
math operations. An example of a multiply with parallel add instruction is shown in
Example 3-6. 2p/2p Parallel Instruction Software Pipeline Alignment
;
MPYF32 || ADDF32 instruction: 32-bit floating-point multiply with parallel add
;
MPYF32 is a 2p operation
;
ADDF32 is a 2p cycle operation
;
MPYF32
R0H, R1H, R3H
; R0H = R1H * R3H, 2 pipeline cycle operation
|| ADDF32
R1H, R2H, R4H
; R1H = R2H + R4H, 2 pipeline cycle operation
NOP
; 1 cycle delay or non-conflicting instruction
; <-- MPYF32 and ADDF32 complete here (R0H and R1H are valid)
NOP
; Any instruction
Most instructions can be used in delay slots as long as source and destination register conflicts are
avoided. The C28x+FPU assembler will issue an error anytime you use an conflicting instruction within a
delay slot. The following guidelines can be used to avoid these conflicts.
Note:
Destination register conflicts in delay slots:
Any operation used for pipeline alignment delay must not use the same destination register
as the instruction requiring the delay. See
In
the MPYF32 instruction uses R2H as its destination register. The next instruction should
not use R2H as its destination. Since the MOV32 instruction uses the R2H register a pipeline conflict will
be issued by the assembler. This conflict can be resolved by using a register other than R2H for the
MOV32 instruction as shown in
.
Pipeline
24
SPRUEO2A – June 2007 – Revised August 2008
Содержание TMS320C28 series
Страница 2: ...2 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...
Страница 12: ...Introduction 12 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...
Страница 20: ...CPU Register Set 20 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...
Страница 136: ...Instruction Set 136 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...