41 / 63 · Concept
Distinguishing cycle latency from throughput
Define observation points for an N-stage delay line and calculate latency and throughput quantitatively.
Lessons are free to read. Enroll to save your learning progress.
Define where “N cycles later” starts
A bit first captured in bit 0 at edge k reaches bit N-1 of an N-bit shift registerRegister A circuit that stores multiple bits of state. The synchronous registers in this course store their specified inputs at a clock edge. Learn more at edge k+N-1. The interval from first capture to final capture is N-1 periods.
If instead an upstream register launches the new bit at edge k, the first shift-register capture normally occurs at k+1. The output is then N periods from launch. These statements have different starting points; they do not contradict each other.
Define d[k] as the input accepted at edge k. Once the register is filled,
Long latency can still allow a result every cycle
With clock period T and one accepted bit per edge, steady-state throughputThroughput The number of operations accepted or completed per unit time. A pipeline can increase throughput without reducing the latency of an individual operation. is bits/second. Increasing N increases storage depth and latency, but throughput stays the same as long as input can be accepted continuously.
A four-stage delay line at 100 MHz has a 10 ns period and steady-state throughput of 100 Mbit/s. “One bit takes time to traverse the line” differs from “you must wait that long before inserting the next bit.”
Each column below records a rising edgeRising edge The instant at which the clock changes from 0 to 1. Distinguish it from a level, which refers to the entire interval during which CLK=1. Learn more. Inputs are pre-edge; states labeled “after” are post-update. Alignment shows sampling order, not physical propagation delayPropagation delay The time from an input change until the output settles to the correct value. Logical equivalence and timing behavior are separate properties. Learn more. In the three-stage line, A enters stage 0 at E0 and reaches the last stage just after E2, while B and C occupy earlier stages. Dashes mark slots not yet valid.
View waveform data
| Signal | Wave | Bus values |
|---|---|---|
| edge | 2345 | E0 → E1 → E2 → E3 |
| accepted | 2345 | A → B → C → D |
| stage0 after | 2345 | A → B → C → D |
| stage1 after | 2345 | - → A → B → C |
| stage2 after | 2.34 | - → A → B |
With stalls, count accepted shifts
An edge with enable or accept=0 does not shift bits. There is then no fixed elapsed-time latency, only a latency in accepted edges. Shift valid under the same conditions as data to identify when the output is meaningful.
Describing a pipelinePipeline A structure that divides computation into register-separated stages and overlaps processing of multiple inputs. Data, valid and control signals must be aligned by stage. Learn more only as a latency-reduction technique is misleading. It often divides combinational paths to increase clock frequency while adding register stages and cycle latency. Area, power and frequency tradeoffs are explored in more detail in the following course.
Try it yourself
In a five-bit delay line, a bit is captured into bit 0 at edge 10. At which edge does it appear at bit 4 without stalls? What if two intervening edges have enable=0?
Read the explanation
Edge 14 without stalls, edge 16 with two stalls. Four additional shifts are needed after first capture. The starting point here is capture into bit 0, not an external input-register update.