Setup Time
Setup time, in digital timing, is the minimum amount of time a signal must stay stable at a flip-flop's input BEFORE the clock edge arrives — the mirror image of hold time, which requires that same signal to stay stable AFTER the edge. Setup time is what actually sets the ceiling on how fast a digital circuit can run: every clock period has to be long enough for a signal to travel through logic and still arrive with enough setup margin left over before the next clock edge comes looking for it.
Setup time exists because a flip-flop needs a brief window to commit its input value before the clock edge actually triggers capture, and that window can't be zero. Internally, the clock edge kicks off an electronic sampling process, and the input value needs to already be sitting steady at the input node before that process starts, giving the internal circuitry a clean value to latch rather than a signal still in the middle of transitioning. If the input is still changing when the clock edge arrives, the flip-flop may capture an intermediate, undefined value — which is the direct mechanism behind setup-time violations and the metastability that can follow from them.
Setup time is the single constraint that actually determines a chip's maximum clock frequency, which is why "how fast can this chip run" is fundamentally a setup-time question. For any path between two flip-flops, the clock period has to be long enough to cover the time for the launching flip-flop to produce its output, the time for that signal to propagate through whatever combinational logic sits between the two flip-flops, and the receiving flip-flop's own setup time — all with some margin left to spare. Add up every one of these delays across the slowest path in the entire chip (the "critical path"), and that sum sets the shortest clock period the chip can reliably run at. Every speed grade a chip ships at ultimately traces back to which path came closest to violating this one constraint.
Setup margin is the buffer between a path's actual delay and the clock period it has to fit inside, and keeping that margin positive across the whole chip, under every real-world condition, is the entire job of static timing analysis. A path might work perfectly in simulation at nominal voltage and typical temperature and still fail once the chip ships, because real manufacturing produces a spread of transistor speeds, voltage sags under heavy load, and temperature swings slow transistors down. Static timing analysis checks every single path against worst-case combinations of these variations simultaneously — not just the nominal case — which is why a chip's rated clock speed is deliberately set with margin below whatever a single best-case lab measurement might suggest it could theoretically hit.
Setup-time violations are fixed very differently from hold-time violations, and knowing which one you're looking at changes the entire repair strategy. A setup violation means a signal is arriving too close to, or past, the next clock edge — the signal is simply too slow relative to the clock period. The fix is almost always to either slow the clock down (reducing throughput, but always available as a last resort) or speed up the logic itself: restructuring the path with fewer logic levels, using faster standard cells, or adding buffer drive strength. A hold violation, by contrast, means a signal arrived too fast relative to the SAME edge that just launched it — slowing the clock doesn't help at all, because the two problems live on opposite sides of the same clock edge and respond to opposite fixes.
Modern physical-design tools spend enormous effort closing setup-time violations because the margins involved shrink dramatically as a chip is pushed toward its maximum frequency. Timing closure — the process of iteratively fixing every remaining setup (and hold) violation across a full chip — routinely consumes a large fraction of total design schedule on an aggressive, high-frequency chip, precisely because fixing one path's setup time (by, say, resizing a buffer) can shift wire routing and capacitance enough to create a new violation somewhere else. This iterative, whack-a-mole quality is exactly why timing closure is treated as its own specialized discipline within chip design, with dedicated engineers and tools built specifically around converging a design onto a schedule that satisfies every setup and hold constraint simultaneously, everywhere on the chip, at once.