[Libre-soc-bugs] [Bug 782] add galois field bitmanip instructions

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Fri Mar 4 12:20:14 GMT 2022


https://bugs.libre-soc.org/show_bug.cgi?id=782

--- Comment #11 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
correct me if wrong i believe it quite simple to show XOR insufficient

polynomial 0b110001
x          0b110000
y          0b001111
XOR        0b111111
clearly this is greater than the polynomial which modulo you are
supposed to XOR and instead get the correct answer:

polynomial 0b110001
x          0b110000
y          0b001111
XOR        0b111111 this greater than polynomial
subtract p 0b110001 use XOR to subtract
answer     0b001110

so i think you'll find that we can get away with:

* assumption that both RA and RB are less than
  polynomial
* do XOR
* compare (arithmetic cmp) with polynomial
* if greater, XOR with polynomial

no huge iteration needed, just one extra XOR *as long as* both
RA and RB are 0 <= RA/RB < polynomial

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list