From f6aeb6e41a9f6737aa2980ddc96d7b10c9cf29e0 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Sat, 28 Nov 2015 18:31:47 +0100 Subject: [PATCH] soc/interconnect/stream: improve Pipeline to allow passing endpoints --- litex/soc/interconnect/stream.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/litex/soc/interconnect/stream.py b/litex/soc/interconnect/stream.py index 89231d1dd..45a3ccd39 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