From e4e11ef6934f4be25146aa402d8597fd8fa9ca37 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 21 Mar 2019 18:27:34 +0000 Subject: [PATCH] create FPOpData in FPADDBase and use it --- 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 05226296..02d1a819 100644 --- a/src/add/nmigen_add_experiment.py +++ b/src/add/nmigen_add_experiment.py @@ -1869,9 +1869,7 @@ class FPADD(FPID): in_a = self.rs[0][0] in_b = self.rs[0][1] - out_z = FPOp(self.width) - out_mid = Signal(self.id_wid, reset_less=True) - m.submodules.out_z = out_z + o = FPOpData(self.width, self.id_wid) geta = self.add_state(FPGetOp("get_a", "get_b", in_a, self.width)) @@ -1888,10 +1886,10 @@ class FPADD(FPID): abd = ab.ispec() # create an input spec object for FPADDBase m.d.sync += [abd.a.eq(a), abd.b.eq(b), abd.mid.eq(self.ids.in_mid)] ab.setup(m, abd, getb.out_decode, self.ids.in_mid, - out_z, out_mid) + o.z, o.mid) pz = self.add_state(FPPutZIdx("put_z", ab.out_z, self.res, - out_mid, "get_a")) + o.mid, "get_a")) with m.FSM() as fsm: -- 2.30.2