aboutsummaryrefslogtreecommitdiffstats
path: root/python/report_hierarchy.py
blob: 6d409a9bedac60b0aa7c50518537dfe358f48ce8 (plain)
1
2
3
4
5
6
7
8
9
10
def visit(indent, data):
	istr = " " * indent
	print("{}{}: {}".format(istr, data.name, data.type))
	for lname, gname in data.leaf_cells:
		print("{}    {} -> {}".format(istr, lname, gname))
	for lname, gname in data.hier_cells:
		visit(indent + 4, ctx.hierarchy[gname])

visit(0, ctx.hierarchy[ctx.top_module])