reduce LHS for RSQRT by a factor of fract_width and
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 24 Jul 2019 10:11:53 +0000 (11:11 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 24 Jul 2019 10:11:53 +0000 (11:11 +0100)
"sensible answers" start appearing from the div/sqrt/rsqrt algorithm

src/ieee754/div_rem_sqrt_rsqrt/core.py

index adc68ffcc5e300d1871df36909b69ac5c971d9a8..2e5240383d7a65d5f01c248ec6851178d6368218 100644 (file)
@@ -249,7 +249,7 @@ class DivPipeCoreSetupStage(Elaboratable):
                 self.i.divisor_radicand << (self.core_config.fract_width * 2))
         with m.Else():  # DivPipeCoreOperation.RSqrtRem
             m.d.comb += self.o.compare_lhs.eq(
-                1 << (self.core_config.fract_width * 3))
+                1 << (self.core_config.fract_width * 2))
 
         m.d.comb += self.o.compare_rhs.eq(0)
         m.d.comb += self.o.operation.eq(self.i.operation)