SPRUIZ1B July 2023 – August 2024 TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P659DH-Q1 , TMS320F28P659DK-Q1 , TMS320F28P659SH-Q1
The MDEBUGSTOP1 instruction is meant to be used as a software breakpoint; the instruction on which the execution must halt is replaced with this instruction.
The MDEBUGSTOP1 and MDEBUGSTOP instructions differ in how the CLA pipeline is treated. When halted, the MDEBUGSTOP1 instruction flushes all the instructions that have already been fetched; on a single-step or run-free command, the CLA refetches the same instruction that the CLA replaced. Table 7-2 illustrates the pipeline behavior.
Cycles | F1 | F2 | D1 | D2 | R1 | R2 | E | W | Comments |
---|---|---|---|---|---|---|---|---|---|
1 | i1 | ||||||||
2 | i2 | i1 | |||||||
3 | i3 | i2 | i1 | ||||||
4 | i4 | i3 | i2 | i1 | |||||
5 | MDEBUG STOP1 |
i4 | i3 | i2 | i1 | ||||
6 | i6 | MDEBUG STOP1 |
i4 | i3 | i2 | i1 | |||
7 | i7 | i6 | MDEBUG STOP1 |
i4 | i3 | i2 | i1 | ||
9 | i8 | Flushed (MNOP) | Flushed (MNOP) | Flushed (MNOP) | i4 | i3 | i2 | i1 | CLA halted |
10 | i5(MDEBUGSTOP1) | Flushed (MNOP) | Flushed (MNOP) | Flushed (MNOP) | Flushed (MNOP) | i4 | i3 | i2 | CLA step/run |
11 | i6 | i5(MDEBUGSTOP1) | Flushed (MNOP) | Flushed (MNOP) | Flushed (MNOP) | Flushed (MNOP) | i4 | i3 | CLA step/run |
12 | i7 | i6 | i5(MDEBUGSTOP1) | Flushed (MNOP) | Flushed (MNOP) | Flushed (MNOP) | Flushed (MNOP) | i4 | CLA step/run |
13 | i8 | i7 | i6 | i5(MDEBUGSTOP1) | Flushed (MNOP) | Flushed (MNOP) | Flushed (MNOP) | Flushed (MNOP) | CLA step/run |
A software breakpoint is placed at instruction i5. The instruction, i5, is then replaced with MDEBUGSTOP1. Execution takes 3 cycles for the MDEBUGSTOP1 to reach the D2 phase at which point the instructions i6, i7, and i8 that were previously fetched are now flushed from the pipeline. The instruction, i5, is then refetched and execution continues as before.