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

Wns report #222

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
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
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,21 @@ jobs:
[ $(find build ! -regex '.*/\(objects\|external\|test\)/.*' -regex '.*/1_.*\.log' | wc -l) -eq 0 ]
[ $(find build ! -regex '.*/\(objects\|external\|test\)/.*' -regex '.*/2_.*\.log' | wc -l) -gt 1 ]

test-builds:
name: Smoketests
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
env:
DEBIAN_FRONTEND: "noninteractive"
steps:
- name: Checkout bazel-orfs
uses: actions/checkout@v4
- name: Smoketests
run: |
bazel build lb_32x128_shared_synth_floorplan wns_report

test-target-local-clean-setup:
name: Local flow - clean setup
runs-on: ubuntu-22.04
Expand Down
70 changes: 55 additions & 15 deletions BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("//:eqy.bzl", "eqy_test")
load("//:openroad.bzl", "orfs_flow", "orfs_run")
load("//:openroad.bzl", "get_stage_args", "orfs_floorplan", "orfs_flow", "orfs_run")

exports_files(["mock_area.tcl"])

Expand Down Expand Up @@ -111,6 +111,15 @@ orfs_flow(
verilog_files = LB_VERILOG_FILES,
)

# buildifier: disable=duplicated-name
orfs_floorplan(
name = "lb_32x128_shared_synth_floorplan",
src = ":lb_32x128_synth",
arguments = get_stage_args("floorplan", {}, LB_ARGS),
data = LB_STAGE_SOURCES["floorplan"],
variant = "blah",
)

orfs_flow(
name = "lb_32x128_top",
arguments = LB_ARGS | {
Expand All @@ -136,30 +145,61 @@ orfs_flow(
verilog_files = LB_VERILOG_FILES,
)

# Use-case:
#
# bazel build --keep_going $(bazel query //:* | grep lb_32x128_density.*place\$)
DENSITY_SWEEP = [
0.70,
0.75,
0.80,
]
SWEEP = {
"1": {
"PLACE_DENSITY": "0.65",
},
"2": {
"PLACE_DENSITY": "0.70",
},
"3": {
"PLACE_DENSITY": "0.75",
},
"4": {
"PLACE_DENSITY": "0.80",
},
}

# buildifier: disable=duplicated-name
[
orfs_flow(
name = "lb_32x128",
abstract_stage = "place",
arguments = LB_ARGS | {
"PLACE_DENSITY": str(density),
},
abstract_stage = "cts",
arguments = LB_ARGS | SWEEP[variant],
# Share synthesis across all variants, the sweep
# differs from floorplan and onwards
previous_stage = {"floorplan": "lb_32x128_synth"},
stage_sources = LB_STAGE_SOURCES,
variant = "density_" + str(density),
variant = variant,
verilog_files = LB_VERILOG_FILES,
)
for density in DENSITY_SWEEP
for variant in SWEEP
]

[orfs_run(
name = "lb_32x128_" + variant + "_report",
src = ":lb_32x128_" + ("" if variant == "base" else variant + "_cts"),
outs = [
"lb_32x128_" + variant + ".yaml",
],
arguments = {
"OUTFILE": "$(location :lb_32x128_" + variant + ".yaml)",
},
script = ":report-wns.tcl",
) for variant in SWEEP]

genrule(
name = "wns_report",
srcs = ["wns-report.py"] +
[":lb_32x128_" + variant + ".yaml" for variant in SWEEP],
outs = ["lb_32x128_wns_report.md"],
cmd = (
"$(location :wns-report.py) > $@ " +
" ".join(["$(location :lb_32x128_" + variant + ".yaml)" for variant in SWEEP])
),
visibility = ["//visibility:public"],
)

orfs_flow(
name = "L1MetadataArray",
abstract_stage = "cts",
Expand Down
Loading