Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Course
  • Reading Path
  • STA Glossary
  • STA Metrics Reference
  • STA Mastery Cheatsheet
  • Timing Paths and Checks16
  • Constraints & SDC Fundamentals20
  • Delay Graph & Path Analysis16
  • Beyond Setup and Hold16
  • Multi-Corner Multi-Mode Signoff16
  • OCV, AOCV, POCV and Variation16
  • Crosstalk and Noise16
  • ECO and Closure16
  • STA Debug Playbook16
    • Constraint Bug Patterns
    • View Mismatch Triage
    • Path Group War Room
    • Signoff Regression Hygiene
      • Run Comparison
      • Constraint Diffing
      • Reproducibility
      • Final Checklists
  • STA Interview Prep26
  • Capstone Timing Signoff Lab4
Loading lesson

‹Signoff Regression Hygiene
  1. Topics
  2. Static Timing Analysis
  3. STA Debug Playbook
  4. Signoff Regression Hygiene
  5. Reproducibility

Part 9 · Debug Playbook · All levels

Reproducibility

Floating-point sums depend on order, so parallel runs can differ in the last digits; set a tolerance and compare against it.

On this page

    Why it matters

    A parallel analysis adds up many slack numbers in an order that can change from run to run. Floating-point addition is not associative, so totals such as TNS can differ in their last digits even though nothing is wrong. A tolerance policy separates these harmless differences from real ones.

    Worked example

    example.py
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    import math
    vals = [0.1, 0.2, 0.3]
    forward = 0.0
    for v in vals:                            # (0.1 + 0.2) + 0.3, added one at a time
        forward += v
    backward = 0.0
    for v in reversed(vals):                  # (0.3 + 0.2) + 0.1
        backward += v
    exact = math.fsum(vals)                   # correctly rounded sum
    assert forward != backward
    assert abs(forward - backward) < 1e-15 and abs(forward - exact) < 1e-15
    # a tolerance policy: differences below 0.1 ps (1e-4 ns) are noise; above are real
    tol = 1e-4
    runs_a = [-0.0205, 0.0153, 0.0402]
    runs_b = [-0.02050000000000001, 0.0153, 0.0402]
    runs_c = [-0.0217, 0.0153, 0.0402]
    def same(x, y):
        return all(abs(p - q) <= tol for p, q in zip(x, y))
    assert same(runs_a, runs_b) and not same(runs_a, runs_c)
    print("PASS: forward", forward, "backward", backward, "differ by", abs(forward - backward), "; tolerance", tol, "ns accepts run b and rejects run c")

    Source of nondeterminism

    Effect

    Handling

    Summation order in parallel code

    Last-digit differences in totals

    Compare with a tolerance

    Thread scheduling affecting the order of tie-breaking

    Different but equally valid choices

    Fix seeds or ordering where the tool allows; otherwise accept within the tolerance

    Timestamps and file ordering in scripts

    Different logs, rarely different results

    Normalise before diffing

    Unrecorded input

    Real result differences

    Add to the manifest

    The sum of 0.1, 0.2 and 0.3 is 0.6000000000000001 in one order and 0.6 in the other: a difference of about 1e-16. A tolerance of 0.1 ps (1e-4 ns) accepts differences of that size and rejects the 1.2 ps difference of run c, which is real. The tolerance should be well below the margin you care about (a picosecond or less) and well above the floating-point noise; the policy is written down once so nobody argues about it each time.

    What the review looks for

    • A documented tolerance, used by every comparison script.

    • Differences above the tolerance with identical manifests are logged as defects, not ignored.

    • Seeds and thread settings are in the manifest where they influence results.

    Common pitfall

    Comparing results with exact equality. The comparison fails for harmless reasons, people learn to ignore it, and a real difference passes unnoticed.

    Interview

    Mention floating-point non-associativity as the reason totals can differ in the last digits.

    Check yourself Is a TNS difference of 2 ps between two identical-manifest runs within the tolerance?

    No: the 0.1 ps tolerance is per endpoint, so a TNS difference must be compared against 0.1 ps times the number of violating endpoints, or compare per endpoint first. A 2 ps TNS gap across only a handful of endpoints is well above that allowance, so it must be investigated as nondeterminism or an unrecorded input.

    Related topics

    • Constraint Diffing

    • Next: Final Checklists

    Previous

    152 / 183

    Next: Final Checklists

    Up next

    Up nextFinal Checklists

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Run Comparison