English
Language : 

PXR40RM Datasheet, PDF (1250/1434 Pages) Freescale Semiconductor, Inc – PXR40 Microcontroller
Enhanced Time Processing Unit (eTPU2)
This implies that single parameter Microengine to Microengine communication does not affect the
performance. The Microengine which waits for the semaphore will loop until it is freed by the other
Microengine. This time depends on the eTPU application. The system designer should estimate the
percentage of Microengine to Microengine coherent parameter communication that will result in eTPU
semaphore loops, and multiply it with the average number of eTPU clocks the Microengine loops for each
such transfer. This percentage is called CCR (Communication Collision Rate).
A 100% collision rate for a system is the theoretical worst case. In many systems, however, the RCR,
CPCR and CCR would be very low, sometimes even near 0%. This is because the eTPU is an independent
processor capable of servicing most function needs, so that the Host rarely needs to access the eTPU SDM.
Also coherent Microengine to Microengine communication of more than one parameter may be rare. To
find a realistic RCR, CPCR the system designer should evaluate the Host code and find the percentage of
time it accesses the eTPU SDM with or without using the CDC. This percentage gives a good RCR and
CPCR. The eTPU application provides a good estimation of CCR.
NOTE
The programming practice of polling a flag in the eTPU SDM causes a very
high RCR and should be avoided in high-performance systems.
After the collision rate for a system is found, it can be applied to the WCL calculations for each channel.
The system designer can use the collision percentage and the number of SDM accesses (with and without
semaphores) to estimate the eTPU loop time for a function. Note that in old TPU functions CPCR and CCR
are both zero.
The estimation of eTPU wait time is as follows:
Variables:
N1 = Number of simple RAM accesses in the longest thread
RCRWait = Maximal eTPU clocks wait time for simple RAM collision = 2
CPCRWait = Average eTPU clocks for Coherent Parameter Transfer (using CDC).
N2 = Number of eTPU-eTPU semaphore RAM accesses in the longest thread
CCRWait = Average eTPU clocks for Microengine-Microengine communication transfer.
Estimated Wait Time:
Function eTPU maximal wait time =
N1 *(RCR * RCRWait + CPCR * CPCRWait) + N2* CCR * CCRWait
29.4.2.4 First-Pass Worst-Case Latency Analysis
Following is the first-pass calculation of worst-case latency for a channel. Remember that this analysis
uses generalizations that usually produce a result much worse than the real worst case. If the worst-case
result from the first analysis is too long for the desired performance, use the second analysis for a more
realistic worst-case analysis.
29-82
PXR40 Microcontroller Reference Manual, Rev. 1
Freescale Semiconductor