From fa80526e83cf020899f8ae6bbbfe567b89a7cb81 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 28 Mar 2019 00:13:42 +0000 Subject: [PATCH] add ospec/ispec to FPAddSpecialCasesDeNorm, also comment out out_do_z --- src/add/nmigen_add_experiment.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/add/nmigen_add_experiment.py b/src/add/nmigen_add_experiment.py index 8bcccf4c..4fbd6c61 100644 --- a/src/add/nmigen_add_experiment.py +++ b/src/add/nmigen_add_experiment.py @@ -440,22 +440,29 @@ class FPAddSpecialCasesDeNorm(FPState): def __init__(self, width, id_wid): FPState.__init__(self, "special_cases") self.smod = FPAddSpecialCasesMod(width, id_wid) - self.out_z = self.smod.ospec() - self.out_do_z = Signal(reset_less=True) - self.dmod = FPAddDeNormMod(width, id_wid) - self.o = self.dmod.ospec() + self.o = self.ospec() + + def ispec(self): + return self.smod.ispec() + + def ospec(self): + return self.dmod.ospec() def setup(self, m, i): """ links module to inputs and outputs """ + # these only needed for break-out (early-out) + # out_z = self.smod.ospec() + # out_do_z = Signal(reset_less=True) self.smod.setup(m, i) self.dmod.setup(m, self.smod.o) - m.d.comb += self.out_do_z.eq(self.smod.o.out_do_z) + #m.d.comb += out_do_z.eq(self.smod.o.out_do_z) + + # out_do_z=True, only needed for early-out (split pipeline) + #m.d.sync += out_z.z.v.eq(self.smod.o.z.v) # only take output + #m.d.sync += out_z.mid.eq(self.smod.o.mid) # (and mid) - # out_do_z=True - m.d.sync += self.out_z.z.v.eq(self.smod.o.z.v) # only take output - m.d.sync += self.out_z.mid.eq(self.smod.o.mid) # (and mid) # out_do_z=False m.d.sync += self.o.eq(self.dmod.o) -- 2.30.2