Skip to content

dbSta: check LEF Liberty pin directions#10820

Open
naveenvenk17 wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
naveenvenk17:nv-ip-checker-liberty-direction-4872
Open

dbSta: check LEF Liberty pin directions#10820
naveenvenk17 wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
naveenvenk17:nv-ip-checker-liberty-direction-4872

Conversation

@naveenvenk17

Copy link
Copy Markdown
Contributor

Summary

  • add LEF/LIB-CHK-011 to compare non-supply LEF pin directions with matching Liberty port directions
  • skip unmatched Liberty cells/ports and Liberty non-signal directions so LEF-only checks stay quiet
  • register a focused pass/fail regression fixture in both Bazel and CMake

Related to #4872.

Tests

  • PASS: git diff --check
  • PASS: bazelisk build --jobs=4 --local_cpu_resources=4 //src/dbSta:IpChecker
  • BLOCKED: bazelisk test --jobs=4 --local_cpu_resources=4 //src/dbSta/test:check_ip_liberty_direction-tcl_test on the Ubuntu 22.04 GCP VM fails before test execution while linking openroad with unresolved __isoc23_* glibc symbols from the Bazel LLVM/sysroot toolchain.

@naveenvenk17 naveenvenk17 requested a review from a team as a code owner July 5, 2026 15:38
@naveenvenk17 naveenvenk17 requested a review from maliberty July 5, 2026 15:38
@github-actions github-actions Bot added the size/M label Jul 5, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@naveenvenk17 naveenvenk17 force-pushed the nv-ip-checker-liberty-direction-4872 branch from 795f3df to c773456 Compare July 5, 2026 16:24
@maliberty

Copy link
Copy Markdown
Member

skip unmatched Liberty cells/ports and Liberty non-signal directions so LEF-only checks stay quiet

Why? You are assuming all unmatched ports are non-signal but what if they are not?

@naveenvenk17

Copy link
Copy Markdown
Contributor Author

Good point. The direction checker should not treat a missing Liberty port as non-signal by itself. I kept this PR scoped to LEF/LIB-CHK-011: once a matching Liberty pin exists, compare LEF and Liberty directions. The missing-LEF-signal-pin case is covered separately in #10821 as LEF/LIB-CHK-012, where LEF supply pins are skipped but LEF signal pins missing from the Liberty cell are warned. So the intended order is #10821 first, then this PR; I can fold #10821 into this branch if you prefer a single combined check.

@naveenvenk17 naveenvenk17 force-pushed the nv-ip-checker-liberty-direction-4872 branch from c773456 to fe6aff5 Compare July 6, 2026 10:52
Signed-off-by: Naveen Venkat <archgen.guest@nyayanidhi.in>
@naveenvenk17

Copy link
Copy Markdown
Contributor Author

Updated this branch on top of current upstream/master to refresh the stale lock/check context, and changed the direction-mismatch diagnostic ID from CHK-120 to CHK-111 so it does not collide with the missing-Liberty-cell/pin diagnostics in #10821.

On the unmatched-port question: this PR now remains scoped to direction comparison only when both LEF and Liberty pins exist; #10821 handles missing Liberty cells/pins as LEF/LIB-CHK-012. Once #10821 lands, this check composes with it instead of treating missing ports as non-signal.

Verified on the VM only:

  • $HOME/.local/bin/clang-format --dry-run --Werror src/dbSta/src/IpChecker.cc src/dbSta/include/db_sta/IpChecker.hh
  • $HOME/.local/bin/buildifier-v8.2.1 -mode=check -lint=warn src/dbSta/BUILD src/dbSta/test/BUILD
  • git diff --check
  • Ubuntu 24 Bazel container: bazelisk build //src/dbSta:IpChecker
  • Ubuntu 24 Bazel container: bazelisk test //src/dbSta/test:check_ip_liberty_direction-tcl_test
  • Ubuntu 24 Bazel container: bazelisk test //src/dbSta/test:all

All 75 dbSta test targets passed.

@naveenvenk17 naveenvenk17 force-pushed the nv-ip-checker-liberty-direction-4872 branch from fe6aff5 to 6e9dc8c Compare July 7, 2026 06:12
@maliberty

Copy link
Copy Markdown
Member

I find it harder to read when you split checkLibertyPinPresence and checkLibertyPinDirections with one relying on the invariants of the other. It would be easier to read with the checks combined rather than having to recheck existance and silently skip in a separate check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants