Skip to content

Conversation

@ahmed532
Copy link

Description

This PR introduces the check_3dblox TCL command, exposing the 3D-Blox checker functionality that was previously internal to the
read_3dbx command. This allows users to run physical integrity checks (overlap and floating chip detection) on 3D designs
independently of the loading process.

Key Changes

  • OpenRoad API: Added check3DBlox() to the OpenRoad class to provide a high-level interface for the checker.
  • TCL/SWIG Interface:
    • Exposed the new C++ method via check_3dblox_cmd in SWIG.
    • Defined the check_3dblox TCL command.
  • Refactoring: Updated read_3dbx to use the new check3DBlox() method internally, centralizing the checking logic.
  • Testing:
    • Added a comprehensive integration test (check_3dblox.tcl) that verifies:
      • Clean Design: No false positives on a valid 3D stack.
      • Overlap Detection: Correctly identifies overlapping chiplets in 3D space.
      • Perfect Stacking: Validates that exactly touching chips do not trigger overlap violations.
      • Floating Detection: Catches chiplets or sets of chiplets that are physically disconnected from the main stack
        (including vertical gaps).
    • Dynamically retrieve design dimensions and positions to avoid hardcoded magic numbers.

Motivation and Context

Providing check_3dblox as a standalone command allows for better interactive debugging and enables verification steps in flows
where the 3D database might be modified after initial loading.

How Has This Been Tested?

  • Manual verification using the debug-build/bin/openroad binary.
  • Integrated regression test suite via ctest -R odb.check_3dblox.tcl.

Closes: #9161

Refactor out check_3dblox command out of read_3dbx so we can run it
independently. Also, added tests to assert check_3dblox correctness.

Closes: The-OpenROAD-Project#9161

Signed-off-by: Ahmed R. Mohamed <[email protected]>
@ahmed532 ahmed532 self-assigned this Dec 30, 2025
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

The PR successfully exposes the 3D-Blox checker as a new TCL command check_3dblox and refactors the existing read_3dbx command to use it. The changes are logical and well-structured. I've found a potential crash in the new C++ implementation and have suggested a fix. Additionally, I've provided several suggestions to improve the new test script's maintainability and correctness by refactoring repeated code and making assertions more specific.

@github-actions
Copy link
Contributor

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

consolidate the test logic into a helper function and tighten
the test assertions `==` instead of `>`

Signed-off-by: Ahmed R. Mohamed <[email protected]>
@github-actions
Copy link
Contributor

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

Comment on lines 16 to 23
# Suppress noisy standard loading messages and checker warnings
suppress_message ODB 227
suppress_message ODB 128
suppress_message ODB 131
suppress_message ODB 133
suppress_message STA 1171
suppress_message ODB 156
suppress_message ODB 151
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason for this? usually if the logger messages are not environment/run dependent (like elapsed time or consumed memory), I prefer if they stay in the log.

Copy link
Author

Choose a reason for hiding this comment

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

No particular reason; just wanted to keep the .ok file simpler. I'll add them back if that is the convention, sure.

These messages are useful for debugging especially in CI runs.

Signed-off-by: Ahmed R. Mohamed <[email protected]>
@github-actions
Copy link
Contributor

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

@osamahammad21 osamahammad21 merged commit 9e6f0e0 into The-OpenROAD-Project:master Dec 30, 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.

3DBlox: check_3dblox command

3 participants