diff --git a/tools/net.awk b/tools/net.awk new file mode 100644 index 0000000000000000000000000000000000000000..25689c90d871618fc445bba5044446fa7198b2c5 --- /dev/null +++ b/tools/net.awk @@ -0,0 +1,27 @@ +BEGIN { + print "digraph {" +} +/op:/ { + id++ + op = $NF + opname = op "_" id + print opname "[\"label\"=\"" op " [" id "]" "\"]" +} +/input/ { + type = "input" +} +/output/ { + type = "output" +} +/argument/ { + if (type == "output") { + output[$NF] = opname + } else if (type == "input") { + if (output[$NF]) { + print output[$NF] " -> " opname + } + } +} +END { + print "}" +}