Skip to content

Commit 11c4ecd

Browse files
committed
openroad.bzl: Added including logs from abstract stage
Signed-off-by: Grzegorz Latosinski <[email protected]>
1 parent f546bea commit 11c4ecd

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

openroad.bzl

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,12 +415,18 @@ def _yosys_impl(ctx, canonicalize, log_names = [], report_names = []):
415415
for report in report_names:
416416
reports.append(ctx.actions.declare_file("reports/{}/{}/base/{}".format(_platform(ctx), _module_top(ctx), report)))
417417

418+
previous_logs = []
419+
previous_reports = []
418420
if canonicalize:
419421
verilog_files = ctx.files.verilog_files
420422
rtlil = []
421423
synth_outputs = [ctx.actions.declare_file(result_dir + "1_synth.rtlil")]
422-
previous_logs = []
423-
previous_reports = []
424+
425+
for dep in ctx.attr.deps:
426+
if dep[LoggingInfo].logs:
427+
previous_logs.extend(dep[LoggingInfo].logs)
428+
if dep[LoggingInfo].reports:
429+
previous_reports.extend(dep[LoggingInfo].reports)
424430
else:
425431
verilog_files = []
426432
rtlil = [ctx.attr.canonicalized[CanonicalizeInfo].rtlil]
@@ -429,8 +435,8 @@ def _yosys_impl(ctx, canonicalize, log_names = [], report_names = []):
429435
ctx.actions.declare_file(result_dir + "1_synth.sdc"),
430436
ctx.actions.declare_file(result_dir + "mem.json"),
431437
]
432-
previous_logs = ctx.attr.canonicalized[LoggingInfo].logs
433-
previous_reports = ctx.attr.canonicalized[LoggingInfo].reports
438+
previous_logs.extend(ctx.attr.canonicalized[LoggingInfo].logs)
439+
previous_reports.extend(ctx.attr.canonicalized[LoggingInfo].logs)
434440

435441
command = _add_optional_generation_to_command("make $@", logs + reports)
436442

0 commit comments

Comments
 (0)