Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

flow/network/DataFlowGraph: add_buffered_connection

  • Loading branch information...
commit 12deaa91d8b1afef7490b8196e983b83b07f8399 1 parent b5b29f6
Sébastien Bourdeauducq authored May 02, 2013

Showing 1 changed file with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. 7  migen/flow/network.py
7  migen/flow/network.py
@@ -38,6 +38,13 @@ def add_connection(self, source_node, sink_node,
38 38
 			source=source_ep, sink=sink_ep,
39 39
 			source_subr=source_subr, sink_subr=sink_subr)
40 40
 
  41
+	def add_buffered_connection(self, source_node, sink_node,
  42
+	  source_ep=None, sink_ep=None,
  43
+	  source_subr=None, sink_subr=None):
  44
+		buf = AbstractActor(plumbing.Buffer)
  45
+		self.add_connection(source_node, buf, source_ep=source_ep, source_subr=source_subr)
  46
+		self.add_connection(buf, sink_node, sink_ep=sink_ep, sink_subr=sink_subr)
  47
+
41 48
 	def add_pipeline(self, *nodes):
42 49
 		for n1, n2 in zip(nodes, nodes[1:]):
43 50
 			self.add_connection(n1, n2)

0 notes on commit 12deaa9

Please sign in to comment.
Something went wrong with that request. Please try again.