From: Luke Kenneth Casson Leighton Date: Sat, 23 Mar 2019 10:36:53 +0000 (+0000) Subject: pass through out_do_z into FPPack X-Git-Tag: ls180-24jan2020~1514 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=500170b99c9960a38c7549c13109542cf80c02c1;p=ieee754fpu.git pass through out_do_z into FPPack --- diff --git a/src/add/nmigen_add_experiment.py b/src/add/nmigen_add_experiment.py index 15f39d80..6baa0a45 100644 --- a/src/add/nmigen_add_experiment.py +++ b/src/add/nmigen_add_experiment.py @@ -1485,22 +1485,16 @@ class FPPackMod: m = Module() m.submodules.pack_in_z = self.i.z m.d.comb += self.o.mid.eq(self.i.mid) - with m.If(self.i.z.is_overflowed): - m.d.comb += self.o.z.inf(self.i.z.s) + with m.If(~self.i.out_do_z): + with m.If(self.i.z.is_overflowed): + m.d.comb += self.o.z.inf(self.i.z.s) + with m.Else(): + m.d.comb += self.o.z.create(self.i.z.s, self.i.z.e, self.i.z.m) with m.Else(): - m.d.comb += self.o.z.create(self.i.z.s, self.i.z.e, self.i.z.m) + m.d.comb += self.o.z.eq(self.i.z) return m -class FPPackData: - def __init__(self, width, id_wid): - self.z = FPNumOut(width, False) - self.mid = Signal(id_wid, reset_less=True) - - def eq(self, i): - return [self.z.eq(i.z), self.mid.eq(i.mid)] - - class FPPack(FPState): def __init__(self, width, id_wid):