add experiment override of i_ready test
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 5 Apr 2019 22:57:14 +0000 (23:57 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 5 Apr 2019 22:57:14 +0000 (23:57 +0100)
src/add/singlepipe.py

index 02b8235285e594b2a3042cafcec44b061ff8cc19..f88907e10877c620fa85f0b1c8a692948542eb82 100644 (file)
@@ -233,6 +233,13 @@ class NextControl:
             return self.s_o_valid
         return self._o_valid
 
+    def i_ready_logic(self):
+        """ public-facing API: receives indication that transmit is possible
+        """
+        if self.stage_ctl:
+            return self.i_ready & self.s_o_valid
+        return self.i_ready
+
     def connect_to_next(self, nxt):
         """ helper function to connect to the next stage data/valid/ready.
             data/valid is passed *TO* nxt, and ready comes *IN* from nxt.