From: Sebastien Bourdeauducq Date: Thu, 2 May 2013 11:25:30 +0000 (+0200) Subject: flow/network/DataFlowGraph: add_buffered_connection X-Git-Tag: 24jan2021_ls180~2099^2~587 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=12deaa91d8b1afef7490b8196e983b83b07f8399;p=litex.git flow/network/DataFlowGraph: add_buffered_connection --- diff --git a/migen/flow/network.py b/migen/flow/network.py index fea4b791..5bc6847c 100644 --- a/migen/flow/network.py +++ b/migen/flow/network.py @@ -38,6 +38,13 @@ class DataFlowGraph(MultiDiGraph): source=source_ep, sink=sink_ep, source_subr=source_subr, sink_subr=sink_subr) + def add_buffered_connection(self, source_node, sink_node, + source_ep=None, sink_ep=None, + source_subr=None, sink_subr=None): + buf = AbstractActor(plumbing.Buffer) + self.add_connection(source_node, buf, source_ep=source_ep, source_subr=source_subr) + self.add_connection(buf, sink_node, sink_ep=sink_ep, sink_subr=sink_subr) + def add_pipeline(self, *nodes): for n1, n2 in zip(nodes, nodes[1:]): self.add_connection(n1, n2)