The short version
SPEF to SDF, PrimeTime STA and VCS gate-level simulation are three faces of one job: the SDF is both what STA produces and what the simulation consumes, and every number is only valid under the library and clock assumptions of its own stage. Sign-off means all three are done and agree with each other.
What to prepare before you start
The first job is not writing scripts, it is confirming which library APR actually used - read the MMMC view files or the LEF path, not “whichever library links successfully”. Two PDKs from the same vendor can use identical cell names: PrimeTime still links, the reports still look clean, the violation count is still zero, and every number belongs to the wrong process. That is exactly what happened here: a same-named library was used first, and only the gate-level run against the simulation models exposed the mismatch, forcing a full re-run of STA and SDF generation.
Then four inputs: the flat netlist from APR, the three corners of SPEF, the SDC written by Innovus write_sdc, and the standard cell simulation models of the same library (3.0 version .v with specify blocks and notifiers). All three corner .db files (ss/ff/tt) must exist; if one is missing the script should fail at the start - not half-write an SDF and let you find out later.
SPEF to SDF: three things that matter
The flow itself is short: read the netlist, link against that corner’s .db, read_parasitics -keep_capacitive_coupling -format SPEF, set_operating_conditions -analysis_type single, then write_sdf -version 3.0 -context verilog -include {SETUPHOLD RECREM}.
Do not drop three of those options: keep coupling capacitance (-keep_capacitive_coupling), otherwise the SI effect disappears; single-corner mode is enough (one run per corner, never mixed); and RECREM must be in the include list, otherwise the recovery/removal checks of the asynchronous reset never reach the SDF.
Before writing, run one self-check: report_annotated_parasitics -check -list_not_annotated. Normal is 100%; a net with no driver is a dangling wire left by synthesis, and its name should be reported rather than a vague “99%”.
Three known phenomena are not bugs: negative INTERCONNECT values in the SDF (normal with SI enabled, and the simulation then needs -negdelay); SDF-036 (setup plus hold is negative for some flop, which SDF 3.0 forbids, so PT nudges the hold value before writing - say in the report which cell and by how much); and the paired set_input_transition -min/-max lines from the APR SDC, which raise DES-013 in single-corner mode. That last one does not abort the command, it silently applies half the constraint, so it is easy to read as a warning and ignore. The clean fix is to keep the original SDC as evidence and derive a _sta.sdc that merges each pair into one line, with a header stating that it must be re-derived when the PR SDC is regenerated. suppress_message DES-013 does not work; do not spend time on it.
PrimeTime STA: two settings people forget
set_propagated_clock [all_clocks] is not optional. Without it every report says clock network delay (ideal), insertion delay and skew vanish, and the result looks clean while describing a clock network that does not exist.
report_timing defaults to -slack_lesser_than 0, i.e. violators only. On a design with large margin the report is empty and reads like a broken run. Pass -slack_lesser_than 100000 explicitly to see the worst twenty paths, and take the headline numbers from get_timing_paths -max_paths 1 so they can be grepped and summarised into one table.
Also, report_constraint has no -delay_type option; -all_violators -verbose already covers setup and hold together.
VCS gate-level sim: four traps
First, do not reuse the functional bench. It usually references internal signals (dut.u_seq.mode, dut.u_cfg.period_cfg and the like) that do not exist in a flat netlist, and VCS answers with a wall of XMRE errors. Write a black-box bench that only touches the ports; the same stimulus can then be compiled against the RTL as a reference run.
Second, use the real clock period. Functional benches often compress the clock to run faster (20 ns against 1000 ns here). With SDF delays the internal paths of this design that are close to 20 ns all become setup violations, the vendor flop models drive Q to X through their notifier, and it looks like “the function broke” when in fact the test environment did. The symptom is easy to recognise: outputs turn X a few thousand cycles in, and one register reports $setuphold. Use the real period - same tick count, same runtime.
Third, the file name passed to $sdf_annotate must be a compile-time constant. Filling it from $value$plusargs at runtime is rejected with STASKEC_IFNSDFA; use one ifdef branch per corner with the path written out literally.
Fourth, the MTM selection. PrimeTime writes (min::max) pairs, so there is no typical value in the file; TYPICAL produces no error and no warning, it simply annotates nothing. Comparing edge timestamps shows it at once: identical to the RTL, 0 ps. So use MINIMUM for the min corner and MAXIMUM for max and typ. Always compile with -negdelay +neg_tchk (14-15% of the values are negative) plus -diag=sdf:verbose.
How to read the annotation rate
Compile with -diag=sdf:verbose and read sdfAnnotateInfo in the run directory: it prints one percentage line for path delays and one for timing checks, followed by a Design Not Annotated list. Do not report the percentage alone - the categories in that list are what tells you whether the misses matter.
| corner | path delays annotated | timing checks annotated | INTERCONNECT |
|---|---|---|---|
| max (ss 4.5V 125C) | 4945/5121 = 96.56% | 3777/3777 = 100% | 2523 |
| min (ff 5.5V -40C) | 4870/5121 = 95.10% | 3777/3777 = 100% | 2523 |
| typ (tt 5.0V 25C) | 4892/5121 = 95.53% | 3777/3777 = 100% | 2523 |
The timing checks are 100%: SETUPHOLD 722, RECREM 352, WIDTH 1629. The few missing path delays fall into two groups: the asynchronous (negedge RN => (Q +: 1'b0)) arc of every flip-flop (the SDF has no such arc and the model’s specify value is 0 anyway; reset is a slow asynchronous signal and does not affect a functional run), and another 17 to 25 conditional combinational arcs in the min/typ corners (the C0 => Y kind on AOI/OAI cells, measured at 0.07-0.16 ns, on paths with more than 500 ns of margin).
One more thing that looks wrong but is not: PT writes no INTERCONNECT arc for the latch pins inside an ICG wrapper, so one clock net shows up as partially annotated. Check the equivalent arcs - they are all 0.000-0.003 ns, so the missing delay is under 3 ps.
How to prove the SDF is really applied
Comparing tick and value alone proves nothing: as long as the sampling point is half a period after the launching edge, both runs produce an identical sequence. Record the raw transition times in ps as well. The RTL edges land on multiples of the clock period; the netlist plus SDF edges arrive 1.5-3.3 ns later (clock tree insertion plus output path). Then run a control with the same netlist and no $sdf_annotate: the difference is 0 ps. Only the three numbers together show that the delay comes from the SDF.
When the three stages agree
| corner | PT setup WNS | PT hold WNS | SDF read back into PT | sim edge shift |
|---|---|---|---|---|
| max | +746.34 ns | +1.09 ns | +746.60 ns | 3290 ps |
| min | +748.08 ns | +0.52 ns | +748.22 ns | 1565 ps |
| typ | +747.53 ns | +0.69 ns | +747.70 ns | 2225 ps |
All three corners have zero violating paths; reading the SDF back without any parasitics lands within 0.3 ns of the SPEF run; and the gate-level run matches the RTL transition for transition (3981 transitions) with zero timing violations.