flow: match record fields by position
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Wed, 10 Apr 2013 19:33:56 +0000 (21:33 +0200)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Wed, 10 Apr 2013 19:33:56 +0000 (21:33 +0200)
migen/flow/actor.py
migen/flow/network.py

index 2d7e134c628eb5d2d97f7b2b3c7fcab262a97a6c..6d05917f29822132ec2803d5d180470b4de1e62b 100644 (file)
@@ -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):
index a9970a74ad089397ca84c9493a11e6ced437b3f4..4082720aff8fc3357f1ad071943fe14b989adb62 100644 (file)
@@ -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)