Skip to content
VLSI Mentor

Tcl · Module 22

Reviewing an STA Run

At sign-off, a clean report is the one nobody questions. This is the check that asks whether it was produced from the right inputs, by an analysis that actually ran, across the corners that matter.

Advanced17 min readtcledapart-iistareviewsignoffreproducibility

Part II · Module 22 · Chapter 22.9 · Reviewing an STA Run

Every chapter in this module has described a way to produce a timing report that is clean and means nothing: a stale netlist, constraints that did not apply, estimated wire delay, a report requested before the update, one corner out of three.

At sign-off the clean report is the one nobody questions. This chapter is the check that questions it.

1. What the review establishes

The registry's own list, each a mechanical fact:

  1. Netlist and SDC freshness — nothing read is newer than the netlist.
  2. Parasitics present — or explicitly noted as absent.
  3. Timing actually updated — so the reports mean something.
  4. Corner coverage — every required corner was analysed.
  5. An archive — somebody can reproduce this.

2. The run that looks fine

A session where the SDC was edited after synthesis, no parasitics were read, timing was never updated, and only one corner was run:

Azvya Education Pvt. Ltd.VLSI Mentor
Snippet
=== an STA run that produced a clean-looking report from stale inputs ===
  ok      netlist present: cpu_top_mapped.v
  ok      provenance found (synthesised at the slow corner)
  ERROR   constraints.sdc is NEWER than the netlist — the netlist is stale
  WARNING no parasitics read — wire delay is being estimated
  ERROR   timing was never updated — no report is meaningful
  ERROR   corner(s) not analysed: typ, fast
  ---
  3 problem(s)

The complete run, for contrast:

Azvya Education Pvt. Ltd.VLSI Mentor
Snippet
=== a complete STA run ===
  ok      netlist present: cpu_top_mapped.v
  ok      provenance found (synthesised at the slow corner)
  ok      constraints.sdc is older than the netlist
  ok      parasitics: cpu_top_slow.spef
  ok      timing updated
  ok      all 3 required corner(s) analysed
  ---
  0 problem(s)

3. The review

Azvya Education Pvt. Ltd.VLSI Mentor
Snippet
proc review_sta {netlist sdc spef corners_done corners_required} {
    set problems 0
    proc _bad  {m} { upvar 1 problems p ; puts stderr "  ERROR   $m" ; incr p }
    proc _warn {m} { puts stderr "  WARNING $m" }
    proc _ok   {m} { puts "  ok      $m" }

    if {![file isfile $netlist]} { _bad "netlist not found: $netlist" ; return $problems }
    _ok "netlist present: [file tail $netlist]"

    set prov [read_provenance [file join [file dirname $netlist] PROVENANCE.txt]]
    if {[dict size $prov] == 0} { _bad "no provenance beside the netlist" } \
    else { _ok "provenance found (synthesised at the [dict get $prov corner] corner)" }

    foreach f [list $sdc] {
        if {![file isfile $f]} { _bad "input not found: $f" ; continue }
        if {[file mtime $f] > [file mtime $netlist]} {
            _bad "[file tail $f] is NEWER than the netlist — the netlist is stale"
        } else { _ok "[file tail $f] is older than the netlist" }
    }

    if {$spef eq ""}              { _warn "no parasitics read — wire delay is being estimated" } \
    elseif {![file isfile $spef]} { _bad "parasitics not found: $spef" } \
    else                          { _ok "parasitics: [file tail $spef]" }

    if {!$::sta::updated} { _bad "timing was never updated — no report is meaningful" } \
    else { _ok "timing updated" }

    set missing {}
    foreach c $corners_required { if {[lsearch -exact $corners_done $c] < 0} { lappend missing $c } }
    if {[llength $missing]} { _bad "corner(s) not analysed: [join $missing {, }]" } \
    else { _ok "all [llength $corners_required] required corner(s) analysed" }

    puts "  ---"
    puts "  $problems problem(s)"
    return $problems
}

4. Two severities, deliberately

Notice that missing parasitics is a warning and the rest are errors. That split is the most important design decision in the procedure.

5. The archive

The registry's last clause, and the one most often skipped.

A timing result is only defensible if somebody can reproduce it. That means keeping, in one place:

  • the netlist and its provenance,
  • the constraints actually read,
  • the libraries and parasitics used, or their paths and checksums if they are too large to copy,
  • the analysis settings — Chapter 22.1 §6,
  • the reports, per corner,
  • the log, including the setup print and this review's output,
  • and the script, at the revision used.
Azvya Education Pvt. Ltd.VLSI Mentor
Snippet
proc write_sta_manifest {path} {
    set fp [open $path w]
    puts $fp "# what produced the timing results in this directory"
    foreach {k v} [list \
        top         $::TOP \
        corners     $::CORNERS \
        netlist     $::NETLIST \
        sdc         $::SDC \
        tcl_version [info patchlevel] \
        date        [clock format [clock seconds] -format "%Y-%m-%d %H:%M:%S"]] {
        puts $fp [format "%-14s %s" $k $v]
    }
    close $fp
    return $path
}

Same shape as Chapter 21.9 §4's provenance, for the same reason: it travels with the directory. A result copied somewhere else takes its manifest with it, and a record in a tracking system does not.

6. Wiring it in

Azvya Education Pvt. Ltd.VLSI Mentor
Snippet
set problems [review_sta $NETLIST $SDC $SPEF $corners_done $CORNERS]
write_sta_manifest [file join $RUN MANIFEST.txt]
if {$problems > 0} {
    puts stderr "STA run is not signable: $problems problem(s)"
    exit 1
}

The manifest is written either way — a failed run is also worth being able to reconstruct, and often more so.

7. What the review cannot tell you

The honest half, as in Chapter 20.8 §6 and 21.10 §7.

It can check: inputs are fresh, present and coherent; the analysis ran; the corners were covered; the record exists.

It cannot check:

  • Whether the numbers are acceptable. It can apply a threshold you state — Chapter 22.7 §6 — but the threshold is a policy.
  • Whether the constraints are right. Chapter 20.8 reviews that, and even it cannot tell whether a period matches the specification.
  • Whether the corner list is the right one. It checks the corners you declared were all run; whether those are the corners signoff requires is a project decision.
  • Whether a violation matters. A -0.002 failure on a path with margin elsewhere may be acceptable; that is engineering judgement.

So the review clears the mechanical ground. The remaining judgement is where the engineering is, and the point of automating the rest is to leave attention for it.

8. Exercises

Exercise 1. Name the five things the review establishes.

Exercise 2. In the failing example, nothing errored. Which three findings make the report meaningless?

Exercise 3. Why is missing parasitics a warning rather than an error?

Exercise 4. What happens to a review that treats everything as an error?

Exercise 5. How is the "signoff requires parasitics" rule expressed without making the check lie?

Exercise 6. What must an archive contain, and why beside the results rather than in a database?

Exercise 7. Name two things the review cannot tell you.

Where this fits

Part of the Tcl curriculum.