plumbing: use Record.connect in Multiplexer/ Demultiplexer
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 4 Nov 2013 12:46:37 +0000 (13:46 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Mon, 4 Nov 2013 20:22:05 +0000 (21:22 +0100)
migen/flow/plumbing.py

index b950599045678e2c02a88dfb688a9c458b724279..5c48af3d758e9323c653148939cf5a9f997e44aa 100644 (file)
@@ -67,7 +67,7 @@ class Multiplexer(Module):
 
                case = {}
                for i, sink in enumerate(sinks):
-                       cases[i] = self.source.connect(sink)
+                       cases[i] = Record.connect(sink, self.source)
                self.comb += Case(self.sel, cases)
 
 class Demultiplexer(Module):
@@ -85,7 +85,7 @@ class Demultiplexer(Module):
 
                cases = {}
                for i, source in enumerate(sources):
-                       cases[i] = source.connect(self.sink)
+                       cases[i] = Record.connect(self.sink, source)
                self.comb += Case(self.sel, cases)
 
 # Actors whose layout should be inferred from what their single sink is connected to.