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

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Tue Mar 8 19:25:02 GMT 2022


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

--- Comment #48 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #46)

> I'd guess divmod is used here for API compatibility with Rings, where a
> remainder is actually useful, such as the Ring of integers.

rright.  ok.  yes, i have seen code which provides divmod then later
a separate class embeds the one providing divmod into a GFPolynomial
one.

(In reply to Jacob Lifshay from comment #47)

> clmul is polynomial multiplication where the coefficients are GF(2), not
> GF(2^k) multiplication.

the RV xbitmanip spec (see wiki) describes clmul as "GF(2^k) multiplication
with the reducing polynomial set to 2^k"

does that sound about right? because if it is, it is basically a way
to "switch off" the "dividing by the reducing polynomial"

> GF(2^k) multiplication has the additional step of calculating the polynomial
> remainder of dividing by the reducing polynomial -- essentially taking what
> would be the top half and merging it into the bottom half, leaving the top
> half now empty. This is similar to why the integers mod 16 have zeros
> everywhere except the least significant hex digit, because the mod 16
> operation removed them, leaving zeros.

ok. vaguely starting to make sense.

if the reducing polynomial is set to 2^XLEN (switched off in effect)
does divmodGF2 and multGF2 effectively become "ring of integer" thingies?

i would like to see both included, in effect, preferably without having
to have separate HDL?

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


More information about the libre-soc-bugs mailing list