![Freescale Semiconductor MPC5632M Manual Download Page 795](http://html.mh-extra.com/html/freescale-semiconductor/mpc5632m/mpc5632m_manual_2330659795.webp)
MPC563XM Reference Manual, Rev. 1
Freescale Semiconductor
795
Preliminary—Subject to Change Without Notice
23.4.4.1
Host Side Atomic Access
Host side atomic accesses can be achieved by either of following ways:
•
for one parameter, the SPRAM should be accessed by 32-bit-wide data transfers to ensure
coherency
•
for two parameters only, using the Coherent Dual Parameter Controller.
•
indirectly, for any number of parameters, by requesting microcode to coherently access SPRAM in
its behalf. The host side atomicity problem becomes, then, a microengine side atomicity problem.
Some methods that use this approach to achieve coherency are described in
“Multiple Parameter Coherency Methods
.”
23.4.4.2
Microengine Side Atomic Accesses
23.4.4.2.1
Microengine Single Parameter Atomicity
SPRAM should be accessed by 32-bit-wide data transfers to ensure atomicity for 32-bit parameters. This
applies either to Host-Microengine coherency or Microengine-Microengine coherency in a dual eTPU
Engine system.
23.4.4.2.2
Microengine Dual Parameter Atomicity
Microengine has the ability to access two parameters coherently in back-to-back accesses, at random
addresses: once it accesses SPRAM, it has priority over Host for another access in the next microcycle (see
Section 23.4.4.5, “SPRAM Arbitration
”). Note that it applies
only to Microengine-Host coherency
. For
Microengine-Microengine coherency in a dual eTPU Engine system, one must use Hardware Semaphores
(see
Section 23.4.4.4, “Hardware Semaphores
”).
Microengine dual back-to-back accesses are guaranteed to be atomic in relation to Host Skyblue accesses
or Coherent Dual-parameter Controller, regardless of semaphore usage: Host or CDC accesses cannot
break-up a back-to-back Microengine access, neither Microengine can break a CDC transfer, due to the
SPRAM arbitration mechanism described in
Section 23.4.4.5, “SPRAM Arbitration
Atomicity is not guaranteed if microengine enters halt state in the middle of a back-to-back access (see
Section 23.4.10.2.2, “Microengine Halt State
”): Host can access SPRAM while microengine is halted in
the middle of a back-to-back access.
23.4.4.2.3
Microengine Side Multiple Atomicity
Hardware Semaphores must be used for Microengine-Microengine coherency (more than 1 parameter)
since two or more accesses from one Microengine are not atomic with respect to the other.
For multiple Microengine-Host coherency, the software methods described in
,” or similar ones, must be used. Some of these methods rely on the fact that
parameter access of a thread is atomic in relation to another thread in the same Engine, since a thread
cannot be suspended (preempted).
For 1 parameter coherent access, or dual parameter coherency between only one Microengine and Host,
the alternatives shown in previous sections apply.