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:
- if Y's MSB is cleared, add,
- If Y's MSB is set, subtract.
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.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.