Skip to content

Conversation

@LucasYuki
Copy link
Contributor

@LucasYuki LucasYuki commented Jan 15, 2026

Closes issue #9089

Changes:

  • Adds the method LayoutViewer::getChips().
    • Return all dbChip and dbChipInst.
  • Iterate through all blocks instead of using getBlock().
  • LayoutViewer::searchNearestViaEdge does the search using the block coordinates:
    • Transform the search variables to the current block coordinate system.
    • After searching the block, turn back the search variables to the global coordinate system.

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 pull request addresses issue #9089 by refactoring the ruler functionality to correctly handle multiple blocks within the layout. The changes involve iterating through all chip_insts and performing searches within each block's coordinate system. The getBounds function now correctly merges bounding boxes and die areas from all blocks, applying necessary transformations. The searchNearestViaEdge and selectViaShapesAt functions have been updated to accept a dbBlock* parameter, allowing them to operate within the context of a specific block. The review comments highlight a critical issue with coordinate transformations that could lead to incorrect results when handling closest_edge across different blocks.

@github-actions
Copy link
Contributor

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

@LucasYuki LucasYuki marked this pull request as draft January 18, 2026 16:01
@github-actions
Copy link
Contributor

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

@LucasYuki LucasYuki requested a review from maliberty January 19, 2026 19:42
@maliberty maliberty marked this pull request as ready for review January 19, 2026 22:45
@maliberty
Copy link
Member

maliberty commented Jan 21, 2026

This PR does not work for me

  • The measurements seem to always be in dbu regardless of Options->Show DBU.
  • It won't snap to a second die.

I tested with openroad -gui read_3dbx.tcl and

diff --git a/src/odb/test/data/example.3dbx b/src/odb/test/data/example.3dbx
index ef4a84dfb7..eb0617ad62 100644
--- a/src/odb/test/data/example.3dbx
+++ b/src/odb/test/data/example.3dbx
@@ -30,7 +30,7 @@ Stack:
     z: 0.0
     orient: R0
   soc_inst_duplicate:
-    loc: [100.0, 200.0]
+    loc: [100.0, 1300.0]
     z: 300.0
     orient: MZ

and couldn't snap to the upper die at all.

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