From 3b8bb3e86430a0994ee37ebdec0de063cc756394 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 21 Mar 2019 19:50:38 +0000 Subject: [PATCH] reduce setup args to FPCorrections --- src/add/nmigen_add_experiment.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/add/nmigen_add_experiment.py b/src/add/nmigen_add_experiment.py index f89f4d63..4addd9c1 100644 --- a/src/add/nmigen_add_experiment.py +++ b/src/add/nmigen_add_experiment.py @@ -1268,8 +1268,8 @@ class FPNormToPack(FPState, FPID): # Rounding (chained to normalisation) rmod = FPRoundMod(self.width, self.id_wid) + rmod.setup(m, n_out) r_out_z = rmod.ospec() - rmod.setup(m, n_out.z, n_out.roundz) m.d.comb += r_out_z.eq(rmod.out_z) # Corrections (chained to rounding) @@ -1317,11 +1317,9 @@ class FPRoundMod: def ospec(self): return FPRoundData(self.width, self.id_wid) - def setup(self, m, in_z, roundz): + def setup(self, m, i): m.submodules.roundz = self - - m.d.comb += self.i.z.eq(in_z) - m.d.comb += self.i.roundz.eq(roundz) + m.d.comb += self.i.eq(i) def elaborate(self, platform): m = Module() -- 2.30.2