A regression keeps one baseline record per case and compares each nightly run against it. Thresholds decide the verdict before any human looks.
All numbers below are EXAMPLE parameters in teaching units. Area is in course.lib units, slack in EXAMPLE picoseconds, power in EXAMPLE microwatts.
Case | Baseline area | Baseline WNS (ps) | Baseline power |
|---|---|---|---|
w4 | 52 | 120 | 31 |
w8 | 104 | 90 | 62 |
w16 | 208 | 40 | 124 |
w32 | 416 | 10 | 248 |
Case | Current area | Current WNS (ps) | Current power |
|---|---|---|---|
w4 | 53 | 118 | 31 |
w8 | 112 | 88 | 63 |
w16 | 207 | 12 | 125 |
w32 | 418 | 9 | 262 |
Metric | Regression rule | Boundary |
|---|---|---|
Area | Current x 100 above baseline x 105 | Exactly plus 5% is noise. |
Power | Current x 100 above baseline x 105 | Exactly plus 5% is noise. |
Timing | Baseline WNS minus current WNS above 20 ps | Exactly 20 ps is noise. |
Each verdict substitutes the EXAMPLE numbers into its rule. Integer products keep the comparison exact.
w4 area: 53 x 100 = 5300 vs 52 x 105 = 5460 -> 5300 < 5460, noise (+1.92%)
w8 area: 112 x 100 = 11200 vs 104 x 105 = 10920 -> 11200 > 10920, regression (+7.69%)
w16 timing: 40 - 12 = 28 ps drop vs 20 ps band -> 28 > 20, regression
w32 power: 262 x 100 = 26200 vs 248 x 105 = 26040 -> 26200 > 26040, regression (+5.65%)
w4 timing: 120 - 118 = 2 ps drop, noise; w8 power: up 1 on 62 = 1.61%, noiseThe program below encodes both EXAMPLE tables and the three rules. Its nine self-checks pin every verdict plus the boundary behaviour.
import sys
BASE_AREA = {"w4": 52, "w8": 104, "w16": 208, "w32": 416}
BASE_WNS = {"w4": 120, "w8": 90, "w16": 40, "w32": 10}
BASE_POWER = {"w4": 31, "w8": 62, "w16": 124, "w32": 248}
CURR_AREA = {"w4": 53, "w8": 112, "w16": 207, "w32": 418}
CURR_WNS = {"w4": 118, "w8": 88, "w16": 12, "w32": 9}
CURR_POWER = {"w4": 31, "w8": 63, "w16": 125, "w32": 262}
def area_regressed(base, curr):
return curr * 100 > base * 105
def power_regressed(base, curr):
return curr * 100 > base * 105
def timing_regressed(base_wns, curr_wns):
return base_wns - curr_wns > 20
def flags_for(case):
flags = []
if area_regressed(BASE_AREA[case], CURR_AREA[case]):
flags.append("area")
if timing_regressed(BASE_WNS[case], CURR_WNS[case]):
flags.append("timing")
if power_regressed(BASE_POWER[case], CURR_POWER[case]):
flags.append("power")
return flags
def check(cond, label):
if not cond:
print("FAIL: " + label)
sys.exit(1)
flags = {}
for case in ["w4", "w8", "w16", "w32"]:
flags[case] = flags_for(case)
check(flags["w4"] == [], "w4 within band stays clean")
check(flags["w8"] == ["area"], "w8 flags area only")
check(flags["w16"] == ["timing"], "w16 flags timing only")
check(flags["w32"] == ["power"], "w32 flags power only")
check(area_regressed(100, 105) is False, "exact plus 5 percent is noise")
check(area_regressed(100, 106) is True, "above 5 percent is regression")
check(timing_regressed(100, 80) is False, "exact 20 ps drop is noise")
check(timing_regressed(100, 79) is True, "21 ps drop is regression")
check(len(flags["w4"]) + len(flags["w8"]) + len(flags["w16"]) + len(flags["w32"]) == 3, "three flags in total")
print("PASS: comparator flags area on w8 timing on w16 power on w32")Every w4 move sits inside its band: area 5300 below 5460, a 2 ps timing drop, power unchanged. Inside the band is noise by policy.
So an exact plus-5% or exact 20 ps move stays noise. The policy pages on exceeded bands, not touched ones.