Close

Unit swap

A project log for miniMAC - Not an Ethernet Transceiver

custom(izable) circuit for sending some megabytes over differential pairs.

yann-guidon-ygdesYann Guidon / YGDES 07/10/2025 at 22:330 Comments

I am still digesting the results of the tests from two months ago, with the temporary PEAC16 scrambler. I try to learn from the problems that have been identified. The gPEAC18 design is one consequence but another is more structural.

I had noticed that the rate of error detection was not "right": Each step of PEAC mostly divided the errors by 2, which would fit if the parity was only one bit. But there are 3 so each new cycle must reduce the errors by 8.

Some of the "potency" is lost by the early filtering by the interleaved Gray circuits. But they are still necessary. Something happens in the "combination" of the parities and the marks, and it's not done the right way.

I consider doing things differently and jump on the occasion to totally get rid of the combination step: thus we'll get 3 true parity bits, no extra weird circuit, and stronger error detection.

With 3 bits of parity per word and a granularity of 8 words, that makes a block of 24 parity bits. This means that one block should have no more than 1 chance is 16 millions to hold an error. Going back 8 more words is possible but should be exceptional.

So the trick is to swap the PEAC and GRAY units in the pipeline, with the GRAY circuit creating a 3-bit "digest" of the whole PEAC state while PEAC is computing. This does more than avoiding the combination step: PEAC acts as an extra layer of scrambler/descrambler, but this time downstream the parity logic. Thus further increases the avalanche (through confusion and diffusion) of any type error. Some (1/8) can pass but the full power of the parities is now available and will identify errors much sooner.

gPEAC is still 18 bits wide and scrambles the 16 bits of data and the C/D flag. The 3 extra bits are simply a linear combination of the gPEAC state, containing 2×18=36 bits. So each parity bit combines 12 bits (interleaved) of gPEAC.

The 20-bit word must be interleaved, with a regular pattern, before the split into 5× 4-bit nibbles, as below for example.

This is important because each nibble does 4B3T encoding/decoding and acts like a sort of S-box, that mixes and spreads any error in this nibble. The 3 parity bits would be allocated bits 0-1-2 so they are spread evenly with maximum distance across the nibbles.

Discussions