[libre-riscv-dev] div pipe
Luke Kenneth Casson Leighton
lkcl at lkcl.net
Mon Jul 20 02:38:28 BST 2020
On Monday, July 20, 2020, Jacob Lifshay <programmerjake at gmail.com> wrote:
> effectively what's happening is the code is treating the compare_?hs
> signals as if the binary value N means the fraction N/2^(3*fract_width)
> (essentially fixed-point numbers), so changing the bit width of N without
> adjusting the fract_width means there are too few integer bits and too many
> fractional bits.
ahh i remember. that took a while to get right when connecting to fpdiv.
> additionally, some of the shifts and bit sliced will have
> to be adjusted to get the right bits.
> > no reversion should be needed.
> except that, last I checked DivPipeCore doesn't correctly do divisions when
> configured to only support UDivRem, since that's when it enables the broken
> code adjustments.
yuk. hmm a way to "cheat" there: tell it that it can handle sqrt as well,
that at least provides a functional codepath. inefficient but functional.
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
More information about the libre-riscv-dev