sta: path delay -to lookup is 17–22 % of repair_timing under set_max_delay -to [all_registers]
Maintainer thường phản hồi trong vòng 1 ngày
@dsengupta0628 đang làm issue này rồi.
Từ ngày 28/10/2026.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cpp
- Lĩnh vực
- backend, performance
Hướng nghiên cứu
Start by reading OpenSTA's Sdc::isCompleteTo, ExceptionTo::matches, and the PinSet and InstanceSet membership code; the issue traces the hot path through Search::mutateTag and dbNetwork::id. Review the linked patch and its Tcl test, then check exception recording, merging, clearing, and pin or instance deletion paths. Done means the membership lookup is faster while ordered sets preserve deterministic iteration and timing results remain unchanged.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
On designs whose SDC puts a large object list in a set_max_delay -to,
the path delay -to lookup takes a large share of repair_timing. Testing
the -to by a pointer hash before the ordered sets made repair_timing
17–22 % faster with byte-identical results:
| stage | command | before, s (3 runs) | after, s (3 runs) | change |
|---|---|---|---|---|
| CTS | repair_timing |
579, 578, 579 | 481, 482, 479 | −17 % |
| global route | repair_timing |
606, 607, 605 | 477, 476, 467 | −22 % |
The design is XiangShan's VecRegionModule on asap7, at 48 threads. Every
other command in both stages stayed within a few seconds, and the .odb
was byte-identical in all 12 runs.
Where the time goes
ORFS's asap7 platform SDC constrains every block's boundary with
set_max_delay ... -from $non_clk_inputs -to [all_registers]
set_max_delay ... -from [all_registers] -to [all_outputs]
set_max_delay ... -from $non_clk_inputs -to [all_outputs]
so nearly every path carries a path delay state, and nearly no pin is one
of its -to objects. At every edge, Search::mutateTag asks
Sdc::isCompleteTo, which asks ExceptionTo::matches, which looks the pin
up in the -to's PinSet/InstanceSet. Those sets are ordered by
network id, and on dbNetwork every comparison decodes the id from the odb
object:
Search::mutateTag
Sdc::isCompleteTo
ExceptionTo::matches
PinSet::contains -> PinIdLess
dbNetwork::id -> getDbNwkObjectId, getObjectType, hasHierarchy, blockDiscBits
In perf samples, ExceptionTo::matches was 38–43 % of VecRegionModule's
CTS and global route repair, 31–59 % of generate_abstract on several
XiangShan blocks, and 29–48 % of 40 minutes of the full tile's CTS.
Suggested Solution
Keep the -to objects of every exception in a pointer-hashed index, and
ask it before the ordered sets, which still decide at a -to object:
bool
Sdc::isCompleteTo(ExceptionState *state,
const Pin *pin,
const RiseFall *rf,
const MinMax *min_max) const
{
ExceptionPath *exception = state->exception();
ExceptionTo *to = exception->to();
return state->nextThru() == nullptr
&& to
&& exception->matches(min_max, true)
&& mayCompleteTo(exception, pin)
&& to->matches(pin, rf, network_);
}
bool
Sdc::mayCompleteTo(const ExceptionPath *exception,
const Pin *pin) const
{
ExceptionPath *path = const_cast<ExceptionPath*>(exception);
const ExceptionPathSet *exceptions = findKeyValuePtr(to_pin_exceptions_, pin);
if (exceptions && exceptions->contains(path))
return true;
if (!to_inst_exceptions_.empty()) {
exceptions = findKeyValuePtr(to_inst_exceptions_, network_->instance(pin));
if (exceptions && exceptions->contains(path))
return true;
}
return false;
}
The rest is bookkeeping: to_pin_exceptions_/to_inst_exceptions_
(PinExceptionsMap/InstanceExceptionsMap) are filled and emptied with
recordException/unrecordException, re-recorded after a merge, cleared
with the other maps, and erased when a pin or instance is deleted. The
whole change, about 55 lines with a Tcl test, is here:
https://github.com/The-OpenROAD-Project/bazel-orfs/blob/e6c52703/patches/0145-opensta-path-delay-to-hashed.patch
Additional Context
Why it is this way, as far as I can tell:
- The sets are ordered by id, not pointer, so iteration order is stable
from run to run (reports,write_sdc); the index above is used only for
membership and leaves the sets alone. - A
Pin*indbNetworkis the odb object itself, so there is no field to
cache an id in, and the id has to be unique across ITerm, BTerm and
ModITerm. Sdc::pin_exceptions_is already a pointer hash, but a merge
(findMergeMatch) adds points to the surviving exception without
re-recording it there, so it could not serve as this index.
What the measurement does and does not show: the outputs were identical
with and without the change. A build with the index never filled also gave
identical reports and tag counts on a small test, so the test shows that
results are unchanged, not that every -to case is exercised. Byte identity
was checked at 48 threads only.
Method, raw samples and the A/B harness:
https://github.com/The-OpenROAD-Project/bazel-orfs/pull/1385
- Ngôn ngữ chính
- Verilog
- Star
- 3.4k
- Fork
- 1.1k
- Merge trung bình
- 3 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 247
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của The-OpenROAD-Project/OpenROAD
-
odb LEF58_MINIMUMCUT: per-cut-class form never sets isPerCutClass, so drt silently drops the ruleCó thể đã có người làm @LucasYuki đã nhận 25 ngày trước. Đang mởbug drt odb
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
The-OpenROAD-Project/OpenROAD#12176 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
drt: LEF58_SPACING ENDOFLINE MINLENGTH l TWOSIDES is checked one-sided (io passes the TWOEDGES flag as TWOSIDES)Có thể đã có người làm @osamahammad21 đã nhận 25 ngày trước. Đang mởbug drt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
The-OpenROAD-Project/OpenROAD#12173 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
cleanup-opportunity: BUILD files never refer to mockturtle in third-partty/Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbazel enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
The-OpenROAD-Project/OpenROAD#12160 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
odb: Bazel build fails on linux/aarch64 — char fc compared to EOF in def/lef lexersCó thể đã có người làm @shivarammysore đã nhận 32 ngày trước. Đang mởbazel bug odb
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
The-OpenROAD-Project/OpenROAD#12095 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
syn: acd_resynth -apply segfaults on a database resynthesized in an earlier processCó thể làm lại được @povik đã nhận 31 ngày trước và không có pull request nào đang mở. Đang mởbug syn
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
The-OpenROAD-Project/OpenROAD#12046 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của The-OpenROAD-Project/OpenROAD
Issue tương tự
-
v3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
pluginkollektiv/antispam-bee#952 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: middleware enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
config: reject Proxy-Authorization and Proxy-Authenticate in server headersCó thể đã có người làm @haseemajaz đã nhận hôm nay. Đang mởbug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
rohitgollarahalli/mcpx#38 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: API good first issue size/xs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
DahanItamar/DockNest#354 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100