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

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Thu Apr 7 14:41:33 BST 2022


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

--- Comment #21 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
much better, really short/concise. missing couple of comments though


  66         part_prods = []
  67         for shift in range(self.factor_width):
  68             part_prod = Signal(self.output.width,
name=f"part_prod_{shift}")
                 # what's going on, perhaps an ASCII diagram? small one!
  69             mask = Repl(self.factor2[shift], self.factor_width)
  70             m.d.comb += part_prod.eq((self.factor1 & mask) << shift)
  71             part_prods.append(part_prod)
  72 
             # looks like an actual addition. explain with "calculate pp
             # [0] ^ pp1 ....
  73         output = treereduce(part_prods + self.terms, operator.xor)
  74         m.d.comb += self.output.eq(output)

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


More information about the libre-soc-bugs mailing list