From 0e46e0d8575d9ac22b22dda836d5780d106de5a0 Mon Sep 17 00:00:00 2001 From: ganeshgore Date: Mon, 27 Jul 2020 14:08:58 -0600 Subject: [PATCH 1/2] Updated task.conf format to have transparent shell variables --- openfpga_flow/scripts/run_fpga_task.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/openfpga_flow/scripts/run_fpga_task.py b/openfpga_flow/scripts/run_fpga_task.py index 47492785f..6dbdb0036 100644 --- a/openfpga_flow/scripts/run_fpga_task.py +++ b/openfpga_flow/scripts/run_fpga_task.py @@ -343,6 +343,7 @@ def create_run_command(curr_job_dir, archfile, benchmark_obj, param, task_conf): # Make execution command to run Open FPGA flow task_gc = task_conf["GENERAL"] + task_OFPGAc = task_conf["OpenFPGA_SHELL"] command = [archfile] + benchmark_obj["files"] command += ["--top_module", benchmark_obj["top_module"]] command += ["--run_dir", curr_job_dir] @@ -351,14 +352,9 @@ def create_run_command(curr_job_dir, archfile, benchmark_obj, param, task_conf): command += ["--fpga_flow", task_gc.get("fpga_flow")] if task_gc.get("run_engine") == "openfpga_shell": - command += ["--openfpga_shell_template", - task_gc.get("openfpga_shell_template")] - command += ["--openfpga_arch_file", - task_gc.get("openfpga_arch_file")] - command += ["--openfpga_sim_setting_file", - task_gc.get("openfpga_sim_setting_file")] - command += ["--external_fabric_key_file", - task_gc.get("external_fabric_key_file")] + for eachKey in task_OFPGAc.keys(): + command += [f"--{eachKey}", + task_OFPGAc.get(f"{eachKey}")] if benchmark_obj.get("activity_file"): command += ["--activity_file", benchmark_obj.get("activity_file")] From 45af0563042db074f3cc4aec4cae23c3c97407dd Mon Sep 17 00:00:00 2001 From: ganeshgore Date: Mon, 27 Jul 2020 14:14:57 -0600 Subject: [PATCH 2/2] TASK_NAME and TASK_DIR variables are avaialble in config file now --- openfpga_flow/scripts/run_fpga_task.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openfpga_flow/scripts/run_fpga_task.py b/openfpga_flow/scripts/run_fpga_task.py index 6dbdb0036..6ab46e1df 100644 --- a/openfpga_flow/scripts/run_fpga_task.py +++ b/openfpga_flow/scripts/run_fpga_task.py @@ -190,6 +190,8 @@ def generate_each_task_actions(taskname): # Read task configuration file and check consistency task_conf = ConfigParser(allow_no_value=True, interpolation=ExtendedInterpolation()) + script_env_vars['PATH']["TASK_NAME"] = "/".join(taskname) + script_env_vars['PATH']["TASK_DIR"] = curr_task_dir task_conf.read_dict(script_env_vars) task_conf.read_file(open(curr_task_conf_file))