[libre-riscv-dev] partitioned compare and mux
programmerjake at gmail.com
Fri Feb 7 18:06:06 GMT 2020
On Fri, Feb 7, 2020, 07:42 Luke Kenneth Casson Leighton <lkcl at lkcl.net>
> ok so i think we're good there. would you like to tackle __neg__,
> __sub__, and __invert__? __invert__ is dead-easy, __neg__ and __sub__
> will need the PartitionedAdder except perhaps doing a "subtract" mode
> to it. line 199:
> just a mode-flag to PartitionedAdder "if self.subtract: return a - b
> else return a + b"
For the signed multiply I just used the identity a - b = a + ~b + 1 where 1
Rather than adding subtract and negate modes, i think it would be more
worthwhile to implement carry-in/carry-out.
More information about the libre-riscv-dev