Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
100000000
100101 subtract
=========
001010 (The 5 highest bits are the first row in the matrix)
100101 no subtraction
=========
010100 (The 5 highest bits are the second row in the matrix)
100101 no subtraction
=========
101000 (The 5 highest bits are the third row in the matrix)
100101 subtract
=========
01101 (No more dividend bits, this is the remainder (CRC) for the message "1000" and the fourth row in the matrix)
11010011101100 000 <--- input right padded by 3 bits
1011 <--- divisor
01100011101100 000 <--- result (note the first four bits are the XOR with the divisor beneath, the rest of the bits are unchanged)
1011 <--- divisor ...
00111011101100 000
1011
00010111101100 000
1011
00000001101100 000 <--- note that the divisor moves over to align with the next 1 in the dividend (since quotient for that step was zero)
1011 (in other words, it doesn't necessarily move one bit per iteration)
00000000110100 000
1011
00000000011000 000
1011
00000000001110 000
1011
00000000000101 000
101 1
-----------------
00000000000000 100 <--- remainder (3 bits). Division algorithm stops here as dividend is equal to zero.
The second matrix shows the output bits that are affected by a certain "previous" output bit.
The last row can be generated by calculating the remainder when dividing the first row + M zeros by the polynomial.
YesI suppose this second matrix is doing the exact same long division as the first matrix ?
0000100000000
100101 no subtraction
=============
00010 intermediate value 1
000100 Get next bit from the dividend
100101 no subtraction
=============
00100 intermediate value 2
001000 Get next bit from the dividend
100101 no subtraction
=============
01000 intermediate value 3
010000 Get next bit from the dividend
100101 no subtraction
=============
10000 intermediate value 4 (= N, so the first row in matrix 2)
100000 Get next bit from the dividend
100101 subtract
=============
00101 intermediate value 5 (= M, so the first row in matrix 1)
001010 Get next bit from the dividend
100101 no subtraction
=============
01010 intermediate value 6
010100 Get next bit from the dividend
100101 no subtraction
=============
10100 intermediate value 7
101000 Get last bit from the dividend
100101 subtract
=============
01101 Final remainder, always the last row in both matrices.
How do you get the equations for a parallel CRC without matrix 2?From what I understand, first matrix alone is enough to compute CRC value.
Why still need the second matrix ?
How do you get the equations for a parallel CRC without matrix 2?
Example from your post #13:Why parallel CRC needs matrix 2 ?
You only know that Min 1 and 4 should be in the equation because the corresponding lines in matrix 2 have a '1' in the Mout[0] column.
The serial implementation can only process one input bit per clock cycle.Wait, what kind of logical reasoning behind this "parallel" CRC ?
One problem that can occur for a parallel implementation is that the input message is not an exact multiple of the input word size (N).
Extra logic is needed for that, so you normally choose N to be the smallest "chunk" size of the input message.
Forget about that special case and the needed extra logic for now. It has nothing to do with matrix 2.Extra logic ? As in matrix 2 ?
I am very confused on the purpose of matrix 2 and how to generate it.
The calculation in post #30 is a "shortcut" to get both matrix 1 and 2 with a minimum of work. It will not help you understand what is going on.in reply #30 , what does it exactly mean by 10000 intermediate value 4 (= N, so the first row in matrix 2) ?
For N=4 and M=5 we want the results from the following calculations:
Mout = CRC_parallel("1000", "00000")
Mout = CRC_parallel("0100", "00000")
Mout = CRC_parallel("0010", "00000")
Mout = CRC_parallel("0001", "00000")
Mout = CRC_parallel("0000", "10000")
Mout = CRC_parallel("0000", "01000")
Mout = CRC_parallel("0000", "00100")
Mout = CRC_parallel("0000", "00010")
Mout = CRC_parallel("0000", "00001")
The results from having a bit set in Nin go to matrix 1. One Mout result per row.
The results from having a bit set in Min go to matrix 2. One Mout result per row.