Close

PEAC for line encoding

A project log for PEAC Pisano with End-Around Carry algorithm

Add X to Y and Y to X, says the song. And carry on.

yann-guidon-ygdesYann Guidon / YGDES 05/21/2023 at 18:080 Comments

So far I have considered PEAC as a pretty nice scrambler, but now I am looking at how to use it to harden a link, almost like a FEC system, on top of the other features.

I look at PEAC10 and PEAC39/2, the first being the simplest but can only process byte-wide streams by adding 2 bits per byte (25% overhead), while PEAC39/2 (m=741454) has a much better scrambling with still the same overhead (16 bits get 4 added check bits).

m=741454 has a nice property : any 20-bit word that is >= 741454 must be invalid, so it's like a "free parity bit" that requires only marginal effort to check (unlike parity for most computers) though it only works as 2/3rds of a bit in practice, for certain limited cases. If this is not detected on this very word, the further words will detect the mismatch with the extra bits (unlike plain parity bits which only work word by word).

I'm also interested by the ability of such a 16->20 recoder to always have at least one transition, that is ; at least one bit is 0 and one bit is 1. This would save hardware that inserts start and stop bits, or frame markers, that help with clock resynchronisation.

This recoder then performs many operations at once : checksum, scrambler, forward error detection and maybe even help during correction... It does not provide 8b-10b encoding spectrum-spreading (transition reduction) though. Furthermore, there is no requirement for a fully binary or square root modulus : a lower value than 741454 can be chosen to add only 2 bits of overhead, for example, with easy-to-spot values for faster resynchronisation.

Still this looks like a nice all-in-one algorithm for ultra-lightweight encapsulation for slow radio protocols that can't afford Reed-Solomon (think : microcontrollers), and more robust than Hamming SECDED (which only works on individual words).

Discussions