[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 04:28:10 GMT 2022


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

--- Comment #37 from Jacob Lifshay <programmerjake at gmail.com> ---
this stuff was already addressed on irc, but I'm restating here to make this
bug's comments more useful.

(In reply to Luke Kenneth Casson Leighton from comment #36)
> i guessed that "reducing polynomial" means the global "polyred",

no, it means polyred but with the 2^degree bit re-added. lkcl already fixed
this.

> and that from the for-loop "1 to 2*m" that this meant that m
> is the degree, which then allowed me to use "if s & mask1"
> which is testing the MSB

yes, that's correct, though i probably would have spelled out the arithmetic
rather than relying on globals.

> looking closely at the algorithm, now, i think we can use
> "count-trailing-1s" to skip ahead a number of loops:
> ...
> that would save on iterations, similar to how you can jump ahead
> in long-division by detecting runs of zeros.

we could...but i'm inclined to instead have a pipeline... 1 stage per
iteration. then we could merge stages together since the mux & xor should be
fast enough. We could probably get 5-6 stages per merged stage, giving us 3-4
cycles for GF(2^8), 6-7 cycles for GF(2^16), 11-13 cycles for GF(2^32), and
22-26 cycles for GF(2^64)

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


More information about the libre-soc-bugs mailing list