From: Luke Kenneth Casson Leighton Date: Sun, 17 Feb 2019 08:22:03 +0000 (+0000) Subject: add extra comments X-Git-Tag: ls180-24jan2020~1932 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=688f4f6f6ce0737c05cda16bcaab6cf7d8ee72cb;p=ieee754fpu.git add extra comments --- diff --git a/src/add/fpbase.py b/src/add/fpbase.py index aba8c967..6e1644f5 100644 --- a/src/add/fpbase.py +++ b/src/add/fpbase.py @@ -149,7 +149,14 @@ class FPBase: m.d.sync += op.ack.eq(1) def denormalise(self, m, a): - """ denormalises a number + """ denormalises a number. this is probably the wrong name for + this function. for normalised numbers (exponent != minimum) + one *extra* bit (the implicit 1) is added *back in*. + for denormalised numbers, the mantissa is left alone + and the exponent increased by 1. + + both cases *effectively multiply the number stored by 2*, + which has to be taken into account when extracting the result. """ with m.If(a.e == a.N127): m.d.sync += a.e.eq(a.N126) # limit a exponent