add thirdparty
This commit is contained in:
parent
214bb70b4e
commit
01129b2e07
|
@ -1,6 +1,7 @@
|
||||||
import configparser
|
import configparser
|
||||||
from flow import MyFlow
|
from flow import MyFlow
|
||||||
from designcfg import Design
|
from designcfg import Design
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
|
@ -17,6 +18,7 @@ class Config:
|
||||||
print("Error: Fail to read config file %s" % config_file)
|
print("Error: Fail to read config file %s" % config_file)
|
||||||
# List of different sections (flows) of the .ini file
|
# List of different sections (flows) of the .ini file
|
||||||
self.multi_flows = self.config.sections()
|
self.multi_flows = self.config.sections()
|
||||||
|
self.cocoon_home = os.getcwd()
|
||||||
|
|
||||||
def parse(self):
|
def parse(self):
|
||||||
flows = []
|
flows = []
|
||||||
|
@ -61,13 +63,12 @@ class Config:
|
||||||
|
|
||||||
flow.verbose = sec.getboolean('verbose')
|
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'):
|
if sec.get('cadence_version'):
|
||||||
flow.cadence_version = 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()
|
flow.config()
|
||||||
return flow
|
return flow
|
||||||
|
|
||||||
|
|
|
@ -127,8 +127,8 @@ def run(design, flow, flow_name):
|
||||||
proc_make = subprocess.Popen('make', cwd=run_path) # Start a child process
|
proc_make = subprocess.Popen('make', cwd=run_path) # Start a child process
|
||||||
proc_make.wait() # Wait until the process finishes
|
proc_make.wait() # Wait until the process finishes
|
||||||
assert proc_make.poll() == 0, "The flow failed and the process finished abnormally"
|
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()
|
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
1
run.py
|
@ -21,7 +21,6 @@ if __name__ == "__main__":
|
||||||
flows = config.parse()
|
flows = config.parse()
|
||||||
procs = []
|
procs = []
|
||||||
|
|
||||||
# Under construction (Multi-task)
|
|
||||||
for flow in flows:
|
for flow in flows:
|
||||||
procs.append(Process(target=engine.run, args=(flow[0], flow[1], flow[2],)))
|
procs.append(Process(target=engine.run, args=(flow[0], flow[1], flow[2],)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue