SPRUIY2 November 2024 F29H850TU , F29H859TU-Q1
Table 4-11 is the pipeline diagram for Interrupt context save and restore. ML is last instruction of current execution that was interrupted, ML-U is the latest time when a register update can happen because of an ML instruction, context save must take the latest value. Once the registers are sampled for context save, the registers are cleared for security reasons, CLR indicates the cycle in which the registers are cleared. Context save (CS) takes 8 cycles, CS1 to CS8. ISR instructions are I1 to I6. Context save overlaps with these instructions; hence, RETI.RTINT can not be executed for 6 cycles as the Realtime stack can not be read until the context save is complete. I6-U is the last instruction of the ISR that can update registers. CR1 to CR8 are context restore cycles, MN is the first instruction after an ISR exit, this instruction must read register values that are restored from the Realtime stack. Register updates due to I6 must be complete before registers are restored. MN-RD is the earliest time a register can be read. Any overlap of these mentioned operations triggers a pipeline protection and the current operation is stalled until the conflict is resolved.
Cycle | Pipeline Phase | RTINT Stack | Ax0-7 RETADDR | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
D2 | R1 | R2 | R3 | E1 | E2 | E3 | E4 | E5 | E6 | E7 | E8 | ||||
1 | |||||||||||||||
2 | |||||||||||||||
3 | |||||||||||||||
4 | ML | ||||||||||||||
5 | CS1 | ML | |||||||||||||
6 | CS2 | CS1 | ML | ||||||||||||
7 | CS3 | CS2 | CS1 | ML | |||||||||||
8 | CS4 | CS3 | CS2 | CS1 | ML | ML-U | |||||||||
9 | CS5 | CS4 | CS3 | CS2 | CS1 | ML | |||||||||
10 | CS6 | CS5 | CS4 | CS3 | CS2 | CS1 | ML | CLR | |||||||
11 | CS7 | CS6 | CS5 | CS4 | CS3 | CS2 | ML | CS1-WR | |||||||
12 | CS8 | CS7 | CS6 | CS5 | CS4 | CS3 | ML | CS2-WR | |||||||
13 | I1 | CS8 | CS7 | CS6 | CS5 | CS4 | ML | CS3-WR | I1-RW | ||||||
14 | I2 | I1 | CS8 | CS7 | CS6 | CS5 | ML | CS4-WR | |||||||
15 | I3 | I2 | I1 | CS8 | CS7 | CS6 | CS5-WR | ||||||||
16 | I4 | I3 | I2 | I1 | CS8 | CS7 | CS6-WR | ||||||||
17 | I5 | I4 | I3 | I2 | I1 | CS8 | CS7-WR | ||||||||
18 | I6 | I5 | I4 | I3 | I2 | I1 | CS8-WR | ||||||||
19 | CR1 | I6 | I5 | I4 | I3 | I2 | I1 | CR1-RD | |||||||
20 | CR2 | I6 | I5 | I4 | I3 | I2 | I1 | CR2-RD | |||||||
21 | CR3 | I6 | I5 | I4 | I3 | I2 | I1 | CR3-RD | |||||||
22 | CR4 | I6 | I5 | I4 | I3 | I2 | I1 | CR4-RD | CR1 | ||||||
23 | CR5 | I6 | I5 | I4 | I3 | I2 | I1 | CR5-RD | I6-U | ||||||
24 | CR6 | I6 | I5 | I4 | I3 | I2 | CR6-RD | ||||||||
25 | CR7 | I6 | I5 | I4 | I3 | CR7-RD | |||||||||
26 | CR8 | I6 | I5 | I4 | CR8-RD | ||||||||||
27 | MN | I6 | I5 | MN-RD | |||||||||||
28 | MN | I6 | |||||||||||||
29 | MN | ||||||||||||||
30 | MN | ||||||||||||||
31 | MN | ||||||||||||||
32 | MN |