S3 · Lesson 17 · Latches and time borrowing
Two-phase latch timing, borrowing across half cycles, skew tolerance and pulsed latches
Flip-flops give every pipeline stage exactly one clock period, no more and no less: a stage with 0.7 ns of logic and a neighbor with 0.3 ns both get the same cycle, and the slow one sets it. Latches are transparent for half the clock, so data that arrives late at a latch passes straight through and simply leaves less time for the next stage. That time borrowing lets unbalanced logic share the cycle, hides clock skew, and is why the fastest custom processors have used latch-based timing for decades.
- The curves are the shortest clock period for 1 ns of logic split between two half-cycle stages, a fraction x in the first and the rest in the second.
- With a flip-flop at each half-cycle boundary, each half must fit its own stage plus the flip-flop's overhead, so the period grows as the split becomes uneven.
- With latches the halves share the cycle: the period is the total logic plus two latch delays, whatever the split.
Predict
A two-phase latch design has 0.7 ns of logic in one half cycle and 0.3 ns in the other, and its latches have 50 ps from D to Q. What is the shortest clock period, and what does the first half do?
Over a full cycle the data passes both blocks and two latches: ns. Half a period is 0.55 ns, but the first block's result arrives ns after its latch opened, 0.2 ns after the second latch opened. That latch is transparent, so the data flows on, borrowing 0.2 ns that the quick second half gives back.
Name it
Latches
A positive latch is transparent while the clock is high, passing D to Q with delay , and opaque while it's low, holding its value. Its setup and hold times refer to the closing (falling) edge.
Two-phase timing
Alternate latches on the two clock phases with logic between them. Over each cycle, data passes two logic blocks and two latches:
The sequencing overhead is , against (plus skew) for flip-flops.
Borrowing
A block may run past its half cycle as long as its data reaches the next latch before that latch closes:
Borrowing passes slack along a chain of stages; the cycle-level constraint still holds on average, so a pipeline that's too slow overall accumulates borrowing until a latch's setup fails.
Skew and hold
While data arrives during the transparent phase, clock skew doesn't steal time: latch designs have soft edges. Hold is the hard part: a latch's input must stay stable after its closing edge, while the previous latch may already be open. Nonoverlapping clock phases with a gap help:
Pulsed latches
A latch transparent only for a short pulse after each edge acts like a flip-flop with little overhead and some borrowing, at the price of a hold requirement longer.
Worked example
A flip-flop design has 1.0 ns of logic per stage, 80 ps clock-to-Q, 50 ps setup and 100 ps of clock skew. A two-phase latch version splits the same logic into two halves with 50 ps latches. Compare their clock periods.
Show the solution
- Flip-flop period.
- Latch period. as long as data arrives while the latches are transparent, since skew then shifts when a latch opens but not when the data gets through.
- Compare. shorter, mostly from absorbing the skew.
Answer 1.23 ns with flip-flops and 1.1 ns with latches, 11% shorter.
Worked example
In the 1.1 ns latch design, how much more could the first half borrow, with 30 ps of setup?
Show the solution
- Latest allowed arrival. Data may arrive this long after the second latch opens:
- What's left. It arrives 0.2 ns after, so of borrowing remains.
- How far the first block could grow. The setup window alone would let it reach ns, but the total must stay within the cycle, so the second block has to shrink to match. With only 0.3 ns to give, the first block can reach 1.0 ns.
Answer 0.32 ns more.
Worked example
A pulsed latch is transparent for 80 ps after each clock edge; its hold time is 20 ps and its contamination clock-to-Q is 40 ps. How short may a path between two of them be?
Show the solution
- The hold condition. The receiving latch stays open for the pulse, so new data must not arrive before the pulse ends plus the hold time:
- The cost. Short paths get delay buffers inserted, the price of the pulsed latch's small setup overhead.
Answer no shorter than 60 ps.
Check
A two-phase latch design has 0.6 ns of logic in its first half cycle and 0.2 ns in its second; latches take 60 ps from D to Q and need 40 ps of setup.
(a)
What is the shortest clock period?
Write units the way you normally would: 1.5 ns, 1500 ps and 0.0015 µs are the same answer.
(b)
At that period, how much does the first half borrow?
(c)
What is the most it could borrow?
Check
A stage has 1 ns of logic. Flip-flops cost 100 ps of clock-to-Q plus setup, the clock has 100 ps of skew, and latches have 60 ps from D to Q.
(a)
What period does the flip-flop design need?
Write units the way you normally would: 1.5 ns, 1500 ps and 0.0015 µs are the same answer.
(b)
And the two-phase latch design, with data arriving while the latches are transparent?
Check
Pulsed latches are transparent for 60 ps, with 10 ps hold and 50 ps contamination clock-to-Q; the clock has 20 ps of skew.
(a)
How short may a path between two of them be?
Write units the way you normally would: 1.5 ps and 0.0015 ns are the same answer.
Check
Why can a latch-based pipeline tolerate clock skew that would slow a flip-flop pipeline?
Check
Match each term to its meaning.
- Aa block finishing after its half cycle, using a latch's open window
- Btime when neither clock phase is high, protecting hold
- Ctiming that skew doesn't move as long as data arrives while the latch is open
- Da flip-flop's setup window
- Ethe latch passes D to Q while its clock phase is active
Check
A two-phase latch design runs at period T; its first half-cycle block has delay a, and its latches have D-to-Q delay d and setup s.
Step 1
How much does the first block borrow, if positive?
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 is the most any block can borrow?
Step 3
How much time does that leave the second block over the full cycle?
Check
Write latch_pipeline(delays, T, t_dq, t_su): data leaves the first latch at after time 0; latch i (i = 1, 2, …) opens at iT/2 and closes at (i + 1)T/2. Data reaches latch i at the previous latch's output time plus delays[i − 1], must arrive at least t_su before it closes, and leaves at max(arrival, opening) + t_dq. Return (ok, borrows), where borrows lists max(0, arrival − opening) for each latch.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Explain why
What is time borrowing, and why does it help when pipeline stages are unbalanced?
In a latch-based design, a latch is transparent for half of each cycle. If the logic before it finishes late, after the latch has opened, the data simply passes through the open latch and continues into the next block of logic, which then has less time. The late block has borrowed time from the next one. With flip-flops, each stage's result is captured at a fixed edge, so the slowest stage sets the clock and quick stages waste their slack. With latches, a slow block and a quick neighbor share their combined time, so the cycle only has to cover the average, the total logic over the cycle plus the latch delays.
Practice
Keep practicing
6 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.