[Libre-soc-bugs] [Bug 784] Implement cl* instructions for carry-less operations

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Tue Apr 5 12:24:08 BST 2022


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

--- Comment #7 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #1)
> I added CLMulAdd, a combinatorial carry-less multiply-add unit 

nice.

> that uses
> tree-reduction to do all the XORs in the multiply add, 

+class BitwiseXorReduce(Elaboratable):
+    """Bitwise Xor lots of stuff together by using tree-reduction on each bit.
+
+    Properties:

if it is the same can you please replace that with the tree_reduce function i 
created 18 months ago?

https://git.libre-soc.org/?p=nmutil.git;a=blob;f=src/nmutil/util.py;h=6f22179eff5ae8078d45f2a0b001a4f6f2045401;hb=e681da8ca9d8c9ff461eba9f3ff045e40f249dc2#l20

code duplication turns into a maintenance nightmare very quickly.

also that's not actual tree-reduction, it's a chain that assumes yosys will
sort it.  i have said multiple times for over 18 months not to do that.

> Here's a nice 4x4 clmul that I generated:
> https://ftp.libre-soc.org/clmul_4x4.svg

it's so prettyyy, fascinating how it creates a mix of NAND AND and XOR.

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


More information about the libre-soc-bugs mailing list