From 00aac92cc6098e43dd44fce9c85896f3aaab6faa Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 20 Mar 2019 14:35:07 +0000 Subject: [PATCH] use FPNorm1ModSingle ospec, sort out setup --- src/add/nmigen_add_experiment.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/add/nmigen_add_experiment.py b/src/add/nmigen_add_experiment.py index 9faf303a..1a1a70a0 100644 --- a/src/add/nmigen_add_experiment.py +++ b/src/add/nmigen_add_experiment.py @@ -1256,15 +1256,14 @@ class FPNormToPack(FPState, FPID): # Normalisation (chained to input in_z+in_of) nmod = FPNorm1ModSingle(self.width) - n_out_z = FPNumBase(self.width) - n_out_roundz = Signal(reset_less=True) - nmod.setup(m, in_z, in_of, n_out_z) + n_out = nmod.ospec() + nmod.setup(m, in_z, in_of, n_out.z) + m.d.comb += n_out.roundz.eq(nmod.o.roundz) # Rounding (chained to normalisation) rmod = FPRoundMod(self.width) r_out_z = rmod.ospec() - rmod.setup(m, n_out_z, n_out_roundz) - m.d.comb += n_out_roundz.eq(nmod.o.roundz) + rmod.setup(m, n_out.z, n_out.roundz) m.d.comb += r_out_z.eq(rmod.out_z) # Corrections (chained to rounding) -- 2.30.2