
Enhanced Time Processing Unit (eTPU2)
MPC5644A Microcontroller Reference Manual, Rev. 6
954
Freescale Semiconductor
24.5.9.4.4
Return from subroutine
When a subroutine
call
or a
dispatch call
microoperation is executed, the return address is saved in the
RAR. To return from a subroutine a microoperation is available to load the contents of the RAR back to
the PC. Fields R/D (2 bits) or RTN (1 bit,
) can be used to return from subroutine. For R/D
Return from subroutine microoperation is affected by FLS (see
Section 24.5.9.4.5, Flush pipeline
) when
field R/D is used. Return execution through RTN always flushes the pipeline.
24.5.9.4.5
Flush pipeline
When a branch, dispatch or subroutine return microoperation is executed, the next microinstruction can be
executed unconditionally before the flow change takes effect, since microengine has a two-stage pipeline.
Executing the next microinstruction after a branch maximizes execution performance. This feature is
controlled by field FLS (1 bit,
). When FLS = 0 the pipeline is flushed, so the next
microinstruction placed after a branch is decoded as NOP if the branch is taken. If FLS = 1, the
microinstruction placed after the branch is executed, either if the branch is taken or not, as shown in
.
Flush also controls which value is stored in RAR in a call: in case of no flush, it is the address of the
branch/dispatch instr 2, even if RAR is the ALU destination of the instruction after the call; in case
of a flush, it is the address of the instruction following branch/dispatch.
If a branch with no flush is followed by another branch with no flush, the instructions are executed in the
following order:
1. First branch
2. Second branch
3. First branch’s destination instruction
4. Second branch’s destination instruction, and the flow proceeds normally from then on
The destination of the first branch must not be another flow changing instruction (branch, return or
dispatch). Similar flows apply when returns or dispatches are used instead of branches. This scheme can
be used to implement quick table look-ups with a dispatch replacing the first branch, for instance.
Table 24-115. Return from Sub-routine – RTN
RTN
Meaning
0
return with pipeline flush
1
do not return
Table 24-116. Flush Pipeline – FLS
FLS
Meaning
0
flush pipeline when jump / call / dispatch jump / dispatch
call / return is executed
1
do not flush pipeline when jump / call / dispatch jump /
dispatch call / return is executed
Содержание MPC5644A
Страница 2: ...MPC5644A Microcontroller Reference Manual Rev 6 2 Freescale Semiconductor...
Страница 24: ...MPC5644A Microcontroller Reference Manual Rev 6 24 Freescale Semiconductor...
Страница 26: ...MPC5644A Microcontroller Reference Manual Rev 6 26 Freescale Semiconductor...
Страница 52: ...Introduction MPC5644A Microcontroller Reference Manual Rev 6 52 Freescale Semiconductor...
Страница 56: ...Memory Map MPC5644A Microcontroller Reference Manual Rev 6 56 Freescale Semiconductor...
Страница 130: ...Device Performance Optimization MPC5644A Microcontroller Reference Manual Rev 6 130 Freescale Semiconductor...
Страница 204: ...Multi Layer AHB Crossbar Switch XBAR MPC5644A Microcontroller Reference Manual Rev 6 204 Freescale Semiconductor...
Страница 212: ...Peripheral Bridge PBRIDGE MPC5644A Microcontroller Reference Manual Rev 6 212 Freescale Semiconductor...
Страница 558: ...System Integration Unit SIU MPC5644A Microcontroller Reference Manual Rev 6 558 Freescale Semiconductor...
Страница 582: ...Frequency modulated phase locked loop FMPLL MPC5644A Microcontroller Reference Manual Rev 6 582 Freescale Semiconductor...
Страница 766: ...Enhanced Time Processing Unit eTPU2 MPC5644A Microcontroller Reference Manual Rev 6 766 Freescale Semiconductor...
Страница 1228: ...Decimation Filter MPC5644A Microcontroller Reference Manual Rev 6 1228 Freescale Semiconductor...
Страница 1236: ...System Information Module and Trim SIM MPC5644A Microcontroller Reference Manual Rev 6 1236 Freescale Semiconductor...
Страница 1250: ...Cyclic Redundancy Checker CRC Unit MPC5644A Microcontroller Reference Manual Rev 6 1250 Freescale Semiconductor...
Страница 1336: ...Deserial Serial Peripheral Interface DSPI MPC5644A Microcontroller Reference Manual Rev 6 1336 Freescale Semiconductor...
Страница 1388: ...Enhanced Serial Communication Interface ESCI MPC5644A Microcontroller Reference Manual Rev 6 1388 Freescale Semiconductor...
Страница 1440: ...FlexCAN Module MPC5644A Microcontroller Reference Manual Rev 6 1440 Freescale Semiconductor...
Страница 1624: ...FlexRay Communication Controller FlexRay MPC5644A Microcontroller Reference Manual Rev 6 1624 Freescale Semiconductor...
Страница 1670: ...JTAG Controller JTAGC MPC5644A Microcontroller Reference Manual Rev 6 1670 Freescale Semiconductor...
Страница 1692: ...Nexus Port Controller NPC MPC5644A Microcontroller Reference Manual Rev 6 1692 Freescale Semiconductor...
Страница 1701: ...Development Trigger Semaphore DTS MPC5644A Microcontroller Reference Manual Rev 6 Freescale Semiconductor 1701...
Страница 1702: ...Development Trigger Semaphore DTS MPC5644A Microcontroller Reference Manual Rev 6 1702 Freescale Semiconductor...