From: Luke Kenneth Casson Leighton Date: Sat, 16 Feb 2019 08:55:09 +0000 (+0000) Subject: use get_op for get_b state too X-Git-Tag: ls180-24jan2020~1968 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dc7ec4300aa575b56412a6da68974a27245b8eec;p=ieee754fpu.git use get_op for get_b state too --- diff --git a/src/add/nmigen_add_experiment.py b/src/add/nmigen_add_experiment.py index 6f9f3a7e..5b648b9a 100644 --- a/src/add/nmigen_add_experiment.py +++ b/src/add/nmigen_add_experiment.py @@ -148,14 +148,7 @@ class FPADD: # gets operand b with m.State("get_b"): - with m.If((self.in_b.ack) & (self.in_b.stb)): - m.next = "unpack" - m.d.sync += [ - b.v.eq(self.in_b.v), - self.in_b.ack.eq(0) - ] - with m.Else(): - m.d.sync += self.in_b.ack.eq(1) + self.get_op(m, self.in_b, b.v, "unpack") # ****** # unpacks operands into sign, mantissa and exponent