Texas Instruments TMS320C6000 Programmer's Manual page 189

Hide thumbs Also See for TMS320C6000:
Table of Contents

Advertisement

Software Pipelining
Example 6–30. Assembly Code for Fixed-Point Dot Product (Software Pipelined With
Removal of Prolog and Epilog)
MVK
.S1
[A1] SUB
.S1
||
ZERO
.L1
||
ZERO
.L2
[A1] SUB
.S1
||[A1] B
.S2
||
ZERO
.L1
||
ZERO
.L2
[A1] SUB
.S1
||[A1] B
.S2
||
ZERO
.L1
||
ZERO
.L2
[A1] SUB
.S1
||[A1] B
.S2
[A1] SUB
.S1
||[A1] B
.S2
[A1] SUB
.S1
||[A1] B
.S2
LOOP:
ADD
.L1
||
ADD
.L2
||
MPY
.M1X
||
MPYH
.M2X
||[A1] SUB
.S1
||[A1] B
.S2
||
LDW
.D1
||
LDW
.D2
; Branch occurs here
ADD
6-52
57,A1
; set up loop counter
A1,1,A1
; decrement loop counter
A7
; zero out sum0 accumulator
B7
; zero out sum1 accumulator
A1,1,A1
;* decrement loop counter
LOOP
; branch to loop
A6
; zero out add input
B6
; zero out add input
A1,1,A1
;** decrement loop counter
LOOP
;* branch to loop
A2
; zero out mpy input
B2
; zero out mpy input
A1,1,A1
;*** decrement loop counter
LOOP
;** branch to loop
A1,1,A1
;**** decrement loop counter
LOOP
;*** branch to loop
A1,1,A1
;***** decrement loop counter
LOOP
;**** branch to loop
A6,A7,A7
; sum0 += (ai * bi)
B6,B7,B7
; sum1 += (ai+1 * bi+1)
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 fm memory
*B4++,B2
;******* ld bi & bi+1 fm memory
.L1X
A7,B7,A4
; sum = sum0 + sum1

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