Close

Gray parity

A project log for miniMAC - Not an Ethernet Transceiver

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

yann-guidon-ygdesYann Guidon / YGDES 04/20/2025 at 00:140 Comments

I think I have cracked the mystery of the Gray Parity ! And it is even more amazing than I thought.

Have a look at this simulation :

So the secret to Gray parity is : there is no parity.

The Gray encoder works as expected : each input data affects 2 outputs. Thus parity is preserved at all times when one input bit is toggled !

The solution to the last log's puzzle was simply to take a12 and pass it as a "parity"... The whole circuit becomes symmetrical, do you see how C3 xor Pa only affects the Error flag ?

The sender is only 3 gates and one layer of XORs and the receiver is 4 gates and 2 layers. Can it get more beautiful ?

I believe it could work for 5 bits instead of 4, with only a modest increase of depth. With a 16-bit word, this means another group must have 6 bits, which makes the whole thing unbalanced.

When the wires are untangled, the situation looks clearer : (sim)

But something strange happens now : we don't have a "parity" that we could us like a hash or something like that. And this scheme can't be extended to 16 bits.

Another dead end in this maze...

.

Discussions