Linear Assembly Resource Allocation - Texas Instruments TMS320C6000 Programmer's Manual

Hide thumbs Also See for TMS320C6000:
Table of Contents

Advertisement

Loop Carry Paths
6.7.4.2 New 'C6x Instructions (Inner Loop)
Example 6–43. Linear Assembly for IIR Inner Loop With Reduced Loop Carry Path
LDH
*xptr++,xi
MPY
c1,xi,p0
LDH
*xptr,xi+1
MPY
c2,xi+1,p1
ADD
p0,p1,s0
MPY
c3,y,p2
ADD
s0,p2,s1
SHR
s1,15,y
STH
y,*yptr++
[cntr]SUB
cntr,1,cntr
[cntr]B
LOOP
6.7.5

Linear Assembly Resource Allocation

Example 6–44. Linear Assembly for IIR Inner Loop (With Allocated Resources)
LDH
.D1
MPY
.M1
LDH
.D1
MPY
.M1X
ADD
.L1
MPY
.M2X
ADD
.L2X
SHR
.S2
STH
.D2
[A1] SUB
.L1
[A1] B
.S1
6-82
Example 6–43 shows the new linear assembly from the graph in Figure 6–16,
where LDH yi was removed. The one variable y that is read and written is yi
for the MPY p2 instruction and yi+1 for the SHR and STH instructions.
; xi+1
; c1 * xi
; xi+1
; c2 * xi+1
; c1 * xi + c2 * xi+1
; c3 * yi
; c1 * xi + c2 * xi+1 + c3 * yi
; yi+1
; store yi+1
; decrement loop counter
; branch to loop
Example 6–44 shows the same linear assembly instructions as those in
Example 6–43 with the functional units and registers assigned.
*A4++,A2
; xi+1
A6,A2,A5
; c1 * xi
*A4,A3
; xi+1
B6,A3,A7
; c2 * xi+1
A5,A7,A9
; c1 * xi + c2 * xi+1
A8,B2,B3
; c3 * yi
B3,A9,B5
; c1 * xi + c2 * xi+1 + c3 * yi
B5,15,B2
; yi+1
B2,*B4++
; store yi+1
A1,1,A1
; decrement loop counter
LOOP
; branch to loop

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