From da0a0ebd8392145108b4b72ff8f044d8bd396de0 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 7 Apr 2019 13:15:58 +0100 Subject: [PATCH] pass i_ready in to d_valid dynamic stage function --- src/add/singlepipe.py | 3 ++- src/add/test_buf_pipe.py | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/add/singlepipe.py b/src/add/singlepipe.py index 248a5f6e..2f545428 100644 --- a/src/add/singlepipe.py +++ b/src/add/singlepipe.py @@ -541,7 +541,8 @@ class ControlBase: m.d.comb += self.p.s_o_ready.eq(self.p._o_ready & self.stage.d_ready) # intercept the next (incoming) "ready" and combine it with data valid - m.d.comb += self.n.d_valid.eq(self.n.i_ready & self.stage.d_valid) + sdv = self.stage.d_valid(self.n.i_ready) + m.d.comb += self.n.d_valid.eq(self.n.i_ready & sdv) return m diff --git a/src/add/test_buf_pipe.py b/src/add/test_buf_pipe.py index bfcd1a40..9fec02a7 100644 --- a/src/add/test_buf_pipe.py +++ b/src/add/test_buf_pipe.py @@ -607,8 +607,7 @@ class ExampleStageDelayCls(StageCls): return (self.count == 1)# | (self.count == 3) return Const(1) - @property - def d_valid(self): + def d_valid(self, i_ready): return self.count == self.valid_trigger return Const(1) -- 2.30.2