Added possibility to start from ngc in ISE build
This commit is contained in:
@ -13,14 +13,16 @@ def do(config, target, log, subprocesses, prefix='.'):
|
||||
|
||||
stopafter = config.get(f'target.{target}', 'stopafter', fallback='')
|
||||
|
||||
log("Syntesize:")
|
||||
if config.get(f'target.{target}', 'ngc_in', fallback=None) is None:
|
||||
# Synthesize if no ngc is already given
|
||||
log("Syntesize:")
|
||||
|
||||
res = xst(config, target, log, subprocesses, prefix)
|
||||
if res != 0:
|
||||
log("ERROR: xst returned with", res)
|
||||
return res
|
||||
if stopafter=='synth':
|
||||
return res
|
||||
res = xst(config, target, log, subprocesses, prefix)
|
||||
if res != 0:
|
||||
log("ERROR: xst returned with", res)
|
||||
return res
|
||||
if stopafter=='synth':
|
||||
return res
|
||||
|
||||
log("Implement")
|
||||
|
||||
|
||||
@ -22,8 +22,18 @@ def ngdbuild(config, target, log, subprocesses, prefix='.') -> int:
|
||||
os.makedirs(build_dir, exist_ok=True)
|
||||
os.makedirs(out_dir, exist_ok=True)
|
||||
|
||||
if config.get(f'target.{target}', 'ngc_in', fallback=None) is None:
|
||||
ngcfile = f'{out_dir}/{target}.ngc'
|
||||
else:
|
||||
log(" - Synthesized design already given, start from there")
|
||||
ngcfile = config.get(f'target.{target}', 'ngc_in', fallback='')
|
||||
d = os.path.dirname(ngcfile)
|
||||
if d:
|
||||
os.makedirs(f"{build_dir}/{d}", exist_ok=True)
|
||||
shutil.copy(ngcfile, f'{build_dir}/{ngcfile}')
|
||||
|
||||
log(" - run ngdbuild")
|
||||
p = subprocess.Popen(f"ngdbuild -intstyle xflow -p {devstring} -uc {prefix}/{files_con[0]} {ngdbuild_opts} {out_dir}/{target}.ngc impl.ngd",
|
||||
p = subprocess.Popen(f"ngdbuild -intstyle xflow -p {devstring} -uc {prefix}/{files_con[0]} {ngdbuild_opts} {ngcfile} impl.ngd",
|
||||
shell=True, cwd=build_dir,
|
||||
stdin=subprocess.DEVNULL,
|
||||
# stdout=subprocess.DEVNULL,
|
||||
|
||||
Reference in New Issue
Block a user