Implementing fork routine
Allows for easily parallelizing a step post-flow. Create a generic linear flow and then allow user to expand the step in parallel trivially!!!
@@ -449,6 +449,20 @@ class Chip:
self.logger.critical("EDA flow %s not found.", edaflow)
sys.exit(1)
+ ###########################################################################
+ def fork(self, step, n, index='0'):
+ '''
+ Clones a flowgraph step to n way. Settings from step/index are copied
+ n-way.
+ '''
+
+ print(self.cfg['flowgraph'][step][index])
+ cfglocal = copy.deepcopy(self.cfg['flowgraph'][step][index])
+
+ for i in range(n):
+ newindex = str(int(index)+i+1)
+ self.cfg['flowgraph'][step][newindex] = copy.deepcopy(cfglocal)
+
###########################################################################
def help(self, *args):
"""
