Setup slack is required minus arrival, where required is the period minus uncertainty minus setup. Every term below is a stated EXAMPLE parameter.
The checker at the end of this lesson recomputes all three cases. Quote the derivation, not just the sign.
EXAMPLE parameters, all in ns:
case 1: period 10.0, arrival 8.6, uncertainty 0.5, setup 0.3
required = 10.0 - 0.5 - 0.3 = 9.2
slack = 9.2 - 8.6 = 0.6 (positive: meets timing)
case 2: period 5.0, arrival 4.9, uncertainty 0.3, setup 0.2
required = 5.0 - 0.3 - 0.2 = 4.5
slack = 4.5 - 4.9 = -0.4 (negative: violation of 0.4)
case 3: period 8.0, arrival 6.0, uncertainty 0.4, setup 0.2
required = 8.0 - 0.4 - 0.2 = 7.4
slack = 7.4 - 6.0 = 1.4 (positive: meets timing)The block below is illustrative text, not a runnable script. It uses standard SDC-style command names with EXAMPLE numbers and claims no tool defaults.
illustrative SDC-style lines (not run; names only, no tool defaults claimed):
create_clock -period 10.0 [get_ports clk]
set_input_delay 2.0 -clock clk [all_inputs]
set_output_delay 2.0 -clock clk [all_outputs]
set_false_path -from [get_ports rst_n]Question | Precise answer | Follow-up probe | Common wrong answer |
|---|---|---|---|
Derive the slack for period 10 ns with arrival 8.6 ns, uncertainty 0.5 ns, and setup 0.3 ns. | Required is 9.2 ns and slack is 0.6 ns, positive. | What changes at period 5 ns with arrival 4.9 ns? | Slack equals period minus arrival. |
What does a false path say, and when is it safe? | It removes paths from timing analysis; it is safe only with a recorded functional reason (unreachable in function, asynchronous domains with no valid timing relationship, or a mode where the path is inactive); never to hide a real violation. | What breaks if it covers a real path? | It fixes a violation by relaxing the path. |
What does input delay constrain? | It sets the arrival budget inside the period, so period and input delay together bound the input path. | Which violation appears if the delay grows? | Input delays only matter for simulation. |
The program below recomputes the three hand-derived slacks. Its passing line pins the numbers quoted above.
import sys
def slack(period, arrival, uncertainty, setup):
return period - uncertainty - setup - arrival
def close(got, want):
return abs(got - want) < 1e-9
cases = [
(slack(10.0, 8.6, 0.5, 0.3), 0.6),
(slack(5.0, 4.9, 0.3, 0.2), -0.4),
(slack(8.0, 6.0, 0.4, 0.2), 1.4),
]
for i in range(len(cases)):
got, want = cases[i]
if not close(got, want):
print("FAIL: case " + str(i + 1) + " got " + str(got) + " want " + str(want))
sys.exit(1)
print("PASS: 3 slack cases agree at 0.6 ns, -0.4 ns, 1.4 ns")Required is 7.4 ns, so slack is 7.4 minus 6.0, which is 1.4 ns.
It skips uncertainty and setup, so it overstates the margin by 0.8 ns in case 1.