Skip to content

Commit

Permalink
naja: use merged.lib
Browse files Browse the repository at this point in the history
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
  • Loading branch information
oharboe committed Oct 20, 2024
1 parent 4bf9a52 commit 5021f5e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions openroad.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,8 @@ def _yosys_impl(ctx):
for output in SYNTH_OUTPUTS:
synth_outputs.append(_declare_artifact(ctx, "results", output))

synth_outputs.append(_declare_artifact(ctx, "objects", "lib/merged.lib"))

commands = _generation_commands(synth_logs) + [ctx.executable._make.path + " $@"]
ctx.actions.run_shell(
arguments = [
Expand Down
13 changes: 11 additions & 2 deletions sram/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,22 @@ filegroup(
output_group = "1_synth.v",
)

filegroup(
name = "sdq_17x64_synth_mergedlib",
srcs = ["sdq_17x64_naja_synth"],
output_group = "merged.lib",
)

# Read in the renamed synthesis output from above and provide
# the original name to the next stage
genrule(
name = "naja",
srcs = [":sdq_17x64_synth_unedited"],
srcs = [
":sdq_17x64_synth_unedited",
":sdq_17x64_synth_mergedlib",
],
outs = ["naja.v"],
cmd = "mkdir -p `dirname $@`; echo \"// imagine naja edits in this file\" > $@ && cat $< >> $@",
cmd = "mkdir -p `dirname $@`; ls $(location :sdq_17x64_synth_mergedlib); echo \"// imagine naja edits in this file\" > $@ && cat $(location :sdq_17x64_synth_unedited) >> $@",
)

genrule(
Expand Down

0 comments on commit 5021f5e

Please sign in to comment.