[libre-riscv-dev] popcount and parity

Luke Kenneth Casson Leighton lkcl at lkcl.net
Wed May 13 23:20:16 BST 2020


jacob would you like to do popcount and parity, i remember you
mentioned a "best work" algorithm somewhere (referenced a wikipedia
page)? it resonated with me that it might be nice to add a general
class (of some kind) to nmutil for use in doing things like... ooo....
popcount.

here's where the two functions are in microwatt, feel free to use this
as a guide:
https://github.com/antonblanchard/microwatt/blob/master/logical.vhdl

and here's where they need to go in the logical pipeline:
https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/logical/main_stage.py;h=622216bbf5c8d9f80e1ad04f0903f5b27e0f7102;hb=HEAD#l41

l.

---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68



More information about the libre-riscv-dev mailing list