diff --git a/.github/scripts/smoketests.sh b/.github/scripts/smoketests.sh index fd4c600..4c7ccde 100755 --- a/.github/scripts/smoketests.sh +++ b/.github/scripts/smoketests.sh @@ -1,6 +1,8 @@ #!/bin/bash set -ex +bazel build cell_count + echo These targets should have been pruned bazel query //:* | grep -q -v lb_32x128_1_synth bazel query //:* | grep -q -v lb_32x128_2_floorplan diff --git a/BUILD b/BUILD index 6ed9651..b8f9a5a 100644 --- a/BUILD +++ b/BUILD @@ -199,6 +199,16 @@ SWEEP = { script = ":report-wns.tcl", ) for variant in SWEEP] +orfs_run( + name = "cell_count", + src = ":lb_32x128_floorplan", + outs = [ + "test.txt", + ], + extra_args = "> $WORK_HOME/test.txt", + script = ":cell_count.tcl", +) + genrule( name = "wns_report", srcs = ["wns-report.py"] + diff --git a/cell_count.tcl b/cell_count.tcl new file mode 100644 index 0000000..0726aa6 --- /dev/null +++ b/cell_count.tcl @@ -0,0 +1,6 @@ +source $::env(SCRIPTS_DIR)/load.tcl +load_design 2_floorplan.odb 2_floorplan.sdc + +report_clock_skew +report_tns +report_cell_usage diff --git a/openroad.bzl b/openroad.bzl index 7bee87e..31dc84c 100644 --- a/openroad.bzl +++ b/openroad.bzl @@ -601,7 +601,11 @@ def _run_impl(ctx): ctx.file._makefile.path, "run", ], - command = ctx.executable._make.path + " $@", + command = " ".join([ + ctx.executable._make.path, + "$@", + ctx.expand_location(ctx.attr.extra_args, ctx.attr.data), + ]), env = _data_arguments(ctx) | odb_environment(ctx) | flow_environment(ctx) | @@ -637,6 +641,10 @@ orfs_run = rule( mandatory = True, allow_empty = False, ), + "extra_args": attr.string( + mandatory = False, + default = "", + ), }, )