Updating hiearchy example to support cross object set/get
import siliconcompiler
-a = siliconcompiler.Chip()
-design = 'top'
+# Top level
+topmodule = "liz"
+top = siliconcompiler.Chip(topmodule, loglevel="DEBUG")
+top.add('hier', topmodule, 'charlie', 'build', 'true')
+top.add('hier', topmodule, 'andy', 'build', 'true')
+top.add('hier', topmodule, 'annie', 'build', 'true')
+top.add('hier', topmodule, 'eddie', 'build', 'true')
+top.add('hier', 'charlie', 'willie', 'build', 'true')
-a.set('design', design)
-a.add('hier', design, 'a', 'build', 'true')
-a.add('hier', design, 'b', 'build', 'true')
-a.add('hier', design, 'c', 'build', 'true')
-a.add('hier', 'c', 'd', 'build', 'true')
+# Child module
+charlie = siliconcompiler.Chip("charlie", loglevel="DEBUG")
-a.writegraph('hier', 'hier.dot')
+# Print out Hiearchy
+top.writegraph('hier', 'hier.dot')
+
+# Accessing 2nd module from top
+print(top.get('design', chip=charlie))
#to view file
#dot -Tpng hier.dot > hier.png ; gimp hier.png
