Software Pipelining
6-34
6.5.1.3
Determining the Minimum Iteration Interval
Software pipelining increases performance by using the resources more effi-
ciently. However, to create a fully pipelined schedule, it is helpful to first deter-
mine the
minimum iteration interval.
The
minimum iteration interval of a loop is the minimum number of cycles you
must wait between each initiation of successive iterations of that loop. The
smaller the iteration interval, the fewer cycles it takes to execute a loop.
Resources and data dependency constraints determine the minimum iteration
interval. The most-used resource constrains the minimum iteration interval.
For example, if four instructions in a loop all use the .S1 unit, the minimum it-
eration interval is at least 4. Four instructions using the same resource cannot
execute in parallel and, therefore, require at least four separate cycles to
execute each instruction.
With the SUB and branch instructions on opposite sides of the dependency
graph in Figure 6–9 and Figure 6–10, all eight instructions use a different func-
tional unit and no two instructions use the same cross paths (1X and 2X).
Because no two instructions use the same resource, the minimum iteration in-
terval based on resources is 1.
Note:
In this particular example, there are no data dependencies to affect the
minimum iteration interval. However, future examples may demonstrate this
constraint.
6.5.1.4
Creating a Fully Pipelined Schedule
Having determined that the minimum iteration interval is 1, you can initiate a
new iteration every cycle. You can schedule LDW (or LDDW) and MPY (or
MPYSP) instructions on every cycle.
Fixed-Point Example
Table 6–7 shows a fully pipelined schedule for the fixed-point dot product ex-
ample.