1
0
Fork 0
mirror of https://git.sr.ht/~kivikakk/niar synced 2024-12-22 18:22:24 +00:00

build: allow adding kwargs to prepare() call.

This commit is contained in:
Asherah Connor 2024-07-03 19:19:27 +03:00
parent 3d32cf809e
commit a931d328be

View file

@ -57,15 +57,16 @@ def main(np: Project, args):
subdir = type(platform).__name__ subdir = type(platform).__name__
with logtime(logging.DEBUG, "elaboration"): with logtime(logging.DEBUG, "elaboration"):
plan = platform.prepare( prepare_kwargs = {
design, "debug_verilog": args.verilog,
np.name, "yosys_opts": "-g",
debug_verilog=args.verilog, }
yosys_opts="-g", prepare_kwargs.update(getattr(platform, "prepare_kwargs", {}))
) plan = platform.prepare(design, np.name, **prepare_kwargs)
fn = f"{np.name}.il"
size = len(plan.files[fn]) il_fn = f"{np.name}.il"
logger.debug(f"{fn!r}: {size:,} bytes") il_size = len(plan.files[il_fn])
logger.debug(f"{il_fn!r}: {il_size:,} bytes")
with logtime(logging.DEBUG, "synthesis/pnr"): with logtime(logging.DEBUG, "synthesis/pnr"):
cr = CommandRunner(force=args.force) cr = CommandRunner(force=args.force)