[Libre-soc-dev] popcount

Luke Kenneth Casson Leighton lkcl at lkcl.net
Wed Feb 17 01:43:32 GMT 2021


https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/fu/logical/popcount.py;hb=HEAD

then the bleedin obvious version used in the formal proof:

https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/fu/logical/formal/proof_main_stage.py;h=e7cf254a8f31be2a2a783b47027261a7a9116ae1;hb=5ddbf2700780ecada5285b722025452641a28b0f#l23

tree version, which relies on first iteration being a python list, then the
next iteration it has a list of lists, but the same code works on both, i
mean, i wrote it based on the microwatt popcount tree algorithm and i
totally couldn't tell you how it works.

but, the formal proof says "yep it's equivalent to the bleedin obvious
version" so pffh :)

l.


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


More information about the Libre-soc-dev mailing list