From 3a96e3453a0d6b4d53e86b4bc961d399be5aac8f Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 28 Mar 2019 16:40:02 +0000 Subject: [PATCH] use StageChain in FPADDBaseMod compact mode --- src/add/nmigen_add_experiment.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/add/nmigen_add_experiment.py b/src/add/nmigen_add_experiment.py index 126f147b..77c03f80 100644 --- a/src/add/nmigen_add_experiment.py +++ b/src/add/nmigen_add_experiment.py @@ -1638,14 +1638,16 @@ class FPADDBaseMod: self.width, self.id_wid)) get.setup(m, self.i, self.in_t.stb, self.in_t.ack) - sc = self.add_state(FPAddSpecialCasesDeNorm(self.width, self.id_wid)) - sc.setup(m, get.o) + sc = FPAddSpecialCasesDeNorm(self.width, self.id_wid) + alm = FPAddAlignSingleAdd(self.width, self.id_wid) + n1 = FPNormToPack(self.width, self.id_wid) - alm = self.add_state(FPAddAlignSingleAdd(self.width, self.id_wid)) - alm.setup(m, sc.out) + chainlist = [sc, alm, n1] + chain = StageChain(chainlist, specallocate=True) + chain.setup(m, get.o) - n1 = self.add_state(FPNormToPack(self.width, self.id_wid)) - n1.setup(m, alm.a1o) + for mod in chainlist: + sc = self.add_state(mod) ppz = self.add_state(FPPutZ("pack_put_z", n1.out_z.z, self.o, n1.out_z.mid, self.o.mid)) -- 2.30.2