I/O latency update after CTS (why macro SDCs use set_max_delay -ignore_clock_latency)

オープン
#12,017 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
活発
領域
backend

調査の方向性

Start with flow/platforms/asap7/constraints.sdc and trace how set_max_delay -ignore_clock_latency is handled through CTS; the issue points to OpenSTA's PathEndPathDelay::requiredTime and OpenROAD's CTS sink insertion delay. F1 requires a post-CTS I/O latency update that persists into later stages and can be disabled for pad-level designs. The issue also says a one-line note in the SDC header would address the immediate documentation gap.

索引モデルが issue の本文から書いたものです。

説明

cts enhancement low_priority sta
Description

This issue records why the boundary constraints of a hardened macro in ORFS are written with set_max_delay -ignore_clock_latency rather than set_input_delay/set_output_delay, and which OpenROAD feature would change that. It is low priority. set_max_delay works for design space exploration (DSE), and nothing needs to change for that use case. The point is to have the reasoning somewhere a reader can find it, so "not now" or letting this go inactive is a fine outcome.

ORFS's flow/platforms/asap7/constraints.sdc ("a minimal generic constraints.sdc for architectural exploration of macros") times the ports like this:

set_max_delay -ignore_clock_latency 80 -from $non_clk_inputs -to [all_registers]
set_max_delay -ignore_clock_latency 80 -from [all_registers] -to [all_outputs]
set_max_delay 80 -from $non_clk_inputs -to [all_outputs]
Why this surprises a reader (principle of least astonishment)
  1. In SDC, port timing normally lives in set_input_delay/set_output_delay. A file with neither looks as if the I/O constraints are missing.
  2. OpenSTA's check_setup agrees: it reports every input and output port as unconstrained (The-OpenROAD-Project/OpenSTA#434 proposes following set_max_delay through).
  3. set_max_delay is a path exception. Without group_path, its paths are reported in the default group, not the clock's group.
  4. The value is absolute. Changing clk_period leaves every boundary target where it was.
  5. There is no boundary hold check at block level. The parent finds any hold problem later.
  6. -ignore_clock_latency measures each flop from its own clock arrival, so skew inside the block is not visible in the boundary check.
  7. The file is correct for a macro. Applied to a top level with pads, it would drop the insertion latency the board really sees (Figure 1).
Why it is nevertheless the right choice for a macro today

At a top level with pads, the I/O delay comes from a datasheet and refers to the board clock edge at the pin. The chip's insertion latency L really happens, and set_input_delay describes this case exactly.

Figure 1: top level with pads

Inside a parent, the parent's CTS reads the macro's min/max_clock_tree_path from the abstract (written by write_timing_model) and drives the macro's clock pin early by the macro's own insertion latency L_m. The timing reference for the macro's I/O is therefore the clock at its internal flops, not at its clock pin. A set_input_delay refers to the pin, so writing a correct one requires knowing L_m, and L_m is only known after the macro's CTS.

Figure 2: macro inside a parent

As a result, the budget given to an in2reg path with set_input_delay moves by L_m between the ideal-clock stages and the propagated-clock stages (row 2 below), and an output budget shrinks by the same amount. With a single delay value (min = max), the propagated clock also creates a boundary hold check, d + p_min < L_m + t_hold, that repair_timing -hold would pad for even though the parent never sees that race (the mechanism only; no cell count has been measured). set_max_delay -ignore_clock_latency removes the latency at both ends of the path (OpenSTA PathEndPathDelay::requiredTime), so its target is the same before and after CTS (row 3).

Figure 3: budget per constraint style, before and after CTS

Every value a block-level I/O delay needs (the arrival d from the parent, and L_m) is an output of the flow it constrains. Iterating block and parent runs to a fixed point takes hours per lap, with no convergence guarantee. set_max_delay -ignore_clock_latency needs nothing the flow produces.

Figure 4: dependency of block I/O delays on flow results

For tops with pads, ORFS's virtual-clock SDCs (ORFS commits 732bf73e2 "Use virtual clocks for IO delays" and 5511fcc4 "Tune IO clock latency estimates") take the I/O clock latency from CI's 4_cts_final reports. An automatic update would do the same thing within the run.

Suggested Solution

These are listed cheapest first. F1 is the item that removes the reason for the current choice.

  • F1: I/O latency update after CTS. For each clock, measure the block's insertion delay at its sinks and apply it as the latency of the virtual I/O clock, or as a negative source latency on the real clock. It must persist into the stages after CTS and be switchable off for a top level with pads. Commercial tools have this; Innovus calls it update_io_latency, and ICC2 does it with compute_clock_latency/set_latency_adjustment_options (from community sources, not vendor manuals). With F1, a virtual-clock set_input_delay checks the same latency-free path that set_max_delay -ignore_clock_latency checks today (row 4 of Figure 3). It also scales with the period, models intra-block skew and passes check_setup without changes.
  • F2: min/max latency per corner, using the same values write_timing_model writes as min/max_clock_tree_path, so the block and its abstract agree.
  • F3: a boundary hold policy. Either -max-only I/O delays, with a test confirming that repair_timing -hold then adds nothing at the ports, or -min values taken from the parent.
  • F4: timing budgeting (larger). A parent-level pass that derives each block's I/O delays from the parent's reg2reg paths, so that the boundary numbers are derived rather than chosen, in either style.

Until F1 exists, set_max_delay -ignore_clock_latency remains the appropriate macro constraint. A one-line note in the platform SDC header, "this file is for a macro; a top level with pads should use I/O delays", would cover the remaining surprise.

Additional Context
Semantics side by side, checked against OpenSTA/OpenROAD source
Aspect set_input/output_delay set_max_delay -ignore_clock_latency OpenSTA/OpenROAD today
States when data arrives at, or must leave, a port relative to a clock edge an upper bound on a path's delay (exception) both implemented
Clock latency included; at a block, updated to the block's tree after CTS in commercial flows removed at both ends no post-CTS I/O latency update (F1)
Period budget T − d scales with T absolute as intended
Hold -min gives a hold check only with set_min_delay no boundary hold check with set_max_delay alone
Intra-block skew visible hidden as intended
Path groups clock's group default group unless group_path asap7 SDC adds in2reg/reg2out/reg2reg/in2out groups
check_setup clean not covered ports flagged; The-OpenROAD-Project/OpenSTA#434
Abstract min/max_clock_tree_path same write_timing_model emits them; TritonCTS balances to them
Where the number comes from datasheet (pin) or budgeter (block) designer's target no budgeter (F4)

Sources:

主要言語
Verilog
スター
3.3k
フォーク
1.1k
平均マージ
3日 11時間
マージ済み PR(30日)
247

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

The-OpenROAD-Project/OpenROAD のほかの issue

The-OpenROAD-Project/OpenROAD の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。