add thirdparty

This commit is contained in:
Xinming Wei 2022-01-10 17:09:15 +08:00
parent 214bb70b4e
commit 01129b2e07
3 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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))

1
run.py
View File

@ -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],)))