From 6ea65f957c94cbba2ccab176ae317e3b81643bd6 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Sat, 19 Dec 2015 21:49:45 +0100 Subject: [PATCH] soc/interconnect/stream: expose Endpoint --- litex/soc/interconnect/stream.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/litex/soc/interconnect/stream.py b/litex/soc/interconnect/stream.py index 45a3ccd3..9ddc5224 100644 --- a/litex/soc/interconnect/stream.py +++ b/litex/soc/interconnect/stream.py @@ -43,7 +43,7 @@ class EndpointDescription: return full_layout -class _Endpoint(Record): +class Endpoint(Record): def __init__(self, description_or_layout): if isinstance(description_or_layout, EndpointDescription): self.description = description_or_layout @@ -58,12 +58,12 @@ class _Endpoint(Record): return getattr(object.__getattribute__(self, "param"), name) -class Source(_Endpoint): +class Source(Endpoint): def connect(self, sink): return Record.connect(self, sink) -class Sink(_Endpoint): +class Sink(Endpoint): def connect(self, source): return source.connect(self) @@ -171,7 +171,7 @@ def _rawbits_layout(l): def pack_layout(l, n): return [("chunk"+str(i), l) for i in range(n)] -def get_endpoints(obj, filt=_Endpoint): +def get_endpoints(obj, filt=Endpoint): if hasattr(obj, "get_endpoints") and callable(obj.get_endpoints): return obj.get_endpoints(filt) r = dict() @@ -478,11 +478,11 @@ class Pipeline(Module): self.sink = m.sink for i in range(1, n): m_n = modules[i] - if isinstance(m, _Endpoint): + if isinstance(m, Endpoint): source = m else: source = m.source - if isinstance(m_n, _Endpoint): + if isinstance(m_n, Endpoint): sink = m_n else: sink = m_n.sink -- 2.30.2