Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mock-naja: add .lib file from a macro #236

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion sram/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,30 @@ filegroup(
output_group = "merged.lib",
)

filegroup(
name = "top_lib",
srcs = ["top_generate_abstract"],
output_group = "top.lib",
)

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

# FIXME some better way to deploy naja in Bazel environment is needed
Expand Down