From: Luke Kenneth Casson Leighton Date: Sun, 7 Apr 2019 12:15:58 +0000 (+0100) Subject: pass i_ready in to d_valid dynamic stage function X-Git-Tag: ls180-24jan2020~1299 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=da0a0ebd8392145108b4b72ff8f044d8bd396de0;p=ieee754fpu.git pass i_ready in to d_valid dynamic stage function --- 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)