LIMA
With God's help
עברית

Max and Min Delay

Imagine two workers on an assembly line who work in sync to the ring of a periodic bell (the clock signal). The first worker finishes their task and hands the part to the second worker over a long conveyor belt (the combinational logic). If the conveyor is too slow and the process is delayed, the part will not reach the second worker in time for them to get ready for the next ring (a Setup violation). On the other hand, if the conveyor is insanely fast, the first worker may fling the next part and land it right in the second worker's hands exactly while they have not yet finished dealing with the previous task (a Hold violation). Correct, smooth timing requires a calculated data transfer – not too slow, but by no means too fast either.

The theory in brief

Timing design in sequential circuits requires meeting two critical constraints to guarantee reliable and stable data transfer between flip-flops throughout the whole system. The first constraint is the maximum delay (Max Delay/Setup Path), which makes sure that the data manages to cross the critical, longest logic path and settle at the input of the next flip-flop early enough before the clock rises. The equation \[T_c \ge t_{pcq} + t_{pd} + t_{setup}\] describes this constraint, and from it we derive the maximum operating frequency allowed for the system \(\left(f_{max} = \frac{1}{T_c}\right)\).

On the other hand, the minimum delay constraint (Min Delay/Hold Path) is meant to prevent a "race" in which data rushes too fast through the shortest logic path and overwrites the previous data before the required hold time of that same clock edge has passed. For this we require the equation \[t_{ccq} + t_{cd} \ge t_{hold}\] to hold, which guarantees a sufficient contamination delay.

An essential difference between the two is that while a Setup violation can easily be worked around even after the chip is manufactured, by lowering the clock frequency, a Hold violation does not depend on the frequency at all (the variable \(T_c\) does not appear in it) and is a fatal failure. Fixing a Hold violation requires intervening in the hardware design itself, usually by adding artificial buffers on the short paths, which increase the path's \(t_{cd}\), without affecting the long path or the processor frequency.

FF1 FF2 tpd tcd CLK Tc tpcq tpd tsetup thold tccq tcd Long path: settles before the Setup window Short path: arrives only after the Hold window ends

How to read the lab

FF1 – the transmitting station

On every clock pulse it fires two data balls: one into the long path and one into the short path.

FF2 – the receiving station

Samples the data on every clock pulse. Each of its inputs has a laser door and an electric floor.

The long path (Max Delay)

A winding orange route crowded with nodes (logic gates). Its propagation delay \(t_{pd}\) is the longest.

The short path (Min Delay)

A straight, short cyan highway. Its contamination delay \(t_{cd}\) is the shortest.

A data ball and its trail

The head arrives after \(t_{ccq}+t_{cd}\): the moment the data starts to change. The end of the trail arrives after \(t_{pcq}+t_{pd}\): the moment the data settles.

The red laser door = the Setup gate

Closes \(t_{setup}\) before the next clock pulse. A ball whose trail has not passed it in time crashes into it.

The blue floor = the Hold floor

Turns on with the clock pulse and stays on for \(t_{hold}\) after it. A ball that touches it during that time evaporates.

Zigzag = buffer

Every zigzag on the short path is a buffer that adds delay: both \(t_{cd}\) and \(t_{pd}\) of the path grow.

Component Upgrade

A button above the short path: faster gates over the same distance, so the \(t_{cd}\) of the path shrinks.

The timeline (CLK)

The clock wave. Before every pulse there is a red band \((t_{setup})\) and after it a blue band \((t_{hold})\). Cyan dot: arrival of the short ball's head. Orange diamond: the long ball settles.

Math X-Ray

Above each path its equation appears with the numbers. Green: the constraint holds. Red: it is violated.

To the lab ↓
Loading the lab...
The long path (Max Delay)
The short path (Min Delay)
Transmitter
Receiver
1

Experiments to try in the lab

  1. The Safe Cruise (ideal timing). Set the clock frequency slider \((T_c)\) to a medium speed. Make sure the "Buffer Injection" slider is at zero. Watch the data balls being fired from the two stations and arriving safely at the destination without crashing into the red door (Setup) or going up in flames on the blue floor (Hold).
    This is the normal operating state of the circuit. The ball on the long path manages to cross the logic and arrive early enough before the next clock pulse to enter safely, which satisfies the maximum delay condition \[T_c \ge t_{pcq} + t_{pd} + t_{setup}.\] At the same time, the ball on the short path is delayed just enough for the hold floor to switch off in time, which satisfies the minimum delay condition \[t_{ccq} + t_{cd} \ge t_{hold}.\]
  2. Head-On Crash (Setup violation). Drag the clock slider to the right and raise the system frequency to the maximum. Watch the orange ball on the long path crash into the red laser door that closes right in its face, while the short ball arrives safely.
    Raising the clock frequency shortens the cycle time \((T_c)\). The long path, which represents the critical path in the circuit, needs a defined propagation time \((t_{pd})\) to process the data. When the clock ticks too fast, the data simply does not have enough time to cross the logic nodes before the Setup window of the next flip-flop closes. The only remedy for this violation after manufacturing is simply to slow down the system's main clock frequency.
  3. A Fatal Hardware Upgrade (creating a Hold violation on purpose). Slow the clock frequency back down to a slow, calm pace. Now click the "Component Upgrade" button located above the short path only. Watch the cyan ball now fire at top speed, and evaporate the moment it touches the blue floor that is still lit.
    The button illustrates a common situation in the industry: an upgrade to faster logic gates in a new technology. The upgrade physically reduces the contamination delay \((t_{cd})\) of the short path. Because the ball now flies faster than before over the same distance, it reaches the destination station too early – while the station is still struggling to preserve the previous data as required (the Hold window). Slowing down the clock does not help here, because the race takes place within the very same clock pulse, against its own hold door.
  4. The Zigzag Cure (fixing the Hold constraint). Keep the faulty Hold state from the previous experiment, and gradually drag the buffer slider to the right. Follow the short path as it twists into zigzags, and watch how the ball is now delayed by exactly the amount needed to pass safely.
    Since the clock frequency is irrelevant to a Hold problem, the fix must be made at the hardware level, at the design stage. Adding buffers to the short paths only artificially increases their contamination delay \((t_{cd})\), and forces the data to spend more time in transit. This physical delay gives the destination flip-flop the minimum time it needs to finish capturing the previous data, without harming the critical path (Max Delay) or the processor frequency.
  5. The Domino Effect (when over-correction becomes a problem). Keep injecting buffers into the short path until its zigzags make it the longest, most winding path on the screen. Raise the clock frequency a little, and watch how the ball on the cyan path now crashes into the red laser door of the Setup constraint.
    This experiment demonstrates the delicate balance in circuit design. Adding buffers to fix a Hold constraint necessarily increases not only the minimum delay time \((t_{cd})\) but also the maximum propagation time \((t_{pd})\) of that same path. If you overdo it and add unnecessary delays, the fast path will ironically become the critical, slowest path in the system. Instead of arriving too early, the data now arrives late, turning one Hold violation into a brand-new Setup violation on a path that worked perfectly just a moment ago.