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

Aperta
#12,017 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Ambito
backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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:

Lingua principale
Verilog
Stelle
3.3k
Fork
1.1k
Merge medio
3g 11h
PR unite (30g)
247

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di The-OpenROAD-Project/OpenROAD

Tutte le issue di The-OpenROAD-Project/OpenROAD

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.