A glitch matters only if the receiving cell responds. A short pulse that is large but gone before the cell can switch is harmless, a long pulse of modest height may not be. Libraries therefore describe each input's tolerance as a curve of allowed height against pulse width.
curve = [(10, 0.60), (30, 0.40), (60, 0.30), (120, 0.25)] # (width ps, allowed height V), illustrative
def allowed(width):
for (w0, h0), (w1, h1) in zip(curve, curve[1:]):
if w0 <= width <= w1:
return h0 + (width - w0) / (w1 - w0) * (h1 - h0)
raise ValueError("width outside the curve")
glitches = {"g1": (0.288, 25), "g2": (0.182, 100), "g3": (0.300, 80)} # (height V, width ps)
margin = {g: round(allowed(w) - h, 3) for g, (h, w) in glitches.items()}
assert round(allowed(25), 3) == 0.45 and round(allowed(100), 3) == 0.267 and round(allowed(80), 3) == 0.283
assert margin == {"g1": 0.162, "g2": 0.085, "g3": -0.017}
fails = [g for g, m in margin.items() if m < 0]
assert fails == ["g3"]
print("PASS: noise margins (V)", margin, "; failing", fails)Glitch | Height (V) | Width (ps) | Allowed height (V) | Margin (V) |
|---|---|---|---|---|
g1 | 0.288 | 25 | 0.450 | +0.162 |
g2 | 0.182 | 100 | 0.267 | +0.085 |
g3 | 0.300 | 80 | 0.283 | -0.017 |
g1 is nearly as tall (0.288 V) but narrow: the curve allows 0.45 V at 25 ps, so it passes with 0.162 V to spare. g2 is the widest but low and also passes. g3 is the tallest of the three (0.300 V) and at 80 ps wide enough that the allowed height has dropped to 0.283 V, so it sits above the curve by 0.017 V and fails. The combination of height and width decides: g3 fails because its width brings the allowed height below its height. The curve here is invented; real curves come from library characterisation and differ per input pin, per corner and per output state.
Margins are computed against the library curve for the actual receiver pin, in each corner.
Margins close to zero are reported, not only violations: noise estimates are less precise than delay ones.
A violation lists height, width, the aggressors and the receiver, so a fix can be targeted.
The allowed height at 50 ps lies between 0.40 V (30 ps) and 0.30 V (60 ps): 0.40 - (20/30) × 0.10 = 0.333 V. The margin is 0.333 - 0.20 = 0.133 V, a pass.