[libre-riscv-dev] div/mod algorithm written in python

Luke Kenneth Casson Leighton lkcl at lkcl.net
Sun Jul 7 21:32:27 BST 2019


Sorted lots of the Consts and put a test for when they're zero to stop
multiply by zero.

The operator as an enum is causing problems. nmigen barfs with all kinds of
weird errors, best to raise it as a feature request and drop the
DivOperator class, just use magic constants or a full Module of some kind,
with class constants (not enum based ones).

The for loops around the radix base are a perfect candidate for a module
split at some point.

Actually I may have been expecting the radix for loop to be an entire
combinatorial chain of modules, however it is difficult to tell as I don't
follow the algorithm's working.

L.



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


More information about the libre-riscv-dev mailing list