From: Sebastien Bourdeauducq Date: Wed, 10 Apr 2013 19:33:56 +0000 (+0200) Subject: flow: match record fields by position X-Git-Tag: 24jan2021_ls180~2099^2~614 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6ce856290a8d285a1baf7d5cf02732e425b6e220;p=litex.git flow: match record fields by position --- diff --git a/migen/flow/actor.py b/migen/flow/actor.py index 2d7e134c..6d05917f 100644 --- a/migen/flow/actor.py +++ b/migen/flow/actor.py @@ -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): diff --git a/migen/flow/network.py b/migen/flow/network.py index a9970a74..4082720a 100644 --- a/migen/flow/network.py +++ b/migen/flow/network.py @@ -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)