From: Sebastien Bourdeauducq Date: Sat, 2 Nov 2013 22:15:03 +0000 (+0100) Subject: flow/plumbing/muxdemux: use existing connect() method instead of new function X-Git-Tag: 24jan2021_ls180~2099^2~451 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b4a7d36fa56eaea1de44e4ad9fa58f017aba2220;p=litex.git flow/plumbing/muxdemux: use existing connect() method instead of new function --- diff --git a/migen/flow/plumbing.py b/migen/flow/plumbing.py index a5af7e83..b9505990 100644 --- a/migen/flow/plumbing.py +++ b/migen/flow/plumbing.py @@ -3,14 +3,6 @@ from migen.flow.actor import * from migen.genlib.record import * from migen.genlib.misc import optree -def pipe(s1, s2): - r = [ - s2.stb.eq(s1.stb), - s2.payload.eq(s1.payload), - s1.ack.eq(s2.ack) - ] - return r - class Buffer(PipelinedActor): def __init__(self, layout): self.d = Sink(layout) @@ -75,7 +67,7 @@ class Multiplexer(Module): case = {} for i, sink in enumerate(sinks): - cases[i] = [pipe(sink, self.source)] + cases[i] = self.source.connect(sink) self.comb += Case(self.sel, cases) class Demultiplexer(Module): @@ -93,7 +85,7 @@ class Demultiplexer(Module): cases = {} for i, source in enumerate(sources): - cases[i] = [pipe(self.sink, source)] + cases[i] = source.connect(self.sink) self.comb += Case(self.sel, cases) # Actors whose layout should be inferred from what their single sink is connected to.