Constraints change during a project: new exceptions, new clock definitions, loosened budgets. Most changes are legitimate. A change that improves timing a lot without any design change is exactly what an overbroad exception or a loosened budget looks like. Tracking the effect of each version makes such jumps visible.
versions = [ # (version, WNS ns, what changed, endpoints affected by the change)
("c14", -0.052, "baseline", 0),
("c15", -0.050, "new input delay on 2 ports", 2),
("c16", -0.049, "uncertainty updated for clk_b", 380),
("c17", 0.011, "false path clk_a to clk_b", 1120),
]
threshold = 0.03 # an improvement larger than this from constraints alone needs review
ep_limit = 300 # more affected endpoints than this needs review; both limits are examples
watched = ("false path", "multicycle", "exception", "clock", "uncertainty")
flags = []
for prev, cur in zip(versions, versions[1:]):
gain = round(cur[1] - prev[1], 3)
if gain > threshold or cur[3] > ep_limit or any(w in cur[2] for w in watched):
flags.append((cur[0], gain, cur[2], cur[3]))
assert flags == [("c16", 0.001, "uncertainty updated for clk_b", 380),
("c17", 0.06, "false path clk_a to clk_b", 1120)]
print("PASS: versions to review:", flags)Version | WNS (ns) | Change | Endpoints affected | Review? |
|---|---|---|---|---|
c14 | -0.052 | Baseline | 0 | — |
c15 | -0.050 | Input delay on 2 ports | 2 | No (small, local) |
c16 | -0.049 | Uncertainty on clk_b | 380 | Yes: 380 endpoints |
c17 | +0.011 | False path clk_a to clk_b | 1120 | Yes: gain 0.060 ns, 1120 endpoints |
Version c15 changes WNS by 2 ps on 2 endpoints: no review. Version c16 moves WNS by only 1 ps but touches 380 endpoints through an uncertainty change, so it is flagged despite the small gain. Version c17 turns a -0.049 ns violation into +0.011 ns by adding a false path that affects 1120 endpoints: a 60 ps gain from a constraint alone, on a large number of endpoints. That one needs a human to read the exception, count the paths it covers, and decide whether they are all really false. A version is flagged on a WNS gain above the threshold, or more than (for example) 300 affected endpoints, or any change to exceptions, clocks or uncertainty. The thresholds are a policy, not a law; the point is that large or sensitive constraint-only changes get reviewed.
Each constraint version is tagged, with a changelog entry and the WNS and TNS it produced.
Jumps above the threshold, and exceptions touching many endpoints, require sign-off by someone other than the author.
Constraint changes after the freeze date go through the same review as design changes.
More than (for example) 300 affected endpoints, or a change to exceptions, clocks or uncertainty, whose effect can be hidden in the worst-slack figure: c16 is flagged for exactly that reason.