soc/interconnect/stream: improve Pipeline to allow passing endpoints
This commit is contained in:
parent
d85d2b7b9b
commit
f6aeb6e41a
|
@ -478,7 +478,16 @@ class Pipeline(Module):
|
||||||
self.sink = m.sink
|
self.sink = m.sink
|
||||||
for i in range(1, n):
|
for i in range(1, n):
|
||||||
m_n = modules[i]
|
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
|
m = m_n
|
||||||
# expose source of last module
|
# expose source of last module
|
||||||
# if available
|
# if available
|
||||||
|
|
Loading…
Reference in New Issue