From 9c464db05483b76f7f59f77e5d339449eafb9207 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 21 Jul 2019 18:44:11 +0100 Subject: [PATCH] add comment on what mantissas represent --- src/ieee754/fpdiv/div0.py | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.30.2