TDEB Top Bar

Trending
Semiconductor Industry News — The Digital Electronics Blog
Follow Us

TDEB Masthead

The Semiconductor Hub

Semiconductors.  Chips and Systems.  Innovation.

Indexed by leading Search Engines, AI and referenced by Engineers worldwide 500+ Articles 10M+ Pageviews 30+ Reports 50+ Citations

Interview Question: Distributions in Statistical Timing

mg
by
1
Share Facebook X LinkedIn WhatsApp Email

How do you observe and highlight the impact of assumptions about gate-length variability distributions (if any) on the final distribution of design timing? How would you implement a simple statistical timer by running, say, 500 Monte Carlo runs of static timing analysis (for example, with PrimeTime)? Assume independent gate delays. Assume gate-delay distributions and generate circuit delay distributions. Delays can be changed in the SDF file, and interconnect may be ignored. Can we try this for a few probability distributions (for example Gaussian, asymmetric Gamma, Triangular)?

This is a classic interview and course-project question on statistical timing. Below is a plain explanation of what it is asking, followed by a worked answer with numbers.

What the question is really about

Ordinary static timing analysis (STA) uses one delay per gate, taken at a corner such as slow process, low voltage and high temperature. Real chips vary: the printed gate length differs slightly from transistor to transistor, so each gate's delay is a random quantity rather than a fixed number. Statistical timing asks a different question: not "what is the worst-case delay?" but "what is the probability that this path, or this chip, meets the clock?"

The question asks you to build the simplest possible statistical timer, by brute force, and then use it to see how much the answer depends on the shape you assume for the gate-delay distribution.

The approach in outline

  1. Pick a distribution for each gate's delay, with a mean and a spread.
  2. For each Monte Carlo run, draw a random delay for every gate and write those values into a copy of the SDF (Standard Delay Format) file.
  3. Run STA with that SDF and record the worst path delay or the worst slack.
  4. Repeat 500 times, then plot a histogram of the results.
  5. Repeat the whole experiment with a different distribution shape but the same mean and standard deviation, and compare the histograms, especially the tails.

What you should expect to see

  • Long paths look Gaussian whatever you assume. Adding many independent gate delays averages out the shape, a consequence of the central limit theorem.
  • Short paths keep the shape of the gate distribution. A skewed gate delay gives a skewed path delay when there are only a few gates.
  • The tails differ most. The mean and standard deviation barely change; the 99.9th percentile, which is what sign-off cares about, moves noticeably.
  • The circuit delay is a maximum over paths. Taking the maximum of several near-critical paths shifts the circuit delay up and makes its distribution skewed, even if each path is Gaussian.

Deep dive: the numbers and details

This part holds the equations, a worked Monte Carlo example and the pitfalls. Skip it if the overview is all you need.

Path delay of independent gates

For a path of N gates with independent delays di, each with mean μ and standard deviation σ:

mean(path)  = N x mu
sigma(path) = sqrt(N) x sigma
relative spread = sigma(path) / mean(path) = (1 / sqrt(N)) x (sigma / mu)

So a 10-gate path with 20 ps gates and σ = 2 ps (10% per gate) has mean 200 ps and σ = 6.32 ps (3.2% of the mean). Independence makes long paths look less variable than single gates. Real variation is partly correlated (die-to-die and spatially correlated components), and correlated variation does not average out, so the independent assumption in the question is optimistic.

Three distributions with the same mean and sigma

To compare shapes fairly, give every distribution the same mean (20 ps) and standard deviation (2 ps):

DistributionParametersShape
Gaussianmu = 20, sigma = 2Symmetric, unbounded tails
Shifted Gamma16 + Gamma(k = 4, theta = 1)Skewed toward slow gates (skewness 2 / sqrt(k) = 1)
Triangularmin 15.1, mode 20, max 24.9 (half-width = sigma x sqrt(6))Symmetric, bounded

Worked Monte Carlo results

We ran this experiment in Python for chains of 1, 3 and 10 independent gates, with 200,000 samples so the tails are well resolved. The 99.865th percentile is the point that a Gaussian "3-sigma" corner is meant to cover.

Gates in pathDistributionMean (ps)99.865th percentile (ps)Gaussian 3-sigma estimate (ps)
1Gaussian20.026.026.0
1Shifted Gamma20.028.926.0
3Gaussian60.070.470.4
3Shifted Gamma60.073.370.4
10Gaussian200.0218.9219.0
10Shifted Gamma200.0221.9219.0

The mean is identical in every case. The skewed Gamma assumption pushes the slow tail out by about 2.9 ps on a single gate and still by about 3 ps on the 10-gate path, where a Gaussian model of the path would miss it. A triangular gate distribution with the same sigma gave a 10-gate 99.865th percentile of about 218.7 ps, very close to Gaussian, because its bounded tails are offset by summing ten of them.

Maximum over paths

If four independent 10-gate paths of the same statistics all reach one flip-flop, the circuit delay is their maximum. In our runs the mean of that maximum was about 206.5 ps (against 200 ps for one path) and its standard deviation fell to about 4.4 ps. The STA worst case of a single path underestimates the typical circuit delay in this situation. Analytical statistical timers handle this with approximations to the maximum of Gaussian variables, the classic one being C. E. Clark, "The Greatest of a Finite Set of Random Variables," Operations Research, 1961.

Why 500 runs is not enough for the tail

With 500 samples you expect only 500 x 0.00135 = 0.68 samples beyond the 3-sigma point, so the sample maximum is a noisy estimate of the tail. In our 500-run Gaussian trial for the 10-gate path, the estimated 99.865th percentile came out at about 214.8 ps against the true 218.9 ps. 500 runs estimate the mean well (standard error = sigma / sqrt(500), about 0.28 ps here) but not the 3-sigma tail. Either run many more samples, fit a distribution to the results, or use importance sampling.

Implementing the loop

for run in 1..500:
    for each cell instance in the SDF:
        d = draw(distribution, mean = nominal_delay, sigma = k * nominal_delay)
        replace the IOPATH rise and fall values with d
    write run_N.sdf
    STA: read netlist, read_sdf run_N.sdf, report worst slack and worst path delay
    append results to a table
plot histogram; compute mean, sigma, percentiles per distribution

Practical points: keep the random seed per run so results can be reproduced; vary rise and fall delays together if they come from the same physical cause; keep interconnect delays nominal as the question allows; and script the STA tool in batch mode so 500 runs finish overnight.

Common mistakes in answers

  • Changing the mean when changing the distribution, which mixes up a shape effect with a shift.
  • Reporting only mean and sigma, when the question is about the tails.
  • Assuming the worst path stays the same path in every run; with variation, different paths become critical in different runs.
  • Forgetting that independent variation averages out on long paths while correlated variation does not.

Further reading

Share Facebook X LinkedIn WhatsApp Email

Post a Comment

1 Comments

Your comments will be moderated before it appears here.

  1. NICE























    LEARN VLSI COURSE IN 1,00,000 MINS @ ZEBROS , CHENNAI

    LOGON : www.zebrosindia.com

    FINAL YEAR PROJECTS, IEEE 2010 PROJECTS, NS2 PROJECTS, IMAGE ROCESSING PROJECTS, VLSI PROJECTS, EMBEDDED PROJECTS, BIO MEDICAL PROJECTS

    ReplyDelete
Post a Comment

#buttons=(Ok, Go it!) #days=(20)

Our website uses cookies to enhance your experience. Learn more
Ok, Go it!