Skip to content

Commit

Permalink
orfs_flow: add 'sources' support to orfs_sweep()
Browse files Browse the repository at this point in the history
Signed-off-by: Øyvind Harboe <[email protected]>
  • Loading branch information
oharboe committed Feb 2, 2025
1 parent f11fbdb commit f17243e
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 9 deletions.
42 changes: 35 additions & 7 deletions BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
load("@bazel-orfs-pip//:requirements.bzl", "requirement")
load("@rules_python//python:pip.bzl", "compile_pip_requirements")
load("//:eqy.bzl", "eqy_test")
load("//:openroad.bzl", "get_stage_args", "orfs_floorplan", "orfs_flow", "orfs_run")
load("//:openroad.bzl", "get_stage_args", "orfs_floorplan", "orfs_flow", "orfs_run", "orfs_macro")
load("//:ppa.bzl", "orfs_ppa")
load("//:sweep.bzl", "orfs_sweep")

Expand Down Expand Up @@ -162,22 +162,50 @@ orfs_run(
script = ":cell_count.tcl",
)

orfs_flow(
filegroup(
name = "tag_array_64x184_libs",
srcs = ["tag_array_64x184_generate_abstract"],
output_group = "tag_array_64x184.lib",
)

filegroup(
name = "tag_array_64x184_lefs",
srcs = ["tag_array_64x184_generate_abstract"],
output_group = "tag_array_64x184.lef",
)

orfs_macro(
name = "amalgam",
lef = "tag_array_64x184_lefs",
lib = "tag_array_64x184_libs",
module_top = "tag_array_64x184",
)

orfs_sweep(
name = "L1MetadataArray",
abstract_stage = "cts",
arguments = FAST_SETTINGS |
{
"SDC_FILE": "$(location :test/constraints-top.sdc)",
"SYNTH_HIERARCHICAL": "1",
"CORE_UTILIZATION": "3",
"RTLMP_FLOW": "1",
"CORE_MARGIN": "2",
"MACRO_PLACE_HALO": "30 30",
"PLACE_DENSITY": "0.10",
},
macros = ["tag_array_64x184_generate_abstract"],
stage_sources = {
"synth": [":test/constraints-top.sdc"],
sweep = {
"base": {
"macros": ["tag_array_64x184_generate_abstract"],
"sources": {
"SDC_FILE": [":test/constraints-top.sdc"],
},
},
"1": {
"macros": ["amalgam"],
"sources": {
"SDC_FILE": [":test/constraints-top.sdc"],
},
},
},
verilog_files = ["test/rtl/L1MetadataArray.sv"],
)
Expand Down Expand Up @@ -357,8 +385,8 @@ py_binary(
"plot-retiming.py",
],
main = "plot-retiming.py",
deps = [requirement("matplotlib")],
visibility = ["//visibility:public"],
deps = [requirement("matplotlib")],
)

filegroup(
Expand Down
14 changes: 12 additions & 2 deletions sweep.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,17 @@ def orfs_sweep(

for variant in all_variants:
for key in all_variants[variant].keys():
if key not in ["arguments", "dissolve", "macros", "previous_stage", "renamed_inputs", "stage_arguments", "stage_sources", "description"]:
if key not in [
"arguments",
"dissolve",
"macros",
"previous_stage",
"renamed_inputs",
"stage_arguments",
"stage_sources",
"description",
"sources",
]:
fail("Unknown orfs_sweep() key \"" + key + "\" in " + variant)

orfs_flow(
Expand All @@ -83,7 +93,7 @@ def orfs_sweep(
},
variant = variant,
verilog_files = verilog_files,
sources = sources,
sources = sources | all_variants[variant].get("sources", {}),
abstract_stage = abstract_stage,
visibility = visibility,
)
Expand Down

0 comments on commit f17243e

Please sign in to comment.