Skip to content

odb: encapsulate inst module assignment#10819

Open
naveenvenk17 wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
naveenvenk17:nv-odb-inst-module-setter-10282
Open

odb: encapsulate inst module assignment#10819
naveenvenk17 wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
naveenvenk17:nv-odb-inst-module-setter-10282

Conversation

@naveenvenk17

@naveenvenk17 naveenvenk17 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • route module parent changes through _dbInst helper methods instead of direct module_ writes
  • emit inDbPostInstParentChange when an instance is reparented between modules
  • keep quiet module assignment for serialization, creation, and removal paths that must not fire callbacks

Tests

  • PASS: bazelisk build --jobs=4 --local_cpu_resources=4 //src/odb/src/db:db
  • BLOCKED: bazelisk test --jobs=4 --local_cpu_resources=4 //src/dbSta/test:sdc_modinst_slash-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
@github-actions github-actions Bot added the size/S label Jul 5, 2026

@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 encapsulates the module_ member variable of _dbInst by making it private and introducing getter and setter methods (getModuleId, setModule, and setModuleQuiet). The setModule method handles triggering the inDbPostInstParentChange callback when an instance's parent module changes. Consequently, direct accesses and modifications to module_ across dbBlock.cpp, dbInst.cpp, and dbModule.cpp have been updated to use these new encapsulated methods. Additionally, a new helper function rebuildDbInstModuleHash was introduced in dbBlock.cpp to reconstruct the instance module hash map. There are no review comments, so I have no feedback to provide.

Fixes The-OpenROAD-Project#10282

Signed-off-by: Naveen Venkat <archgen.guest@nyayanidhi.in>
@naveenvenk17 naveenvenk17 force-pushed the nv-odb-inst-module-setter-10282 branch from 4908c75 to 791b8fa Compare July 5, 2026 16:52
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.

1 participant