Skip to content

3DIC timing analysis support in dbSta (Stages 0–8)#10417

Open
dsengupta0628 wants to merge 21 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:3dic-sta-v1
Open

3DIC timing analysis support in dbSta (Stages 0–8)#10417
dsengupta0628 wants to merge 21 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:3dic-sta-v1

Conversation

@dsengupta0628
Copy link
Copy Markdown
Contributor

Summary

Enable cross-chiplet STA on 3DBlox designs. read_3dbx now produces a single unified STA graph spanning multiple chiplets connected via bump pads / top-level nets / 3D bond regions. report_checks reports constrained flop-to-flop setup checks across chiplet boundaries with the natural create_clock [get_pins -of_objects [get_nets <top_net>]] SDC form. This version uses a zero-delay parasitic model on every chip-bump and chipnet — STA's fat-net wire-edge model traverses cross-chiplet connections directly. Per-dbChipConn RC binding (real bond/TSV delay) is deferred post-v1; the binding hook is Parasitics::makeParasiticNetwork(chipNet) when added.

Implemented in three commits:

Stages 0–6.5 — adapter foundation. Multi-block ownership in dbNetwork, pointer-tag encoding for dbChipBumpInst / dbChipInst / dbChipNet, chip-aware overrides in the four core iterators (childIterator, pinIterator, netIterator, NetPinIterator), term(Pin*) cross-boundary bridge, dbChipBumpInst 8-byte alignment fix, side-map for chip-bump VertexId, per-master synthetic Cell so cell(chip_inst) returns non-null, findInstance path-split for chipA/ff/CK-style queries.

Stage 7 — close cross-chiplet flop-to-flop path. direction(chip_bump) = BIDIRECT (Graph builds dual vertices + wire edges runs on every bump regardless of underlying bterm IoType). visitConnectedPins(Net*) chip-net branch descends each bump's inner net via term() so the fat-net wire-edge model reaches leaf loads across the boundary. Plus chip-bump clock-anchor caveat: synthetic LibertyCell per chiplet definition carries a zero-delay combinational self-arc per chip-bump port so Graph::makeInstanceEdges builds the internal load → bidir_drvr edge clock arrival needs; per-block 4-bit discriminator in getDbNwkObjectId so cross-block iterm/bterm/net ids don't collide in NetSet/PinSet.

Stage 8 — diagnostics. STA-3000 INFO summary on read_3dbx, STA-3001/3002 WARNs for orphan nets / unmapped bumps, Tcl helper report_3dic_summary. Fixture cleanup in 3dic_cross.tcl to satisfy upstream 3DBlox checker (Connection: + ground via bot: ~ + bmap XYs sized for BUMP macro center offset).

Tests: dbSta/test/3dic_cross.tcl (cross-chiplet flop-to-flop setup check, slack MET against 1 ns clock), dbSta/test/3dic_get_cells.tcl (structural iteration APIs). No src/sta/ edits.

Documentation: docs/contrib/3DIC.md.

Type of Change

  • New feature
  • Documentation update

Impact

Enable 3DIC timing analysis

Verification

  • I have verified that the local build succeeds (./etc/Build.sh).
  • I have run the relevant tests and they pass.
  • My code follows the repository's formatting guidelines.
  • I have included tests to prevent regressions.
  • I have signed my commits (DCO).

Related Issues

[Link issues here]

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
@dsengupta0628 dsengupta0628 self-assigned this May 13, 2026
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Welcome to OpenROAD! Thanks for opening your first PR.
Before we review:

Please ensure:

  • CI passes
  • Code is properly formatted
  • Tests are included where applicable
    A maintainer will review shortly!

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
Copy link
Copy Markdown
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

This pull request enables 3DIC Static Timing Analysis (STA) by extending dbNetwork to support chiplet instances, chip-nets, and bump-inst pins, including ID disambiguation via block discriminators and synthesized LibertyCells for clock propagation. It also introduces 3DIC-aware iterators, diagnostic reporting, and comprehensive documentation, while ensuring proper object alignment for pointer tagging. Review feedback correctly identified an inconsistency in the documentation and warning messages regarding the .bmap file format, noting that bterm_name is the 5th column rather than the 4th.

Comment thread docs/contrib/3DIC.md Outdated
Comment on lines +426 to +430
1. **`.bmap` 4th column binds bump → chiplet port.**
Format per line: `<bump_inst_name> <BUMP_macro> <x> <y> <bterm_name> <signal>`.
`bterm_name = "-"` leaves the bump unbound — STA cannot cross that
boundary. Always set the 4th column to a real chiplet `dbBTerm` name
unless the test specifically exercises unmapped bumps.
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.

medium

The documentation regarding the .bmap file format is inconsistent. The format string on line 427 shows <bterm_name> as the 5th field, but the description on lines 426 and 429 refers to it as the "4th column". This is confusing for users trying to create these files.

To ensure clarity, please update the column number to be consistent with the format string. It should be the 5th column.

Additionally, the related warning message STA-3002 also mentions "col 4", which should probably be updated as well for consistency.

Comment thread src/dbSta/src/dbSta.cc Outdated
logger_->warn(utl::STA,
3002,
"3DIC chiplet '{}': {}/{} bump pads not mapped to "
"a chiplet port (missing name in .bmap col 4). "
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.

medium

The column number in this warning message appears to be incorrect. The .bmap format is <bump_inst_name> <BUMP_macro> <bterm_name> , which makes the bterm_name the 5th column, not the 4th. This inconsistency can be confusing for users.

Please update the column number in the message to 5 for accuracy.

Suggested change
"a chiplet port (missing name in .bmap col 4). "
"a chiplet port (missing name in .bmap col 5). "

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

// Per-block discriminator stamped into upper bits of getDbNwkObjectId
// so iterms/bterms/insts/nets from different chiplet blocks (each
// numbered from 1) don't collide in NetSet/PinSet keys.
std::map<odb::dbBlock*, uint32_t> block_disc_;
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.

warning: no header providing "uint32_t" is directly included [misc-include-cleaner]

src/dbSta/include/db_sta/dbNetwork.hh:5:

- #include <map>
+ #include <cstdint>
+ #include <map>

Comment thread src/dbSta/src/dbNetwork.cc Outdated
LibertyBuilder builder(debug_, report_);
for (dbChipInst* chip_inst : chip->getChipInsts()) {
dbChip* master = chip_inst->getMasterChip();
if (master == nullptr || chip_master_cells_.count(master)) {
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.

warning: use 'contains' to check for membership [readability-container-contains]

Suggested change
if (master == nullptr || chip_master_cells_.count(master)) {
;contains


Pin* pin = db_network_->dbToSta(fake_bump);
ASSERT_NE(pin, nullptr);
EXPECT_EQ(reinterpret_cast<std::uintptr_t>(pin) & 0b111U, 4U);
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.

warning: no header providing "std::uintptr_t" is directly included [misc-include-cleaner]

src/dbSta/test/cpp/TestDbSta.cc:4:

- #include <cstdio>
+ #include <cstdint>
+ #include <cstdio>

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
@github-actions
Copy link
Copy Markdown
Contributor

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

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Comment thread src/odb/src/db/dbChipBumpInst.cpp Outdated
#include "dbChipBumpInst.h"

#include <cstdint>

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.

warning: included header cstdint is not used directly [misc-include-cleaner]

Suggested change

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
@openroad-ci openroad-ci requested review from a team as code owners May 13, 2026 17:56
@openroad-ci openroad-ci requested a review from maliberty May 13, 2026 17:56
…nc is used

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
@github-actions
Copy link
Copy Markdown
Contributor

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

@github-actions
Copy link
Copy Markdown
Contributor

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

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

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

… the umbrella and migrated downstream BUILDs in the same commit

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
@openroad-ci openroad-ci requested a review from a team as a code owner May 13, 2026 19:35
@openroad-ci openroad-ci requested a review from joaomai May 13, 2026 19:35
@dsengupta0628
Copy link
Copy Markdown
Contributor Author

@github-actions
Copy link
Copy Markdown
Contributor

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

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
@github-actions
Copy link
Copy Markdown
Contributor

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

@dsengupta0628
Copy link
Copy Markdown
Contributor Author

dsengupta0628 commented May 13, 2026

@dsengupta0628
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 21238d8ddd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/dbSta/src/dbNetwork.cc Outdated
Comment on lines +948 to +949
if (!bump_to_chip_net_.empty()) {
return;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Rebuild bump-net cache after chip-net edits

If client Tcl/C++ code creates or rewires a dbChipNet after this cache has already been populated (for example, querying timing/pins once and then adding a synthetic cross-chiplet net as the new tests do before any lookup), this early return keeps the stale map and dbNetwork::net(chip_bump_pin) returns null for the new connection, so STA silently misses the cross-chiplet path. Either invalidate on chip-net/bump edits or refresh entries even when the cache is non-empty.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated to refresh the cache when the net cache size changes

if (it == block_disc_.end()) {
return 0;
}
return (it->second & kBlockTagMask) << kBlockTagShift;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Guard against block discriminator wraparound

For 3DIC designs with 17 or more unique chiplet master blocks, the discriminator assigned in setTopChip() wraps through this 4-bit mask, so the 17th block reuses the first block's high bits and same-type db objects with the same local ODB id collide in STA PinSet/NetSet keys. Please reject oversized designs or allocate a non-wrapping id space; otherwise timing traversal can silently merge pins/nets across chiplets.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Upgraded to handle max 255 chiplets instead of 16. Also added an error message if it ixceeds

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

// Caveat: in-place addBumpInst/removeBumpInst on an existing chip-net
// (no count change) is NOT detected — see 3DIC_TODO.md TODO 4.
mutable std::map<odb::dbChipBumpInst*, odb::dbChipNet*> bump_to_chip_net_;
mutable size_t bump_to_chip_net_cache_size_ = 0;
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.

warning: no header providing "size_t" is directly included [misc-include-cleaner]

src/dbSta/include/db_sta/dbNetwork.hh:5:

- #include <cstdint>
+ #include <cstddef>
+ #include <cstdint>

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
@github-actions
Copy link
Copy Markdown
Contributor

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

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