From: Luke Kenneth Casson Leighton Date: Sun, 21 Jul 2019 17:44:11 +0000 (+0100) Subject: add comment on what mantissas represent X-Git-Tag: ls180-24jan2020~794 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9c464db05483b76f7f59f77e5d339449eafb9207;p=ieee754fpu.git add comment on what mantissas represent --- diff --git a/src/ieee754/fpdiv/div0.py b/src/ieee754/fpdiv/div0.py index 30d92c6d..90c98847 100644 --- a/src/ieee754/fpdiv/div0.py +++ b/src/ieee754/fpdiv/div0.py @@ -76,6 +76,12 @@ class FPDivStage0Mod(Elaboratable): # do conversion here, of both self.i.a and self.i.b, # into DivPipeCoreInputData dividend and divisor. + # the mantissas, having been de-normalised (and containing + # a "1" in the MSB) represent numbers in the range 0.5 to + # 0.9999999-recurring. the min and max range of the + # result is therefore 0.4999999 (0.5/0.99999) and 1.9999998 + # (0.99999/0.5). + m.d.comb += [self.o.z.e.eq(self.i.a.e - self.i.b.e + 1), self.o.z.s.eq(self.i.a.s ^ self.i.b.s) self.o.dividend.eq(self.i.a.m), # TODO: check