plumbing: use Record.connect in Multiplexer/ Demultiplexer

This commit is contained in:
Florent Kermarrec 2013-11-04 13:46:37 +01:00 committed by Sebastien Bourdeauducq
parent 7e2859f43f
commit 416c8af1e2

View file

@ -67,7 +67,7 @@ class Multiplexer(Module):
case = {} case = {}
for i, sink in enumerate(sinks): 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) self.comb += Case(self.sel, cases)
class Demultiplexer(Module): class Demultiplexer(Module):
@ -85,7 +85,7 @@ class Demultiplexer(Module):
cases = {} cases = {}
for i, source in enumerate(sources): 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) self.comb += Case(self.sel, cases)
# Actors whose layout should be inferred from what their single sink is connected to. # Actors whose layout should be inferred from what their single sink is connected to.