Close

Larger words

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 17:232 Comments

That whole ternary story is getting awkward. It's only justified because I want to keep the overhead low, 2 bits for 16 bits of data, and benefit from the PAM3/bitrit code, but it's getting exceedingly complex for little efficiency. Meanwhile the "Interleaved Gray Parity" has some compelling aspects and I was wondering...

Et voilà, vous avez 20 bits entrelacés !

Playing with the parity polarities might even bring some RLL yummies to the battle.

We're back to the 20 bits / 4b5b efficiency territory, with way more solid error detection, using about 3.5 bits of effective parity. This also solves the inherent issue of the protection of the control words, which have no defined error detection mechanism.

Then we can apply a 2 bits per transition PAM3 encoding to yield 10 bauds per word.

The 3 "mark" bits are particularly easy to encode and decode ! (CircuitJS here)

That's 2 XOR for encoding and 3 for decoding and error detection, which is effectively a parity, by the way. I have chosen odd parity, of course. And the "pass-through" values are kept as is, to ease decoding and visualisation.

There is not much to interleave here. For the 5 and 6 inputs, the permuations are more potent.

5:
1 3 5 2 4 => 2 2 3 2
1 4 2 5 3 => 3 2 3 2 ✔

6:
1 3 5 2 4 6 => 2 2 3 2 2
1 4 6 2 5 3 => 3 2 4 3 2 ✔

Of course I'm a bit concerned by the length of the chain of XORs at the decoder side : the 6-input version will have 5 XORs of depth, which is still smaller than the POPC16 of 44. The ParRot. But look closer and see the symmetry of the above circuit : d1 is duplicated somehow.

Usually, a Gray decoder is a simple cascade of XOR but this is not the same circuit since the extra (non-coded) bit "terminates" the cascade. So a N-bit decoder could be seen as 2 N/2 mirrored cascades, the 5-bit case will have a depth of 3 and 6-bit a depth of 4. Only. Now that is efficient, rustic and light. Sorry @SHAOS  but binary wins again...

The 5-bit Gray parity works like a charm as expected:

It's so compact that, contrary to the earlier "ParPop", there is no need of a bidirectional version, it wouldn't be worth caring.

Now, the 6-bit version is... still full of surprises ! (try it yourself here) With the same symmetry, and using a XOR3 at the apex, the circuit still has the same worst case propagation time !

So why refrain from using it ?

Discussions

SHAOS wrote 04/21/2025 at 14:48 point

> Sorry @SHAOS  but binary wins again...

:(

Good thing is ternary always wins in below Hackaday project ;)

https://hackaday.io/project/28579-homebrew-ternary-computer

  Are you sure? yes | no

Yann Guidon / YGDES wrote 04/21/2025 at 14:53 point

if you want to win, you have to choose your battles well ;-)

  Are you sure? yes | no