Compare commits
2 Commits
dc437c99ca
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 58a759e00c | |||
| ce90d68554 |
@ -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")
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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