Texas Instruments TMS320C6000 Programmer's Manual page 183

Hide thumbs Also See for TMS320C6000:
Table of Contents

Advertisement

Software Pipelining
Example 6–28. Assembly Code for Fixed-Point Dot Product (Software Pipelined
With No Extraneous Loads)
LDW
.D1
||
LDW
.D2
||
MVK
.S1
||
ZERO
.L1
||
ZERO
.L2
[A1] SUB
.S1
||
LDW
.D1
||
LDW
.D2
[A1] SUB
.S1
||[A1] B
.S2
||
LDW
.D1
||
LDW
.D2
[A1] SUB
.S1
||[A1] B
.S2
||
LDW
.D1
||
LDW
.D2
[A1] SUB
.S1
||[A1] B
.S2
||
LDW
.D1
||
LDW
.D2
MPY
.M1X
||
MPYH
.M2X
||[A1] SUB
.S1
||[A1] B
.S2
||
LDW
.D1
||
LDW
.D2
MPY
.M1X
||
MPYH
.M2X
||[A1] SUB
.S1
||[A1] B
.S2
||
LDW
.D1
||
LDW
.D2
6-46
ADDSPs all execute exactly 50 times. (The shaded areas of Example 6–29 in-
dicate the changes in this code.)
Executing the dot product code in Example 6–29 with no extraneous LDDWs
still requires a total of 74 cycles (9 + 41 + 9 + 15), but the code size is now larg-
er.
*A4++,A2
; load ai & ai+1 from memory
*B4++,B2
; load bi & bi+1 from memory
43,A1
; set up loop counter
A7
; zero out sum0 accumulator
B7
; zero out sum1 accumulator
A1,1,A1
; decrement loop counter
*A4++,A2
;* load ai & ai+1 from memory
*B4++,B2
;* load bi & bi+1 from memory
A1,1,A1
;* decrement loop counter
LOOP
; branch to loop
*A4++,A2
;** load ai & ai+1 from memory
*B4++,B2
;** load bi & bi+1 from memory
A1,1,A1
;** decrement loop counter
LOOP
;* branch to loop
*A4++,A2
;*** load ai & ai+1 from memory
*B4++,B2
;*** load bi & bi+1 from memory
A1,1,A1
;*** decrement loop counter
LOOP
;** branch to loop
*A4++,A2
;**** load ai & ai+1 from memory
*B4++,B2
;**** load bi & bi+1 from memory
A2,B2,A6
; ai * bi
A2,B2,B6
; ai+1 * bi+1
A1,1,A1
;**** decrement loop counter
LOOP
;*** branch to loop
*A4++,A2
;***** ld ai & ai+1 from memory
*B4++,B2
;***** ld bi & bi+1 from memory
A2,B2,A6
;* ai * bi
A2,B2,B6
;* ai+1 * bi+1
A1,1,A1
;***** decrement loop counter
LOOP
;**** branch to loop
*A4++,A2
;****** ld ai & ai+1 from memory
*B4++,B2
;****** ld bi & bi+1 from memory

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C6000 and is the answer not in the manual?

Questions and answers

Table of Contents