S317 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

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?

Name it

Latches

A positive latch is transparent while the clock is high, passing D to Q with delay tDQ, 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:

T≥t1+t2+2tDQ

The sequencing overhead is 2tDQ, against tclk-q+tsetup (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:

tborrow≤T2−tsetup(−tskew)

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 tno help:

tmin≥thold+tskew−tccq−tno

Pulsed latches

A latch transparent only for a short pulse tpw after each edge acts like a flip-flop with little overhead and some borrowing, at the price of a hold requirement tpw 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
  1. Flip-flop period. T=1.0+0.08+0.05+0.1=1.23ns
  2. Latch period. T=1.0+2×0.05=1.1ns 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.
  3. Compare. 1−1.11.23=11% 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
  1. Latest allowed arrival. Data may arrive this long after the second latch opens: t=T2−tsetup=0.55−0.03=0.52ns
  2. What's left. It arrives 0.2 ns after, so 0.52−0.2=0.32ns of borrowing remains.
  3. How far the first block could grow. The setup window alone would let it reach 0.7+0.32=1.02 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
  1. 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: tmin≥20+80−40=60ps
  2. 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.

  1. Aa block finishing after its half cycle, using a latch's open window
  2. Btime when neither clock phase is high, protecting hold
  3. Ctiming that skew doesn't move as long as data arrives while the latch is open
  4. Da flip-flop's setup window
  5. 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°.

Check

Write latch_pipeline(delays, T, t_dq, t_su): data leaves the first latch at tDQ 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?

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.