Skip to content

Conversation

@oharboe
Copy link
Collaborator

@oharboe oharboe commented Dec 25, 2025

First build:

bazelisk build test/orfs/gcd:gcd_synth

Observe that clock period is picked up from variable and written out by write_sdc after synthesis, hence no further dependency on ABC_CLOCK_PERIOD_IN_PS variable:

$ grep create_clock $(bazelisk info bazel-bin)/test/orfs/gcd/results/asap7/gcd/base/1_synth.sdc
create_clock -name core_clock -period 310.0010 [get_ports {clk}]

First build:

    bazelisk build test/orfs/gcd:gcd_synth

Observe that clock period is picked up from variable and written
out by write_sdc after synthesis, hence no further dependency on
ABC_CLOCK_PERIOD_IN_PS variable:

    $ grep create_clock $(bazelisk info bazel-bin)/test/orfs/gcd/results/asap7/gcd/base/1_synth.sdc
    create_clock -name core_clock -period 310.0010 [get_ports {clk}]

Signed-off-by: Øyvind Harboe <[email protected]>
@oharboe oharboe requested a review from maliberty December 25, 2025 14:36
@oharboe
Copy link
Collaborator Author

oharboe commented Dec 25, 2025

@MrAMS FYI

Copy link
Contributor

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

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 makes the clock period for the gcd test design configurable via a build argument. This is achieved by reading the ABC_CLOCK_PERIOD_IN_PS environment variable in the SDC file. The changes are correct and achieve the intended goal. I've added one suggestion to improve the robustness of the SDC script by providing a default value for the clock period in case the environment variable is not set.

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

"OPENROAD_HIERARCHICAL": "1",
# Demonstrate clock period specified in arguments, useful
# for Optuna scripts.
"ABC_CLOCK_PERIOD_IN_PS": "310.001",
Copy link
Member

Choose a reason for hiding this comment

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

Curious why you went for 310.001 and not 310

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same number as it used to be, but textually different, so I was in no doubt it is working and I don't have to redo metadata for tests.

@maliberty maliberty merged commit a04a521 into The-OpenROAD-Project:master Dec 25, 2025
13 checks passed
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.

2 participants