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

Cleanup #261

Merged
merged 2 commits into from
Dec 21, 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
35 changes: 3 additions & 32 deletions openroad.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1285,31 +1285,7 @@ ORFS_STAGE_TO_VARIABLES = {
for stage in ALL_STAGES
}

STAGE_TO_VARIABLES = {
stage: [
variable
for variable, stages in BAZEL_VARIABLE_TO_STAGES.items()
if stage in stages
] + BAZEL_STAGE_TO_VARIABLES.get(stage, [])
for stage in ALL_STAGES
}

VARIABLE_TO_STAGES = {
variable: [
stage
for stage in ALL_STAGES
if variable in STAGE_TO_VARIABLES[stage]
]
for variable in _union(*STAGE_TO_VARIABLES.values())
}

[
fail("Variable {} is defined the same in ORFS and Bazel {}".format(variable, stages))
for variable, stages in VARIABLE_TO_STAGES.items()
if variable in ORFS_VARIABLE_TO_STAGES and sorted(ORFS_VARIABLE_TO_STAGES[variable]) == sorted(stages)
]

ALL_STAGE_TO_VARIABLES = {stage: _union(STAGE_TO_VARIABLES.get(stage, []), ORFS_STAGE_TO_VARIABLES.get(stage, [])) for stage in ALL_STAGES}
ALL_STAGE_TO_VARIABLES = {stage: ORFS_STAGE_TO_VARIABLES.get(stage, []) for stage in ALL_STAGES}

ALL_VARIABLE_TO_STAGES = {
variable: [
Expand Down Expand Up @@ -1435,20 +1411,15 @@ def orfs_flow(
"floorplan": [mock_area_name],
}

mock_stage_arguments = _merge(
stage_arguments,
MOCK_STAGE_ARGUMENTS,
)

_orfs_pass(
name = name,
verilog_files = verilog_files,
macros = macros,
sources = sources,
stage_sources = stage_sources,
stage_arguments = mock_stage_arguments,
stage_arguments = stage_arguments,
renamed_inputs = {},
arguments = arguments,
arguments = arguments | {"SYNTH_GUT": "1"},
extra_configs = extra_configs | mock_configs,
abstract_stage = "floorplan",
variant = mock_variant,
Expand Down
Loading