From: Luke Kenneth Casson Leighton Date: Thu, 28 Mar 2019 15:51:47 +0000 (+0000) Subject: solve sync/comb issue with using state-machine or pipeline in FPNormToPack X-Git-Tag: ls180-24jan2020~1418 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e91061a2bb6ce6cfcf52094b778a0ec6cb20b791;p=ieee754fpu.git solve sync/comb issue with using state-machine or pipeline in FPNormToPack --- diff --git a/src/add/nmigen_add_experiment.py b/src/add/nmigen_add_experiment.py index 16163e07..7646cc4e 100644 --- a/src/add/nmigen_add_experiment.py +++ b/src/add/nmigen_add_experiment.py @@ -1249,14 +1249,13 @@ class FPNormToPack(FPState, UnbufferedPipeline): chain.setup(m, i) self.out_z = pmod.ospec() - # XXX TODO: sync for state-based - m.d.comb += self.out_z.mid.eq(pmod.o.mid) - m.d.comb += self.out_z.z.eq(pmod.o.z) # outputs packed result + self.o = pmod.o def process(self, i): - return self.out_z + return self.o def action(self, m): + m.d.sync += self.out_z.eq(self.process(None)) m.next = "pack_put_z"