From: Luke Kenneth Casson Leighton Date: Thu, 28 Mar 2019 16:40:02 +0000 (+0000) Subject: use StageChain in FPADDBaseMod compact mode X-Git-Tag: ls180-24jan2020~1413 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3a96e3453a0d6b4d53e86b4bc961d399be5aac8f;p=ieee754fpu.git use StageChain in FPADDBaseMod compact mode --- 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))