Library and parasitic data are large files nobody reads. Two errors recur: a unit mix-up (picoseconds read as nanoseconds, femtofarads as picofarads), which makes values a thousand times too large or small, and a corner mix-up, where a fast-corner file is loaded into a slow-corner scenario. Both are detectable by simple checks on the loaded data.
import statistics
# Check 1 (warning): unit outliers. Net delays in ns for one block; one value looks like picoseconds read as nanoseconds.
# The ratios 100 and 0.01 are example thresholds, not pass/fail limits.
net_delays = [0.012, 0.015, 12.0, 0.010, 0.018, 0.014]
med = statistics.median(net_delays)
outliers = [d for d in net_delays if d / med > 100 or d / med < 0.01]
assert outliers == [12.0]
# Check 2 (warning): corner ordering on cell delay arcs at otherwise equal voltage and temperature.
# The same three arcs, delay in ns by loaded corner: slow must exceed typical, typical must exceed fast.
arcs = {"a1": {"ss": 0.130, "tt": 0.100, "ff": 0.078},
"a2": {"ss": 0.210, "tt": 0.160, "ff": 0.125},
"a3": {"ss": 0.082, "tt": 0.101, "ff": 0.200}} # a3's ss and ff look swapped
bad = [a for a, d in arcs.items() if not (d["ss"] > d["tt"] > d["ff"])]
assert bad == ["a3"]
print("PASS: unit outliers", outliers, "; arcs violating the corner order", bad)Check | What it catches | Typical cause |
|---|---|---|
Ratio to the median above 100 or below 0.01 (example thresholds; a warning) | Unit errors | Wrong time or capacitance unit in a file header or script |
Slow above typical above fast for each cell delay arc at equal voltage and temperature (a warning) | Swapped or wrongly mapped corner libraries | Library set mapped to the wrong scenario |
Loaded file versions against a manifest | Stale or mixed versions | A refreshed library used in one flow only |
Parasitic corner names against scenario names | Wrong interconnect corner | Corner naming differences between extraction and timing |
The 12.0 ns net delay is about 800 times the median of 0.0145 ns, which is the signature of a picosecond value read as nanoseconds. The arc a3 shows its slow-corner delay (0.082) below typical and its fast-corner delay (0.200) above, at otherwise equal voltage and temperature: the two libraries look swapped for that cell. Both checks are warnings with scoped follow-ups, not verdicts: the ratio limits are examples, and net delays in one block can legitimately span a wide range, so a hit needs confirmation against the file headers and the loaded manifest before anyone acts. Neither error would be visible in a path report until someone asks why one net takes 12 ns. Both checks take seconds to run and belong in every flow's preamble.
The checks run automatically at the start of every analysis and warn on a hit, failing the run on a confirmed hit.
Library and parasitic versions are recorded in the run manifest and compared with the release manifest.
Units are stated in the headers of every data file and cross-checked.
A swapped library on one cell family can be hidden in the total by other arcs; a per-arc check shows each one individually.