From: Florent Kermarrec Date: Sat, 28 Nov 2015 17:31:47 +0000 (+0100) Subject: soc/interconnect/stream: improve Pipeline to allow passing endpoints X-Git-Tag: 24jan2021_ls180~2038 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f6aeb6e41a9f6737aa2980ddc96d7b10c9cf29e0;p=litex.git soc/interconnect/stream: improve Pipeline to allow passing endpoints --- diff --git a/litex/soc/interconnect/stream.py b/litex/soc/interconnect/stream.py index 89231d1d..45a3ccd3 100644 --- a/litex/soc/interconnect/stream.py +++ b/litex/soc/interconnect/stream.py @@ -478,7 +478,16 @@ class Pipeline(Module): self.sink = m.sink for i in range(1, n): m_n = modules[i] - self.comb += m.source.connect(m_n.sink) + if isinstance(m, _Endpoint): + source = m + else: + source = m.source + if isinstance(m_n, _Endpoint): + sink = m_n + else: + sink = m_n.sink + if m is not m_n: + self.comb += Record.connect(source, sink) m = m_n # expose source of last module # if available