Adding scratch arg to schema
Needed to pass dynamic arguments to a step/tool to drive configuration when there is no practical to do this statically.
For multiprocessing, this parameter is defined on a per process basis and is a throwaway.
@@ -21,6 +21,9 @@ def schema_cfg():
# EDA setup
cfg = schema_eda(cfg)
+ # Dyanamic Tool Arguments
+ cfg = schema_arg(cfg)
+
# Metric tracking
cfg = schema_metric(cfg)
@@ -66,6 +69,9 @@ def schema_path(filename):
starting with $
'''
+ if filename==None:
+ return None
+
#Resolve absolute path usign SCPATH
#list is read left to right
scpaths = str(os.environ['SCPATH']).split(':')
@@ -1861,6 +1867,38 @@ def schema_eda(cfg):
return cfg
+###########################################################################
+# Local (not global!) parameters for controllings tools
+###########################################################################
+def schema_arg(cfg):
+
+
+ cfg['arg'] = {}
+
+ cfg['arg']['step'] = {
+ 'switch': '-arg_step',
+ 'type': 'str',
+ 'lock': 'false',
+ 'requirement': 'optional',
+ 'defvalue': None,
+ 'short_help': 'Current Execution Step',
+ 'param_help': "arg_step <str>",
+ 'example': ["cli: -arg_step 'route'",
+ "api: chip.set('arg', 'step', 'route')"],
+ 'help': """
+ Dynamic variable passed in by the sc runtime as an argument to
+ an EDA tool. The variable allows the EDA configuration code
+ (usually TCL) to use control flow that depend on the current
+ executions step rather than having separate files called
+ for each step.
+ """
+ }
+
+
+
+ return cfg
+
+
###########################################################################
# Metrics to Track
###########################################################################
