NXP Semiconductors
UM10858
PN7462 family HW user manual
UM10858
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2018. All rights reserved.
User manual
COMPANY PUBLIC
Rev. 1.4 — 14 May 2018
314514
119 of 345
The method used to generate the equations for each bit of the new CRC requires 4 steps
and depends on the input data width (W) and polynomial width (C). Therefore, each CRC
configuration (polynomial width and input data width) requires dedicated equations.
Below is one simple example to generate the equations for CRC4-ITU (x4+x+1; C=4) and
input data width W=4. The same method applies to any values of P and W.
Let’s call C_new(n) the nth bit of the new CRC value, C_prev(n) the nth bit of the
previous calculated CRC value (e.g. preloaded value) and W(n) the nth bit of the input
data.
Step1: Implement a standard serial CRC calculation:
C_new(0)=C_prev(3) xor W;
C_new(1)=C_prev(0) xor C_prev(3) xor W;
C_new(2)=C_prev(1);
C_new(3)=C_prev(2);
A full C_new value can be calculated running 4 times these equations.
Step2: Parallel CRC calculation is a function of input data (W(n)) and previous CRC
value (C_prev). Calculate C_new using the previous serial equations as a function of
W(n) for each one hot encoded value of W(n):
C_prev=0x0;
W is one hot encoded: W=4 so the values are 0x1, 0x2, 0x4, 0x8.
C_new(W=0x1;C_prev=0x0)=4’b0011
C_new(W=0x2;C_prev=0x0)=4’b0110
C_new(W=0x4;C_prev=0x0)=4’b1100
C_new(W=0x8;C_prev=0x0)=4’b1011
The hereabove results lead to the matrix M1 shown in table below
Table 136. CRC4 M1
C_prev(0) C_prev(1)
C_prev(2)
C_prev(3)
W(0)
0
0
1
1
W(1)
0
1
1
0
W(2)
1
1
0
0
W(3)
1
0
1
1
Step3: Parallel CRC calculation is a function of input data (W(n)) and previous CRC