X-Git-Url: https://git.libre-soc.org/?p=ieee754fpu.git;a=blobdiff_plain;f=src%2Fadd%2Ffpbase.py;h=db95eb13e2a4ef7ae7199c6a29e05865674fc62a;hp=bd20364992273638287b6aa9ad16e09eb79d4951;hb=892d640f8224e6a52907c6899ab6ab671f5f53af;hpb=ccd4d65a7bd2985edb5547daf7df623cda5ab9da diff --git a/src/add/fpbase.py b/src/add/fpbase.py index bd203649..db95eb13 100644 --- a/src/add/fpbase.py +++ b/src/add/fpbase.py @@ -558,14 +558,13 @@ class FPBase: with m.Else(): m.next = next_state - def roundz(self, m, z, out_z, roundz): + def roundz(self, m, z, roundz): """ performs rounding on the output. TODO: different kinds of rounding """ - #m.d.comb += out_z.copy(z) # copies input to output first with m.If(roundz): - m.d.sync += out_z.m.eq(z.m + 1) # mantissa rounds up + m.d.sync += z.m.eq(z.m + 1) # mantissa rounds up with m.If(z.m == z.m1s): # all 1s - m.d.sync += out_z.e.eq(z.e + 1) # exponent rounds up + m.d.sync += z.e.eq(z.e + 1) # exponent rounds up def corrections(self, m, z, next_state): """ denormalisation and sign-bug corrections