Memory Banks
6-128
6.12.7 Determining the Minimum Iteration Interval
Based on Table 6–24, the minimum iteration interval for the FIR filter with no
memory hits
should be 4. An iteration interval of 4 means that two multiply/ac-
cumulates still execute per cycle.
Table 6–24. Resource Table for FIR Filter Code
(a) A side
(b) B side
Unit(s)
Instructions
Total/Unit
Unit(s)
Instructions
Total/Unit
.M1
4 MPYs
4
.M2
4 MPYs
4
.S1
0
.S2
B
1
.D1
4 LDHs
4
.D2
4 LDHs
4
.L1, .S1, or .D1
4 ADDs
4
.L2, .S2, or .D2
4 ADDs and SUB
5
Total non-.M units
8
Total non-.M units
10
1X paths
4
2X paths
4
6.12.8 Final Assembly
Example 6–69 shows the final assembly to the FIR filter with redundant load
elimination and no memory hits. At the end of the inner loop, there is a branch
to OUTLOOP to execute the next outer loop. The outer loop counter is set to
50 because iterations j and j+1 are executing each time the inner loop is run.
The inner loop counter is set to 8 because iterations i, i + 1, i + 2, and i + 3 are
executing each inner loop iteration.
6.12.9 Comparing Performance
The cycle count for this nested loop is 2402 cycles. There is a rather large
outer-loop overhead for executing the branch to the outer loop (6 cycles) and
the inner loop prolog (10 cycles). Section 6.13 addresses how to reduce this
overhead by software pipelining the outer loop.
Table 6–25. Comparison of FIR Filter Code
Code Example
Cycles
Cycle Count
Example 6–64
FIR with redundant load elimination
50 (16
2 + 9 + 6) + 2
2352
Example 6–69
FIR with redundant load elimination and no
memory hits
50 (8
4 + 10 + 6) + 2
2402