Skip to content
BetterDL

Setup slack

Also called: slack, timing slack, timing margin

The spare time on a path: clock period minus (tcq + tpd + tsu). Zero or positive passes setup; negative is a setup violation.

The setup constraint gives a yes-or-no answer. Setup slack tells you by how much:

slack = T − (tcq + tpd + tsu)

  • Positive slack: the data arrives early with time to spare. The path could take that much more logic delay, or the clock could speed up.
  • Zero slack: exactly on the limit. It still passes.
  • Negative slack: a setup violation. The data arrives too late and the capturing flip-flop may store the wrong value.

Timing tools report slack for every path, and designers work on the worst one first: the path with the most negative slack is the critical path between registers.

Turned around, slack gives the most logic that fits in a period: tpd(max) = T − tcq − tsu.

Always put every number in the same unit before subtracting. Mixing 1.9 ns with 200 ps is the most common slip.

Worked examples

Example

Slack at 400 MHz

A path has tcq = 0.3 ns, logic tpd = 1.8 ns and tsu = 0.2 ns. The clock is 400 MHz.

  1. 1.

    Period: T = 1000 ÷ 400 = 2.5 ns.

  2. 2.

    Needed: 0.3 + 1.8 + 0.2 = 2.3 ns.

  3. 3.

    Slack = 2.5 − 2.3 = +0.2 ns (200 ps). The path passes.

  4. 4.

    It could absorb another 200 ps of logic delay before failing.

Example

Negative slack

Same path, but the clock is raised to 500 MHz.

  1. 1.

    Period: T = 1000 ÷ 500 = 2 ns.

  2. 2.

    Slack = 2 − 2.3 = −0.3 ns. Negative, so it's a setup violation.

  3. 3.

    The fastest clock this path supports is 1 ÷ 2.3 ns ≈ 435 MHz.

Common mistakes

  • Subtracting the wrong way round. Slack is available time (T) minus needed time.

  • Treating zero slack as a failure. Zero means it just meets the requirement.

  • Mixing ns and ps in one subtraction.

Practice Setup slack

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Setup slack is taught in Timing and Sequential Logic.