Enhanced Time Processing Unit (eTPU2)
Freescale Semiconductor
29-93
PXR40 Microcontroller Reference Manual, Rev. 1
{
int j; /* loop counter */
unsigned int misc = 0;
for (j = (SCM_size-1); j >= 0 ; j--) { /* SCM_size has the number of 32-bit words in SCM */
if (misc & 0x1) {
misc >>= 1;
misc ^= POLY;
}
else {
misc >>= 1;
}
misc ^= data[j]; /* data[j] is the actual 32-bit word taken from the SCM array */
}
return (misc); /* final signature calculated */
};
The value calculated by this algorithm must be loaded into register ETPUMISCCMPR prior to activating
the SCM MISC calculator in eTPU. Once the MISC calculator is activated (bit SCMMISEN in register
ETPUMCR is written to 1) eTPU itself will start this procedure
1
reading the SCM whenever allowed by
microengine. At the end of the cycle, when all the array has been read and the SCM signature is calculated,
the Host CPU can be notified via Global Exception if the MISC Accumulator does not match the value in
ETPUMISCCMPR.
The average time taken by MISC to complete the signature of the whole SCM can be given by the formula:
Average MISC period = S / (4 * f * (1 - L))
where f is clock frequency, S is SCM size in bytes and L is eTPU load (as a percentage of execution clocks
over a period of time, including TST clocks).
Further detail on MISC calculation can be found on
Section 29.3.6.1, SCM Test - Multiple Input Signature
AN2192 - Detecting Errors in the Dual Port RAM (DPTRAM)
Module
is also a good source of information (although it refers to TPU) on MISC signature.
1.
eTPU MISC hardware is optimized to read 32-bit words from memory and to calculate this CRC in parallel, rather than
shifting one bit at a time. The actual implementation inside eTPU, although bringing to the same results, does not match
exactly the algorithm shown here.
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...