
Architecture of the eTPU Channel
Understanding the eTPU Channel Hardware, Rev. 0
Freescale Semiconductor
5
subsequent testing by the software. At the same time during the TST, the eTPU reads the value in the
Capture registers into the ERT registers.
A TDL set after the TST latching cannot be tested by the eTPU during the service routine unless the CHAN
register is rewritten. Whenever the CHAN is written with a channel number, the values of the TDLs,
MRLs, and Capture Registers are updated to the current values in the corresponding channel.
2.2.4
Match Recognition Latches
For each match register, there is a corresponding match recognition latch (MRL) which is set by the
assertion of the comparator. The MRL set signal is normally gated by other signals depending on the
selected channel mode. Once set, the match recognition latch may be cleared only by an eTPU software
command.
At the TST, the individual MRLs are latched into a condition code register and may be tested by the
software as branch conditions. Like the TDLs, the MRLs are not automatically updated for matches
occurring during the service routine, but must be specifically updated by writing the CHAN register
The MRLs and TDLs are used to form the entry vector of a thread when a channel requests service. As
entry conditions,
MatchALatch
is ORed with
TransitionBLatch
and
MatchBLatch
is ORed with
TransitionALatch
. When a software thread is entered using these channel conditions, the software must
test the individual latches to determine which state action to execute.
NOTE
The term
thread
is used to denote the sequence of code from an entry vector
resulting from a service request through the execution of the
end
statement.
The
end
is normally inserted by the compiler at the final brace ( } ) after an
entry block. A thread typically include several functional states of the
system design.
Example 1.
if (MatchA_TransB)
// Entry condition -- start of thread
{
if (MatchA)
// Conditional branch code
{
/* Do the Match A state. */
ClearMatchALatch();
}
else if (TransB)
// Condition branch code
{
/* Do the Trans B state. */
ClearTransLatch(); //Clears ALL Transition Latches
}
} // end of thread