Update 20251112 : 258114 = 0x3F042 = 111111000001000010 is the new new new modulus. I have updated the data in this log.
---------------------------------------------------------------
The gPEAC18 scrambler uses 18 bits to represent numbers modulo 258114=0x3F042
The 18-bit number represents different things at different points of the circuit and here is a summary of some of them.

- At the output of the scrambler, in the internal registers, and at the input of the descrambler, 0x00000 to 0x3F041 is a valid range. 0x3F042 to 0x3FFFF means a transmission error. That's not much (only 1.5%) but the detection circuit from 96. Modular adder is used to sieve these rare conditions that could create problems later (if it enters the descrambler).
- At the output of the descrambler: range 0x00000 to 0x1FFFF is valid, that's 50%. This means that it is equivalent to standard parity. However toggling the 16th bit (C/D flag) can only occur if the LSB (b0 to b15) are cleared. This effectively covers 75% of the coding space, or equivalent to 2 parity bits.
NOTE: C/D has moved to bit #8 to reduce the worst case avalanche length
- Thus 0x00000 and 0x10000 are the only output values that are always "valid" at any time, for a probability of 2^-17. Reaching such a state is possible but requires values that will be detected in the next cycles.
In a previous log 91. New modulo. I had chosen 139793=0x22211 to fill almost half of the coding space (53%) and detect parity errors faster. However this greatly reduces the efficiency of the other means of error detection. We see that the new modulus reaches almost 75%, or 2 bits equivalent of detection for internally amplified errors. This effectively halves the "quarantine" period and buffer size. Errors can be detected faster and buffers are retransmitted sooner, giving almost double the performance with higher error rates.
So the key of this design is not to detect half of the errors immediately, but to detect twice more errors downstream. The error curve may start to peak several cycles after reception but the fall should be 2× steeper: instead of a 100× reduction in about 7 cycles (after peak), it should be 10000×. The overall design is mostly the same so 34/2=17 words are still required for quarantine but there should be almost no chance of keeping an undetected error after 20 cycles, unlike the previous version.
Yann Guidon / YGDES
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.