From dc7ec4300aa575b56412a6da68974a27245b8eec Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 16 Feb 2019 08:55:09 +0000 Subject: [PATCH] use get_op for get_b state too --- src/add/nmigen_add_experiment.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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 -- 2.30.2