Better mixing

A project log for PEAC Pisano with End-Around Carry algorithm

Add X to Y and Y to X, says the song. And carry on.

Yann Guidon / YGDESYann Guidon / YGDES 07/29/2021 at 01:450 Comments

Another theoretical aspect of the checksuming algorithm is how external data is mixed with the state of the PEAC iteration. So far, XOR is simple and ADD seems better, but ADD creates the risk of overflowing Y. This creates the situation where Y wraps around before being added to X. OTOH XOR is faster and does not overflow though the mixing is less thorough.

There could be one solution to prevent ADD from overflowing Y:

OK it's a bit more complicated now and the throughput is impacted for SW. In HW though, the added cost is low and the circuit is exactly an ADD/SUB unit of an ALU. And I have no quantitative data showing which of ADD and XOR has a better error detection rate.