process nxt.o_data in connect_out, not prev data
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 12 Apr 2019 01:47:37 +0000 (02:47 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 12 Apr 2019 01:47:37 +0000 (02:47 +0100)
src/add/singlepipe.py

index e32a053610b09a2f867ca82c02befd341f639d13..93712077b6b80b5a7cafb81dc17d20f4db7a8526 100644 (file)
@@ -280,10 +280,10 @@ class NextControl:
             do not use to connect stage-to-stage!
         """
         i_ready = nxt.i_ready if direct else nxt.i_ready_test
-        o_data = fn(self.o_data) if fn is not None else self.o_data
+        o_data = fn(nxt.o_data) if fn is not None else nxt.o_data
         return [nxt.o_valid.eq(self.o_valid),
                 self.i_ready.eq(i_ready),
-                eq(nxt.o_data, o_data),
+                eq(o_data, self.o_data),
                ]