Software Pipelining
6-32
6.5.1
Modulo Iteration Interval Scheduling
Another way to represent the performance of the code is by looking at it in a
modulo iteration interval scheduling table. This table shows how a
software-pipelined loop executes and tracks the available resources on a
cycle-by-cycle basis to ensure that no resource is used twice on any given
cycle. The
iteration interval of a loop is the number of cycles between the initia-
tions of successive iterations of that loop.
6.5.1.1
Fixed-Point Example
The fixed-point code in Example 6–19 needs eight cycles for each iteration of
the loop, so the iteration interval is eight.
Table 6–5 shows a modulo iteration interval scheduling table for the fixed-point
dot product loop before software pipelining (Example 6–19). Each row repre-
sents a functional unit. There is a column for each cycle in the loop showing
the instruction that is executing on a particular cycle:
-
LDWs on the .D units are issued on cycles 0, 8, 16, 24, etc.
-
MPY and MPYH on the .M units are issued on cycles 5, 13, 21, 29, etc.
-
ADDs on the .L units are issued on cycles 7, 15, 23, 31, etc.
-
SUB on the .S1 unit is issued on cycles 1, 9, 17, 25, etc.
-
B on the .S2 unit is issued on cycles 2, 10, 18, 24, etc.
Table 6–5. Modulo Iteration Interval Scheduling Table for Fixed-Point Dot Product
(Before Software Pipelining)
Unit / Cycle
0, 8, ...
1, 9, ...
2, 10, ...
3, 11, ...
4, 12, ...
5, 13, ...
6, 14, ...
7, 15, ...
.D1
LDW
.D2
LDW
.M1
MPY
.M2
MPYH
.L1
ADD
.L2
ADD
.S1
SUB
.S2
B
In this example, each unit is used only once every eight cycles.