SPRUII0F May 2019 – June 2024 TMS320F28384D , TMS320F28384D-Q1 , TMS320F28384S , TMS320F28384S-Q1 , TMS320F28386D , TMS320F28386D-Q1 , TMS320F28386S , TMS320F28386S-Q1 , TMS320F28388D , TMS320F28388S
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 it replaced. Table 8-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. It 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 re-fetched and execution continues as before.