Skip to content

gpl: Expose PDK-aware GPL parameters and tuning defaults - #4434

Closed
oharboe wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
oharboe:gpl-tuning-params
Closed

oharboe wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
oharboe:gpl-tuning-params

Conversation

@oharboe

@oharboe oharboe commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Motivation

This Draft PR is a spin-off of #4418. While #4418 acts as scaffolding to study large discrepancies in Place vs. Detailed Route correlation (for which a reproducer is still being built), this PR extracts the PDK-aware global placement parameter tuning components which independently improve the baseline timing.

Description

This PR wires up configuration parameters to expose OpenROAD's -init_wirelength_coef and -virtual_cts_max_skew_fraction global placement arguments, allowing us to specify optimal defaults per PDK.

Note: The tools/OpenROAD submodule pointer is intentionally NOT updated in this PR. We've included the OpenROAD patch (patches/openroad/0001-Add-PDK-aware-GPL-parameters.patch) which applies locally during a Bazel build, but upstream ORFS will need the corresponding OpenROAD commit first.

Question for Maintainers:
Does this approach for exposing and tuning PDK-specific global placement parameters (GPL_WIRELENGTH_PENALTY and GPL_TIMING_SPAN_CLOCK_PERCENT) make sense for ORFS? Attached are the tuned numbers for sky130hd and asap7 for evaluation.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces PDK-aware global placement parameters, including documentation, default configurations, platform-specific settings, and an OpenROAD patch to support them. However, several critical issues were identified in the review: a mismatch in command-line option names in global_place.tcl prevents the parameters from being applied; the wirelengthPenalty variable is defined but unused in the placement algorithm; a potential division-by-zero error exists in timingBase.cpp when the timing weight span is zero; the clock period is hardcoded to 1.0f instead of using the actual design clock; and defaults.py lacks a type check, which could cause a crash if the platform configuration is not a dictionary.

Comment thread flow/scripts/global_place.tcl Outdated
Comment on lines +33 to +39
if { [info exists ::env(GPL_WIRELENGTH_PENALTY)] } {
lappend global_placement_args -init_wirelength_coef $::env(GPL_WIRELENGTH_PENALTY)
}

if { [info exists ::env(GPL_TIMING_SPAN_CLOCK_PERCENT)] } {
lappend global_placement_args -virtual_cts_max_skew_fraction $::env(GPL_TIMING_SPAN_CLOCK_PERCENT)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The option names passed to global_placement in this script (-init_wirelength_coef and -virtual_cts_max_skew_fraction) do not match the new option names introduced in the OpenROAD patch (-wirelength_penalty and -timing_weight_span_clock_percent). This mismatch means the new PDK-aware parameters will be completely ignored by the global placement engine, and the feature will not function as intended.

  if { [info exists ::env(GPL_WIRELENGTH_PENALTY)] } {
    lappend global_placement_args -wirelength_penalty $::env(GPL_WIRELENGTH_PENALTY)
  }

  if { [info exists ::env(GPL_TIMING_SPAN_CLOCK_PERCENT)] } {
    lappend global_placement_args -timing_weight_span_clock_percent $::env(GPL_TIMING_SPAN_CLOCK_PERCENT)
  }

Comment thread flow/scripts/defaults.py Resolved
- Expose OpenROAD global placement tuning parameters (-init_wirelength_coef and -virtual_cts_max_skew_fraction) in variables.yaml and global_place.tcl.
- Provide OpenROAD patch 0001-Add-PDK-aware-GPL-parameters.patch to enable these features.
- Set optimized default values for these variables in sky130hd and asap7 config.json files.
- Update variables.json and FlowVariables.md via generation scripts.
- Update defaults.py to correctly inject these variables.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
@oharboe
oharboe force-pushed the gpl-tuning-params branch from aa99ff7 to 71876a0 Compare August 14, 2026 17:39
@oharboe oharboe closed this Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant