Performance Considerations

Figure 4−30 shows how a multicycle NOP can be affected by a branch. If the delay slots of a branch finish while a multicycle NOP is still dispatching NOPs into the pipeline, the branch overrides the multicycle NOP and the branch target begins execution five delay slots after the branch was issued.

Figure 4−30. Branching and Multicycle NOPs

Cycle #

1EP1

2EP2

3EP3

4EP4

5EP5

6EP6

Branch

7EP7

10

11 NormalEP7

B . . .

EP without branch

EP without branch

EP without branch

EP without branch

LD MPY ADD NOP5

Branch will execute here

See Figure 4−29(b)

Pipeline Phase Branch Target

E1

PG

PS

PW

PR

DP

DC E1

Delay slots of the branch

In one case, execute packet 1 (EP1) does not have a branch. The NOP 5 in EP6 forces the CPU to wait until cycle 11 to execute EP7.

In the other case, EP1 does have a branch. The delay slots of the branch coincide with cycles 2 through 6. Once the target code reaches E1 in cycle 7, it executes.

SPRU733

Pipeline

4-59

Page 391
Image 391
Texas Instruments TMS320C67X/C67X+ DSP manual Cycle #, Pipeline Phase Branch Target