From: Sebastien Bourdeauducq Date: Sat, 16 Jun 2012 20:40:26 +0000 (+0200) Subject: flow/network: require ActorNode be passed to add_connection X-Git-Tag: 24jan2021_ls180~2099^2~911 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9af87367eb549b37fe37c42b0f64ad1fefbff519;p=litex.git flow/network: require ActorNode be passed to add_connection --- diff --git a/migen/flow/network.py b/migen/flow/network.py index 25d55d1b..e33f04e9 100644 --- a/migen/flow/network.py +++ b/migen/flow/network.py @@ -53,10 +53,8 @@ class DataFlowGraph(MultiDiGraph): def add_connection(self, source_node, sink_node, source_ep=None, sink_ep=None, # default: assume nodes have 1 source/sink and use that one source_subr=None, sink_subr=None): # default: use whole record - if not isinstance(source_node, ActorNode): - source_node = ActorNode(source_node) - if not isinstance(sink_node, ActorNode): - sink_node = ActorNode(sink_node) + assert(isinstance(source_node, ActorNode)) + assert(isinstance(sink_node, ActorNode)) self.add_edge(source_node, sink_node, source=source_ep, sink=sink_ep, source_subr=source_subr, sink_subr=sink_subr)