rsz: hold repair rolls back a buffer for any loss of worst setup slack (0.1 ps vetoes a 527 ps hold fix)
メンテナーはふだん 1 日以内に返信
@precisionmoon がすでに取り組んでいます。
2026年12月5日 から。
評価
この issue はまだ評価されていません。
説明
Describe the bug
repair_timing hold repair rolls back a hold buffer whenever the design's worst setup slack gets any worse (openroad/rsz/src/RepairHold.cc, around line 818):
if (slew_factor > 1.20
|| (!allow_setup_violations
&& sta::fuzzyLess(setup_slack_after, setup_slack_before)
&& setup_slack_after < setup_margin)) {
resizer_->journalRestore();
setup_slack_before/after is the worst setup slack of the whole design, and the comparison has effectively zero tolerance. When the worst setup endpoint and the worst hold violation are the same flop, a buffer that fixes the hold violation and costs a fraction of a picosecond of setup is always rolled back. Repair then gives up with the violation in place.
On test/aes_sky130hd.tcl with the placement from #12491, after CTS, the worst hold violation and the worst setup endpoint are both _33728_/D:
- On each of ~265 passes, hold repair inserts a delay buffer on the
key[13]input path to_18263_/A1and rolls it back. - The buffer slows a shared mux's slew enough to cost 0.1 ps of setup on
_33728_/D, which already fails setup. - That 0.1 ps vetoes a 527 ps hold gain. Worst hold slack after repair stays at −0.598 ns.
Inserting the same buffer by hand (exp_hold.tcl below): worst hold −0.5984 → −0.0716 ns, worst setup −0.5678 → −0.5679 ns.
The trigger is #12526 (81dea25818, relaxation_factor_ 0.01 → 0.05 in Rebuffer.hh): it moves where setup repair ends, which puts the worst setup endpoint on that flop. On the same CTS database, running only repair_timing:
| Binary | Worst hold after repair | Worst setup after repair |
|---|---|---|
| 8706758cfd (master before #12526) | +0.003 | −0.516 |
| 81dea25818 (#12526) and later, through 4b53353e5f | −0.598 | −0.568 |
#12526 is not the bug; the rollback rule is. Any change that lands the worst setup endpoint on a hold-violating flop hits it.
For comparison only: a local change that lets the rollback tolerate a setup loss below 1 % of the inserted buffer's delay gives worst hold +0.003 and worst setup −0.568 (unchanged) on this database. The 1 % is arbitrary.
Expected Behavior
A hold buffer that removes most of a hold violation is kept when its setup cost is negligible (here 0.1 ps on an endpoint that already fails setup by 568 ps), or the tolerance is stated and adjustable. Worst hold slack after CTS repair near 0 instead of −0.598 ns.
Environment
OpenROAD master 4b53353e5f (and every commit from 81dea25818 on)
bazelisk build -c opt //:openroad
Linux x86_64
To Reproduce
- The CTS database: build OpenROAD at #12491's head 3958d3e29d and run
test/aes_sky130hd.tclfromtest/. It writesresults/aes_sky130hd_cts-tcl.db. (The database is 28 MB; the PR's placement is what puts both violations on one flop.) - Hold repair alone, from
test/, with master:CTS_DB=results/aes_sky130hd_cts-tcl.db openroad -exit repro_hold.tcl→worst slack min -0.598. With 8706758cfd →worst slack min 0.003. About 2 minutes per run. - The counter-check, inserting the buffer by hand:
CTS_DB=results/aes_sky130hd_cts-tcl.db openroad -exit exp_hold.tcl.
repro_hold.tcl:
source "helpers.tcl"
source "flow_helpers.tcl"
source "sky130hd/sky130hd.vars"
read_libraries
read_db $::env(CTS_DB)
read_sdc aes_sky130hd.sdc
set_thread_count 4
sta::set_thread_count 1
source $layer_rc_file
set_wire_rc -signal -layer $wire_rc_layer
set_wire_rc -clock -layer $wire_rc_layer_clk
set_dont_use $dont_use
set_propagated_clock [all_clocks]
estimate_parasitics -placement
report_worst_slack -min -digits 3
report_worst_slack -max -digits 3
report_checks -path_delay min -to _33728_/D -digits 3 -fields {fanout cap slew}
report_checks -path_delay max -to _33728_/D -digits 3
repair_timing -skip_gate_cloning
report_worst_slack -min -digits 3
report_worst_slack -max -digits 3
puts "hold_buffers [rsz::hold_buffer_count]"
report_checks -path_delay min -digits 3 -fields {fanout cap slew}
exp_hold.tcl:
source "helpers.tcl"
source "flow_helpers.tcl"
source "sky130hd/sky130hd.vars"
read_libraries
read_db $::env(CTS_DB)
read_sdc aes_sky130hd.sdc
set_thread_count 4
sta::set_thread_count 1
source $layer_rc_file
set_wire_rc -signal -layer $wire_rc_layer
set_wire_rc -clock -layer $wire_rc_layer_clk
set_dont_use $dont_use
set_propagated_clock [all_clocks]
estimate_parasitics -placement
set hb [lindex [get_cells hold*] 0]
proc show {tag} {
puts "== $tag: wns [format %.4f [sta::worst_slack -max]] whs [format %.4f [sta::worst_slack -min]]"
report_checks -path_delay min -to _33728_/D -digits 4 -format end
report_checks -path_delay max -to _33728_/D -digits 4 -format end
}
show before
# split the key[13] net: port -> delay buffer -> mux input
set block [ord::get_db_block]
set db [ord::get_db]
set master [$db findMaster [get_property $hb ref_name]]
set mi [$block findInst _18263_]
set mux_it [$mi findITerm A1]
set old_net [$mux_it getNet]
set inst [odb::dbInst_create $block $master hexp]
$inst setLocation [[$mi getBBox] xMin] [[$mi getBBox] yMin]
$inst setPlacementStatus PLACED
set nn [odb::dbNet_create $block hexp_net]
$mux_it disconnect
$mux_it connect $nn
foreach it [$inst getITerms] {
set mt [$it getMTerm]
if {[$mt getSigType] ne "SIGNAL"} continue
if {[$mt getIoType] eq "INPUT"} { $it connect $old_net } elseif {[$mt getIoType] eq "OUTPUT"} { $it connect $nn }
}
estimate_parasitics -placement
show after
Relevant log output
# repro_hold.tcl, master 4b53353e5f
[INFO RSZ-0032] Inserted 379 hold buffers.
worst slack min -0.598
worst slack max -0.568
# repro_hold.tcl, 8706758cfd
[INFO RSZ-0032] Inserted 381 hold buffers.
worst slack min 0.003
worst slack max -0.516
# exp_hold.tcl, master
== before: wns -0.5678 whs -0.5984
== after: wns -0.5679 whs -0.0716
Screenshots
None.
Additional Context
Found on #12491, whose pr-head trips RSZ::worst_slack_min on aes_sky130hd (−0.598 against a limit of −0.373) after merging master past #12526. Global route repair recovers it later in that flow (+0.012), so the end result is fine; the CTS-stage metric is not.
- 主要言語
- Verilog
- スター
- 3.4k
- フォーク
- 1.1k
- 平均マージ
- 3日 11時間
- マージ済み PR(30日)
- 245
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
The-OpenROAD-Project/OpenROAD のほかの issue
-
odb LEF58_MINIMUMCUT: per-cut-class form never sets isPerCutClass, so drt silently drops the rule対応中かも @LucasYuki が 26 日前に担当しました。 オープンbug drt odb
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
The-OpenROAD-Project/OpenROAD#12176 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
drt: LEF58_SPACING ENDOFLINE MINLENGTH l TWOSIDES is checked one-sided (io passes the TWOEDGES flag as TWOSIDES)対応中かも @osamahammad21 が 26 日前に担当しました。 オープンbug drt
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
The-OpenROAD-Project/OpenROAD#12173 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
cleanup-opportunity: BUILD files never refer to mockturtle in third-partty/再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンbazel enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
The-OpenROAD-Project/OpenROAD#12160 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
odb: Bazel build fails on linux/aarch64 — char fc compared to EOF in def/lef lexers対応中かも @shivarammysore が 33 日前に担当しました。 オープンbazel bug odb
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
The-OpenROAD-Project/OpenROAD#12095 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
syn: acd_resynth -apply segfaults on a database resynthesized in an earlier process再び着手できるかも @povik が 31 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug syn
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
The-OpenROAD-Project/OpenROAD#12046 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信