Enhanced Time Processing Unit (eTPU2)
29-76
Freescale Semiconductor
PXR40 Microcontroller Reference Manual, Rev. 1
29.4
Initialization/Application Information
29.4.1
Multiple Parameter Coherency Methods
Follows a description of two methods for coherent transfer of multiple parameters between Host and
eTPU. Both methods involve the use of two parameter areas: the Transfer Parameter Area (hereafter called
TPA), which is the SDM area directly accessed by the Host for reads and writes, and the Permanent
Parameter Area (hereafter called PPA), which are the SDM positions where channel parameters are
normally accessed by the Function microcode. Note that parameters in either TPA or PPA do not have to
be in sequential addresses. TPAs and PPAs allocation are completely defined by the application, and there
may be any number of them, independently of the channels.
The methods described here are not the only solutions for the coherent transfer problem, and both can
coexist in eTPU and even used in combination. Also note that for transfers of a pair of parameters, the
Coherent Dual-parameter Controller is faster and have less impact on both eTPU and Host performance.
That said, the methods are:
•
Transfer Service
: a microengine thread transfers, upon Host Service Request, data from/to a TPA
to/from a PPA.Coherency is guaranteed by the fact that a thread is atomic with respect to other
threads in the same Engine, and so are its transfers. If parameters in PPA are shared by both
Engines, hardware semaphores have to be used to access them.
•
Mailbox
: for Host to eTPU transfers, the microcode checks a flag, set by the host, indicating the
existence of new parameter data in the TPA. It can, then, either access TPA data directly or copy it
to the PPA. For eTPU to Host transfers, when microcode changes PPA, it copies them to the TPA
and flags updated TPA data to Host, possibly using an Interrupt or a Data Transfer Request. The
Mailbox flag is reset when data is copied: by the eTPU microcode, when it transfers TPA to PPA
(possibly followed by an Interrupt); by the Host, when it reads data from the TPA. This indicates
that TPA is free for another transfer.
Transfer Service has the advantage of separating the task of data transfer from the functional service thread
that accesses the parameters, with less impact to the latter. Compared to the Mailbox method, however, it
has bigger average latency, because the Transfer Service thread has to contend for a time slot to execute.
This latency can be minimized if Transfer Service thread is assigned to a separate channel with higher
priority, but even so it does not guarantee that PPA is updated before the next execution of the functional
thread that uses it.
Mailbox method, on the other hand, makes the functional thread check for the existence of new data (Host
to eTPU). It does not have to be responsible for the transfer, though: it may access the TPA directly, and a
Transfer Service can then be used to copy data from TPA to PPA.
29.4.2
Estimating Worst Case Latency
Reliable systems are designed to work under worst-case conditions. This section explains how to estimate
worst-case latency (WCL) for any eTPU function in any system. The appendix covers the following topics:
•
Introduction to Worst-Case Latency
•
Using Worst-Case Latency Estimates to Evaluate Performance
Summary of Contents for PXR4030
Page 1: ...PXR40 Microcontroller Reference Manual Devices Supported PXR4030 PXR4040 PXR40RM Rev 1 06 2011...
Page 30: ...PXR40 Microcontroller Reference Manual Rev 1 Freescale Semiconductor xxx...
Page 40: ...PXR40 Microcontroller Reference Manual Rev 1 xl Freescale Semiconductor...
Page 66: ...Memory Map PXR40 Microcontroller Reference Manual Rev 1 2 4 Freescale Semiconductor...
Page 120: ...Signal Descriptions 3 54 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Page 860: ...FlexCAN Module 24 50 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Page 1167: ...Decimation Filter Freescale Semiconductor 28 53 PXR40 Microcontroller Reference Manual Rev 1...
Page 1168: ...Decimation Filter 28 54 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...