From 12deaa91d8b1afef7490b8196e983b83b07f8399 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 2 May 2013 13:25:30 +0200 Subject: [PATCH] flow/network/DataFlowGraph: add_buffered_connection --- migen/flow/network.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/migen/flow/network.py b/migen/flow/network.py index fea4b7914..5bc6847c6 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)