Skip to content

Commit

Permalink
bazel run: synth/canonicalize nit
Browse files Browse the repository at this point in the history
yosys-dependencies is now run during bazel run so that
e.g. make memory does not first spit out lots of surprising output

Signed-off-by: Øyvind Harboe <[email protected]>
  • Loading branch information
oharboe committed Sep 4, 2024
1 parent ab6136f commit 90cb37c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion deploy.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ main() {
cp --force "$make" "$dst/make"
cp --force --no-preserve=all "$config" "$dst/config.mk"

if [[ "$make" == *synth* || "$make" == *canonicalize* ]]; then
"$dst/make" yosys-dependencies
fi

exit $?
}

main --genfiles "${GENFILES}" --make "${MAKE}" --config "${CONFIG}" "$@"
main --genfiles "${GENFILES}" --make "${MAKE}" --config "${CONFIG}" "$@"
2 changes: 1 addition & 1 deletion openroad.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ def _yosys_impl(ctx, canonicalize, log_names = [], report_names = []):
ctx.actions.expand_template(
template = ctx.file._make_template,
output = make,
substitutions = flow_substitutions(ctx) | yosys_substitutions(ctx) | {'"$@"': 'WORK_HOME="./{}" DESIGN_CONFIG="config.mk" {} "$@"'.format(ctx.label.package, "yosys-dependencies" if not canonicalize else "")},
substitutions = flow_substitutions(ctx) | yosys_substitutions(ctx) | {'"$@"': 'WORK_HOME="./{}" DESIGN_CONFIG="config.mk" "$@"'.format(ctx.label.package)},
)

exe = ctx.actions.declare_file(ctx.attr.name + ".sh")
Expand Down

0 comments on commit 90cb37c

Please sign in to comment.