Skip to content

odb, rsz: Fix hierarchical netlist editing issues of dbInsertBuffer::insertBufferBeforeLoads() - #9443

Merged
maliberty merged 15 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:secure-fix-repair-tie-name-collision
Feb 10, 2026
Merged

maliberty merged 15 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:secure-fix-repair-tie-name-collision

Conversation

@openroad-ci

Copy link
Copy Markdown
Member

Fix1 - Resolved name collision b/w a flat net and a hier net by repair_tie_fanout

Fixes #9437

Cause

  • repair_tie_fanout is called twice (one for TIE_HI and another for TIE_LO).
  • The two calls uses net as the new flat or hier net name.
  • When repair_tie_fanout for TIE_LO used a net name for an internal flat net, the following repair_tie_fanout for TIE_HI can use net name for a different hier net --> name collision b/w different flat and hier nets.

Solution

Name collision checker is enhanced to avoid the name collision b/w flat and hier nets.

Fix2 - Resolved incomplete dbModNet connection of the new buffer input pin by insertBufferBeforeLoads()

Fixes #9408

Cause

  • dbInsertBuffer::insertBufferBeforeLoads() produced an incomplete dbModNet connection in corner cases.

Solution

  • In dbInsertBuffer::insertBufferBeforeLoads(), dbModNet connection logic is enhanced to perform a complete dbModNet connection.
  • Added new insert_buffer test cases (BeforeLoads_Case29 ~ Case31).

Fix3 - Added fallback logic when a load pin is not connected to a net

Fixes #9409

image

QoR impact

ORFS dashboard based on OR (4f93607, Jan 31): Marginal QoR impact.

Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>

@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 introduces several important fixes and enhancements to hierarchical netlist editing, particularly within dbInsertBuffer::insertBufferBeforeLoads() and repair_tie_fanout. The changes address name collisions between flat and hierarchical nets, incomplete dbModNet connections, and crashes when handling unconnected load pins. The logic for creating unique net names has been made more robust by considering both flat and hierarchical scopes. The buffer insertion logic is improved to prevent creating combinational loops by correctly identifying and marking nets in the fan-in cone as non-reusable. Additionally, the code is made more resilient by replacing assertions with proper error handling and logging. The inclusion of new, targeted test cases for these complex hierarchical scenarios is a great addition and significantly improves confidence in the fixes. Overall, this is a solid contribution that enhances the tool's stability and correctness when dealing with hierarchical designs.

@github-actions

github-actions Bot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

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

Comment thread src/odb/include/odb/db.h
const dbNameUniquifyType& uniquify
= dbNameUniquifyType::ALWAYS);
= dbNameUniquifyType::ALWAYS,
dbNet* corresponding_flat_net = nullptr);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I seem to be missing where this new argument is used.

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.

dbBlock::makeNewModNetName() uses it.
The argument is to distinguish the following cases.

  • Typically, a new modnet name should be the same as its corresponding flat net name.
  • But the new modnet name must not conflict with any other flat net name that is not related to the modnet.

@github-actions

Copy link
Copy Markdown
Contributor

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

@jhkim-pii

Copy link
Copy Markdown
Contributor

This PR has QoR impact.
Updated ORFS metric in this PR: The-OpenROAD-Project/OpenROAD-flow-scripts#3877

@maliberty
maliberty merged commit 736d8cc into The-OpenROAD-Project:master Feb 10, 2026
10 checks passed
@maliberty
maliberty deleted the secure-fix-repair-tie-name-collision branch February 10, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants