Use percent of minimum clock period
メンテナーはふだん 1 日以内に返信
@migueldalberto がすでに取り組んでいます。
2026年9月30日 から。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 55/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 領域
- performance
調査の方向性
Start with the linked pull request and comment, then trace where the cts__timing__setup__ws metric and its percent delta are calculated. Update the calculation to use the minimum clock period instead of WNS, and verify that the resulting metric table reports the intended percentage.
索引モデルが issue の本文から書いたものです。
説明
Description
Worst negative slack (WNS) is a poor number to compare runs by. It mystifies more often than it explains:
-
Percent of a small number.
make metadatarules compare WNS by percent, so a few picoseconds read as a large change. From #4580 (comment):Metric target base delta limit band cts__timing__setup__ws-0.624158 -0.518657 20.34 % -0.618657 PeriodPadding 5.0 % -
WNS measures the SDC, not the tool. WNS covers every path group, including in2reg, reg2out and in2out paths whose constraints are often approximate, such as
set_output_delay [expr $clk_period * 0.2]. In OpenROAD'srepair_setup_parallel_eval_default_sequencetest (gcd, asap7, 220 ps; the setup-repair stack The-OpenROAD-Project/OpenROAD#11794 … The-OpenROAD-Project/OpenROAD#11805), the worst endpoint for the whole run is the outputresp_msg[13]. Its required time comes from that arbitrary 44 ps, so the repair's effect on the design never shows in WNS. -
TNS has the same small-number problem. The clock period is chosen so WNS ends up slightly negative, so TNS sums only the few endpoints that fail: two in the gcd test by the end. It swings from case to case. If the failing paths are ones a change can't fix, its effect on everything else stays hidden.
-
On a large design, WNS ranks changes the wrong way. On XiangShan's tile (asap7, about 2.7 M instances, at global route; The-OpenROAD-Project/bazel-orfs#1356), against a 2,000 ps target:
Change Worst path Endpoints ≥ 2,000 ps Excess over 2,000 ps control 2,504 ps 5,259 733 ns placement cohesion 2,524 ps 4,336 548 ns cohesion + a logic cut 2,419 ps 5,741 763 ns By the worst path, the second change looks worse and the third looks best. By the endpoints that fail, it's the other way round. The SDC there also asks 473 ps, so nearly every endpoint violates and TNS against it says nothing.
Suggested Solution
-
Compare by the minimum reg2reg clock period: the clock period minus the reg2reg worst slack, in percent of that period, not of WNS. It's the same idea as
timing__fmax, which @maliberty pointed out is already reported, but restricted to register-to-register paths: those are the paths the flow can close, while the other groups' constraints are often guesses.Measuring reg2reg only also takes the SDC's accuracy out of the question.
- ORFS's
.sdcfiles often constrain IO with rough budgets, such as 0.2 × the period. With a reg2reg metric those budgets stop mattering for the comparison, which makes the SDCs easier to maintain. Measuring reg2reg alone is fine for tracking the tools. set_input_delayandset_output_delaystill deserve targeted tests of their own, especially where a flow repairs hold heavily on purpose.- An accidental
set_input_delayhold buffer infestation probably deserves an error message in OpenROAD, with an explicit override for designs that mean it. That's where an input delay's min value leaves the input paths with hold violations nobody intended, and hold repair fills the design with delay buffers.
- ORFS's
-
For A/B comparisons, look at more than one path: the reg2reg endpoints within a band around the period, before and after; how many improved and by how much, and how many got worse. The profiler in The-OpenROAD-Project/OpenROAD#11796 already records WNS/TNS trajectories and failing endpoint counts, and looks like a natural place for that per-endpoint view.
-
Optionally, a floor to read the period against: the one-flop-loop floor, the worst path from a register back to itself. No clock skew or retiming can beat it, so when the period sits at the floor, only that loop's wire, cells or logic can help. On XiangShan's tile it's 2,151 ps, above the 2,000 ps target, which no tuning of the flow could have revealed by WNS alone (bazel-orfs#1356).
Additional Context
The reg2reg-only point matters for designs whose IO constraints are budgets, not real requirements. In theory there could be designs with no reg2reg paths, and those would need a fallback.
- 主要言語
- Verilog
- スター
- 767
- フォーク
- 544
- 平均マージ
- 2日 3時間
- マージ済み PR(30日)
- 96
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
The-OpenROAD-Project/OpenROAD-flow-scripts のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4717 ·
メンテナーはふだん 1 日以内に返信
-
Make SYNTH_HDL_FRONTEND=slang default再び着手できるかも @jeffng-or が 31 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4548 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Clock period improvements left on the table due to SYNTH_MINIMUM_KEEP_SIZE counting macros対応中かも @joaomai が 1 日前に担当しました。 オープン
The-OpenROAD-Project/OpenROAD-flow-scripts#4714 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
asap7 cva6 fails in PSM with demo constraint file対応中かも @gadfort が 38 日前に担当しました。 オープンpsm
The-OpenROAD-Project/OpenROAD-flow-scripts#4539 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
GF180 platform tech LEF omits Nwell, causing SRAM OBS truncation on OpenDB import対応中かも @bandhambalaji が 4 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4496 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
The-OpenROAD-Project/OpenROAD-flow-scripts の issue をすべて見る
似ている issue
-
enhancement qq-feedback
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
type/automation type/performance
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 3 日以内に返信