Redundant Load Elimination
6-114
6.11.4 Determining the Minimum Iteration Interval
Table 6–23 shows that the minimum iteration interval is 2. An iteration interval
of 2 means that two multiply-accumulates are executing per cycle.
Table 6–23. Resource Table for FIR Filter Code
(a) A side
(b) B side
Unit(s)
Instructions
Total/Unit
Unit(s)
Instructions
Total/Unit
.M1
2 MPYs
2
.M2
2 MPYs
2
.S1
0
.S2
B
1
.D1
2 LDHs
2
.D2
2 LDHs
2
.L1, .S1, or .D1
2 ADDs
2
.L2, .S2, .D2
2 ADDs and SUB
3
Total non-.M units
4
Total non-.M units
6
1X paths
2
2X paths
2
6.11.5 Linear Assembly Resource Allocation
Example 6–63 shows the linear assembly with functional units and registers
assigned.
Example 6–63. Linear Assembly for Full FIR Code
.global _fir
_fir:
.cproc x, h, y
.reg
x_1, h_1, sum0, sum1, ctr, octr
.reg
p00, p01, p10, p11, x0, x1, h0, h1, rstx, rsth
ADD
h,2,h_1
; set up pointer to h[1]
MVK
50,octr
; outer loop ctr = 100/2
MVK
64,rstx
; used to rst x pointer each outer loop
MVK
64,rsth
; used to rst h pointer each outer loop
OUTLOOP:
ADD
x,2,x_1
; set up pointer to x[j+1]
SUB
h_1,2,h
; set up pointer to h[0]
MVK
16,ctr
; inner loop ctr = 32/2
ZERO
sum0
; sum0 = 0
ZERO
sum1
; sum1 = 0
[octr]
SUB
octr,1,octr
; decrement outer loop counter
LDH
.D1
*x++[2],x0
; x0 = x[j]