diff --git a/config.py b/config.py index fb138fd..dc52e56 100644 --- a/config.py +++ b/config.py @@ -1,6 +1,7 @@ import configparser from flow import MyFlow from designcfg import Design +import os class Config: @@ -17,6 +18,7 @@ class Config: print("Error: Fail to read config file %s" % config_file) # List of different sections (flows) of the .ini file self.multi_flows = self.config.sections() + self.cocoon_home = os.getcwd() def parse(self): flows = [] @@ -61,13 +63,12 @@ class Config: flow.verbose = sec.getboolean('verbose') - if sec.get('dreamplace_bin_path'): - flow.dreamplace_bin_path = sec.get('dreamplace_bin_path') - if sec.get('yosys_bin_path'): - flow.yosys_bin_path = sec.get('yosys_bin_path') if sec.get('cadence_version'): flow.cadence_version = sec.get('cadence_version') + flow.yosys_bin_path = os.path.join(self.cocoon_home, 'thirdparty/yosys/build/') + flow.dreamplace_bin_path = os.path.join(self.cocoon_home, 'thirdparty/DREAMPlace/install/dreamplace/Placer.py') + flow.config() return flow diff --git a/engine.py b/engine.py index 93c3a86..f8f3882 100644 --- a/engine.py +++ b/engine.py @@ -127,8 +127,8 @@ def run(design, flow, flow_name): proc_make = subprocess.Popen('make', cwd=run_path) # Start a child process proc_make.wait() # Wait until the process finishes assert proc_make.poll() == 0, "The flow failed and the process finished abnormally" - print(f"========== Finish IFT round [{i+1}] ==========\n\n") + print(f"========== Finish IFT round [{i+1}] ==========\n") end_t = time.time() - print("*************** Flow [{}] finishes in {:.1f} seconds ***************\n\n".format(flow_name, end_t - begin_t)) + print("*************** Flow [{}] finishes in {:.1f} seconds ***************\n".format(flow_name, end_t - begin_t)) diff --git a/run.py b/run.py index 232789c..4e7cbf7 100644 --- a/run.py +++ b/run.py @@ -21,7 +21,6 @@ if __name__ == "__main__": flows = config.parse() procs = [] - # Under construction (Multi-task) for flow in flows: procs.append(Process(target=engine.run, args=(flow[0], flow[1], flow[2],)))