C7 · Lesson 19 · Propagation delay and glitches
Logic takes time, and the gaps can show
A gate's output doesn't change the instant its input does: it takes a few tens of picoseconds for the transistors to charge the next node. Those delays add up along every path through a circuit, and they set how fast a chip can be clocked. They also cause glitches: when two paths to an output have different delays, the output can flick briefly to the wrong value before settling, even though the truth table says it shouldn't change at all.
Play
- A multiplexer built from gates, with both data inputs held at 1. The output should stay at 1 whatever S does.
- Watch Y on the timing diagram as S switches. What happens just after S falls from 1 to 0? (Each gate takes one tick.)
- Which path is slower when S falls: through the inverter or not?
Predict
The mux above has A = B = 1, so its output should stay at 1. When S falls from 1 to 0, what does Y do?
It dips to 0 for a moment. When S falls, the S·A term drops after one gate delay, but the ·B term can't rise until the inverter has flipped, one delay later still. For that gap, both terms are 0. This is a static hazard. Adding the redundant term A·B, which the K-map would show bridges the two groups, keeps Y at 1 throughout.
Name it
Timing
Propagation delay : from an input change to the output settling. The critical path is the slowest route from any input to any output; its total delay limits how fast the circuit can work.
Ripple-carry adders are slow because the carry may have to pass through every stage: an n-bit adder's worst case is about n carry delays. Faster adders (carry-lookahead, carry-select) compute carries in parallel at the cost of more gates.
Clock speed. In a clocked circuit, data leaves one flip-flop, passes through logic, and must arrive at the next flip-flop before its setup time:
where is the flip-flop's clock-to-output delay.
Glitches. Unequal path delays can make an output pulse briefly before settling. In clocked designs they're harmless, because flip-flops sample only after everything has settled. They matter for signals that act immediately: an asynchronous reset, a clock enable, a chip select. A static hazard can be removed by adding the consensus term that covers the transition.
The same mux with the consensus term A·B added. Y no longer dips.
Worked example
An 8-bit ripple-carry adder's carry takes 2 gate delays per bit, at 30 ps per gate. What is its worst-case delay?
Show the solution
- Find the worst case. It's when a carry starts at bit 0 and runs all the way to the top.
- Add up the delays.
Answer 480 ps.
Worked example
In with B = C = 1, A falls from 1 to 0. Why can f glitch, and what fixes it?
Show the solution
- What f should do. With B = C = 1, f should stay 1.
- Why it glitches. AB turns off as soon as A falls, while turns on only after the inverter's delay: briefly both are 0.
- The fix. Adding the consensus term BC, which is 1 throughout, holds f at 1.
Answer AB turns off before turns on, so f briefly drops to 0; adding the consensus term BC fixes it.
Worked example
A register (clock-to-Q 50 ps) feeds the 8-bit ripple adder of the first example (480 ps), which feeds another register (setup 40 ps). What's the fastest clock?
Show the solution
- Minimum period.
- Maximum frequency. The adder takes 84% of the cycle.
- With a faster adder. A lookahead adder that finishes in 150 ps would allow 240 ps and 4.2 GHz.
- The register overhead. Its 90 ps would then be more than a third of the cycle, which is why very fast designs also minimize their flip-flops' delays.
Answer 1.75 GHz, from a 570 ps period.
Check
A path passes through 5 gates, each with a 10 ps delay. What's its delay?
Write units the way you normally would: 1.5 ps and 0.0015 ns are the same answer.
Check
A ripple-carry adder of 16 bits has a carry delay of 20 ps per stage. Roughly how long might its carry take to ripple through?
Write units the way you normally would: 1.5 ns, 1500 ps and 0.0015 µs are the same answer.
Check
A path has = 50 ps, 400 ps of logic and a setup time of 60 ps. What's the highest clock frequency it allows?
Write units the way you normally would: 1.5 MHz, 1500 kHz and 0.0015 GHz are the same answer.
Check
The mux has a static hazard when S switches with A = B = 1. What single product term, added to Y, removes it?
Write AND as · or & (or just AB), OR as +, XOR as ⊕, and NOT as ¬ or a trailing ': A·B + C' works.
Check
Why are glitches usually harmless in a synchronous (clocked) design?
Check
A register ( = 30 ps) feeds logic of 200 ps into a register with 50 ps of setup.
(a)
What's the minimum clock period?
Write units the way you normally would: 1.5 ps and 0.0015 ns are the same answer.
(b)
What's the maximum clock frequency?
Check
An n-bit ripple adder (2 gate delays of t per bit) sits between registers with clock-to-Q c and setup s.
Step 1
What's the adder's worst delay?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
What's the maximum clock frequency?
Explain why
How can a circuit whose truth table says the output shouldn't change still produce a brief pulse?
The truth table describes the output once everything has settled, but signals reach the output through different paths with different delays. When an input changes, the term that was holding the output at 1 may switch off a little before the term that takes over switches on. For that short gap neither term holds the output, so it briefly takes the wrong value. Once both paths have caught up, the output settles to what the truth table says.
Practice
Keep practicing
7 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.