Software Pipelining
6-30
Figure 6–9. Dependency Graph of Fixed-Point Dot Product With LDW
(Showing Functional Units)
B side
A side
LDW
LDW
bi & bi+1
ai & ai+1
pi+1
pi
5
5
5
5
2
2
ADD
ADD
SUB
sum0
sum1
cntr
LOOP
1
1
B
MPYH
MPY
1
1
.D1
.D2
.M2X
.L2
.M1X
.L1
.S1
.S2
Example 6–21. Linear Assembly for Fixed-Point Dot Product Inner Loop
(With Conditional SUB Instruction)
LDW
.D1
*A4++,A2
; load ai and ai+1 from memory
LDW
.D2
*B4++,B2
; load bi and bi+1 from memory
MPY
.M1X
A2,B2,A6
; ai * bi
MPYH
.M2X
A2,B2,B6
; ai+1 * bi+1
ADD
.L1
A6,A7,A7
; sum0 += (ai * bi)
ADD
.L2
B6,B7,B7
; sum1 += (ai+1 * bi+1)
[A1] SUB
.S1
A1,1,A1
; decrement loop counter
[A1] B
.S2
LOOP
; branch to top of loop