M
Martin Brown
Guest
On 19/05/2022 09:58, Clive Arthur wrote:
I vaguely recall a trick using parity over an orthogonal basis set of
Walsh functions (much like Hadamard) that could be designed so that the
computed signature of the data received gave you the index of the bad
bit. Described in more detail here.
https://en.wikipedia.org/wiki/Hamming_code#General_algorithm
It seems Hamming(127,120) is what you want. Now just a SMOP!
Or 2x Hamming(63,57) applied to 64 bits (one bit left hanging).
--
Regards,
Martin Brown
On 19/05/2022 04:27, Sylvia Else wrote:
On 19-May-22 1:54 am, Clive Arthur wrote:
Hi all
I have serial data in 14 byte packets on which I\'d like to detect and
correct errors. Two bit errors would be nice. I can put 2 extra EDC
bytes on the end to make a 16 byte packet.
I don\'t have the resources for Reed-Solomon. I could use a 16 bit
CRC, these are easy to generate with a small/moderate LUT.
In the past, I\'ve used a CRC16 for single bit error detection and
correction on a longer packet, but I didn\'t do the error detection
part. Â Â Errors were very rare, time was not critical, and I
understand that this was simply done by changing each message bit in
turn then recalculating the CRC till it all worked out. That\'s far
to slow for my current needs.
If I\'m lucky, a 16 bit CRC might be able to detect and correct 2 bit
errors in 14 bytes (112 * 111 possibilities?), but is there a way of
quickly finding out which bits are wrong?
Or maybe a completely different approach? This has to be done on the
fly, and multi-kilobyte LUTs or thousands of clock cycles are out of
the question.
Even if you had a 16 bit value that told you which two bits were
wrong, you\'d then have to make use of that information to flip the
incorrect bits. That doesn\'t sound like small number of LUTs.
Is your channel really that noisy that you cannot just discard bad
packets?
Sylvia.
I don\'t have control over the transmission path, it may be noisy, it may
not - it\'s not a fixed installation. I want to get the best shot at
correcting errors within my fixed constraints, even a single bit EDC
would be useful. I can\'t request a resend, and sending multiple copies
restricts bandwidth too much.
Of course, there comes a point when it just won\'t/can\'t work.
I do know that a CRC approach is easy to implement from the POV of error
detection. I also know that this could detect and correct at least a
single bit error, but I don\'t know if there\'s a quick and easy way of
finding the bad bit.
And to be honest, much of the maths associated with EDC is beyond me at
the moment.
I vaguely recall a trick using parity over an orthogonal basis set of
Walsh functions (much like Hadamard) that could be designed so that the
computed signature of the data received gave you the index of the bad
bit. Described in more detail here.
https://en.wikipedia.org/wiki/Hamming_code#General_algorithm
It seems Hamming(127,120) is what you want. Now just a SMOP!
Or 2x Hamming(63,57) applied to 64 bits (one bit left hanging).
--
Regards,
Martin Brown