flow: match record fields by position
This commit is contained in:
parent
df1ed32765
commit
6ce856290a
|
@ -22,12 +22,12 @@ class _Endpoint(Record):
|
|||
Record.__init__(self, full_layout)
|
||||
|
||||
class Source(_Endpoint):
|
||||
def connect(self, sink):
|
||||
return Record.connect(self, sink)
|
||||
def connect(self, sink, **kwargs):
|
||||
return Record.connect(self, sink, **kwargs)
|
||||
|
||||
class Sink(_Endpoint):
|
||||
def connect(self, source):
|
||||
return source.connect(self)
|
||||
def connect(self, source, **kwargs):
|
||||
return source.connect(self, **kwargs)
|
||||
|
||||
def get_endpoints(obj, filt=_Endpoint):
|
||||
if hasattr(obj, "get_endpoints") and callable(obj.get_endpoints):
|
||||
|
|
|
@ -210,4 +210,4 @@ class CompositeActor(Module):
|
|||
for u, v, d in dfg.edges_iter(data=True):
|
||||
ep_src = getattr(u, d["source"])
|
||||
ep_dst = getattr(v, d["sink"])
|
||||
self.comb += ep_src.connect(ep_dst)
|
||||
self.comb += ep_src.connect(ep_dst, match_by_position=True)
|
||||
|
|
Loading…
Reference in New Issue