From: Robert Jordens Date: Sun, 7 Sep 2014 06:09:53 +0000 (-0600) Subject: examples/dataflow: adapt to new simple MultiDiGraph implementation X-Git-Tag: 24jan2021_ls180~2099^2~305 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7518a7b0c0e0c555bdc48a2408a707639b3b0694;p=litex.git examples/dataflow: adapt to new simple MultiDiGraph implementation --- diff --git a/examples/dataflow/structuring.py b/examples/dataflow/structuring.py index ea2cea99..2342c343 100644 --- a/examples/dataflow/structuring.py +++ b/examples/dataflow/structuring.py @@ -59,7 +59,10 @@ if __name__ == "__main__": tb = TB() run_simulation(tb, ncycles=1000) - g_layout = nx.spectral_layout(tb.g) - nx.draw(tb.g, g_layout) - nx.draw_networkx_edge_labels(tb.g, g_layout, tb.reporter.get_edge_labels()) + g = nx.MultiDiGraph() + for u, v, edge in tb.g.edges_iter(): + g.add_edge(u, v, **edge) + g_layout = nx.spectral_layout(g) + nx.draw(g, g_layout) + nx.draw_networkx_edge_labels(g, g_layout, tb.reporter.get_edge_labels()) plt.show()