Compare commits

..

2 Commits

Author SHA1 Message Date
58a759e00c Fixedcoregen ISE 2025-10-19 15:36:10 +02:00
ce90d68554 Added possibility to start from ngc in ISE build 2025-10-18 21:56:05 +02:00
3 changed files with 25 additions and 9 deletions

View File

@ -13,6 +13,8 @@ def do(config, target, log, subprocesses, prefix='.'):
stopafter = config.get(f'target.{target}', 'stopafter', fallback='')
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)

View File

@ -10,7 +10,7 @@ def coregen(config, target, log, subprocesses, prefix='.') -> int:
package = config.get(f'target.{target}', 'package', fallback='')
speedgrade = config.get(f'target.{target}', 'speedgrade', fallback='')
coregen_opts = config.get(f'target.{target}', 'coregen_opts', fallback='')
files_def = config.get(f'target.{target}', 'files_def', fallback='').split()
files_def = config.get(f'target.{target}', 'files_xco', fallback='').split()
build_dir = config.get(f'project', 'build_dir', fallback='build')
out_dir = config.get(f'project', 'out_dir', fallback='out')
@ -72,6 +72,10 @@ def coregen(config, target, log, subprocesses, prefix='.') -> int:
shutil.copy(f'{build_dir}/{cname}.xco', f'{out_dir}/{cname}.xco')
except FileNotFoundError:
pass
try:
shutil.copy(f'{build_dir}/{cname}.ucf', f'{out_dir}/{cname}.ucf')
except FileNotFoundError:
pass
else:
return res

View File

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