Optimizing the Pipeline
www.ti.com
Example 3-15. Floating-Point Code With Pipeline Optimization
; Using non-conflicting instructions for alignment cycles,
; calculate the following:
;
; Y1 = M1*X1 + B1
; Y2 = M2*X2 + B2
;
MOV32
R2H,@X1
; Load R2H with X1 - single cycle
MOV32
R1H,@M1
; Load R1H with M1 - single cycle
MPYF32
R3H,R2H,R1H
; R3H = M1 * X1
- 2p operation
|| MOV32
R0H,@M2
; Load R0H with M2 - single cycle
MOV32
R1H,@X2
; Load R1H with X2 - single cycle
; <-- MPYF32 completes, R3H is valid
MPYF32
R0H,R1H,R0H
; R0H = M2 * X2
- 2p operation
|| MOV32
R4H,@B1
; Load R4H with B1 - single cycle
; <-- MOV32 completes, R4H is valid
ADDF32
R1H,R4H,R3H
; R1H = B1 + M1*X1 - 2p operation
|| MOV32
R2H,@B2
; Load R2H with B2 - single cycle
; <-- MPYF32 completes, R0H is valid
ADDF32
R0H,R2H,R0H
; R0H = B2 + M2*X2 - 2p operation
; <-- ADDF32 completes, R1H is valid
MOV32
@Y1,R1H
; Store Y1
; <-- ADDF32 completes, R0H is valid
MOV32
@Y2,R0H
; Store Y2
;
9 cycles
; 36 bytes
Pipeline
28
SPRUEO2A – June 2007 – Revised August 2008
Summary of Contents for TMS320C28 series
Page 2: ...2 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...
Page 12: ...Introduction 12 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...
Page 20: ...CPU Register Set 20 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...
Page 136: ...Instruction Set 136 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...