Adding include prototype function for hiearchy
@@ -700,6 +700,25 @@ ss
#2. Create an entry for every key not found
pass
+ ###########################################################################
+ def include(self, name, filename=None):
+ '''
+ Include a component
+ '''
+
+ if filename == None:
+ module = importlib.import_module(name)
+ setup_design = getattr(module, "setup_design")
+ chip = setup_design()
+ else:
+ chip = siliconcompiler.Chip(design=name)
+ chip.readcfg(filename)
+
+ print(chip.get('design'))
+
+ return chip
+
+
###########################################################################
def _prune(self, cfg=None, top=True):
'''
