Close

Unit swap (2)

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/13/2025 at 15:220 Comments

There is a little tiny detail that makes the last log Unit swap difficult to implement: the transmitted data must contain all the bits generated by the scrambler, not just the data bits. This was more or less inherent (and hidden) with PEAC16 because the modulus was the same size as the data.

With gPEAC it's not so anymore. The modulus is 18 bits, one more bit than the encoded data. And it must be transmitted. This reduces the "extra parity" to only 2 bits and makes the error detection less efficient, requiring more words to reach a 1E6 confidence level.

But this is an unavoidable constraint, otherwise the system can't work. And the "extra bit" also provides some protection as well, directly or indirectly, since flipping could lead to a forbidden value (outside of the modulus) which can be detected during the mod operation. The probability depends on the modulus though.

Overall we end up with:

All we can do is before and after this stage.

This is relatively simple but this lengthens the pipeline and latency of error detection, now 3 cycles:

3 cycles is 60 bits and I don't even count the PHY overhead. But this is worst case and is not necessarily pipelined if the bandwidth is slow enough.

The compromise is justified though : it may take 3 words to start detecting an error but then the rate of detection is much higher. I also got rid of the weird "parity combination" and a lot of awkward wire permutations. This also preserves the 2-word signalling protocol since the data/payload itself can hold more extra bits for checking.

Which brings me to an extension of the protocol with control words...

...............

Update :

the post-Gray decoder needs the interleaving to match the latency of subtractor's logic depth.

So the architecture is mostly like before, and the Vs are folded to follow the gPEAC's carry chain. The gPEAC can be built around three Radix-6 Carry Lookahead Adder blocks.

This "shaves" a few logic gates of latency and merges the first two (pipeline/logic) stages. Alternatively, the de-Graying can also be computed during the nibble unshuffling. But integrating the de-Graying with the subtractor might offer some opportunities for optimisation of the several XORs.

As a consequence: the m/p/p bits are XORed with the partial parities later/in parallel.

Discussions