Skip to content

AMBA AXI · Module 15

Ready/Valid Pipelining

Chain registered VALID/READY handshakes into a multi-stage pipeline without losing data or throughput — how backpressure propagates upstream stage-by-stage, why each stage needs a skid (not a bare register), the enable rule that gates every stage, and how to add compute stages while keeping the handshake intact.

A skid buffer registers one handshake stage. Real datapaths need many stages — an AXI path might register a port boundary, then an address decode, then an arbiter, then an alignment/conversion step, each adding a cycle of latency for timing. Chaining them correctly is ready/valid pipelining: a sequence of stages, each driving the next with a VALID/READY handshake, where data flows forward and backpressure propagates backward stage-by-stage, with no data lost and full one-beat-per-cycle throughput preserved when nothing stalls. Get the per-stage rule wrong and you either drop beats under backpressure or bubble the pipeline. This chapter builds the multi-stage pattern on top of the skid buffer, derives the universal per-stage enable rule, and shows how to interleave compute with the handshake.

1. The Pipeline Structure

A ready/valid pipeline is a chain of stages connected by handshakes: stage k's output (valid_k, data_k) is stage k+1's input, and stage k+1's ready feeds back to stage k. Data moves forward when a stage's output handshake completes; backpressure (a downstream ready going low) ripples backward as each stage in turn fills and deasserts its own ready.

Source to stage 1 to stage 2 to stage 3 to sink, each a VALID/READY handshake; data flows forward, READY backpressure flows backward.Sourceproduces beatsStage 1skid + workStage 2skid + workStage 3skid + workSinkconsumes beatsVALID / dataforward flow← READYbackpressure12
Figure 1 — a multi-stage ready/valid pipeline. Each stage hands off to the next with a VALID/READY handshake. Data (valid/payload) flows left-to-right; READY (backpressure) flows right-to-left. A stall at the sink propagates upstream one stage per cycle as each stage fills, until it reaches the source. Each inter-stage boundary is a registered handshake (a skid buffer) so the whole path is timing-closed.

2. The Universal Stage Enable Rule

Every pipeline stage obeys one rule. A stage advances (latches new data from upstream, or shifts its data downstream) only when it is either empty or its output is being consumed this cycle. Expressed with the handshake signals, a stage's register enable is:

Azvya Education Pvt. Ltd.VLSI Mentor
Snippet
// Stage k holds: valid_k, data_k. Upstream: valid_in/ready_out. Downstream: ready_k
// The stage can accept/advance when it's empty or its output is leaving:
assign ready_out = !valid_k || ready_k;          // upstream-facing READY
wire   advance   = ready_out;                    // enable for this stage's register
 
always_ff @(posedge clk) begin
  if (!rstn)            valid_k <= 1'b0;
  else if (advance) begin
    valid_k <= valid_in;                         // take new beat (or go empty)
    if (valid_in) data_k <= data_in;             // payload only when valid
  end
end

The crucial term is ready_out = !valid_k || ready_k: a stage presents READY upstream when it has no beat (!valid_k) or when its current beat is being taken downstream (ready_k). This single expression is what makes backpressure propagate exactly one stage per cycle and guarantees no overwrite of an unconsumed beat.

Stage READY = not-valid OR downstream-ready; that condition enables the register to latch the upstream beat.!valid_kstage emptyready_koutput consumedOR → ready_outaccept conditionadvance (enable)latch upstream beatdata_k / valid_kstage register12
Figure 2 — the per-stage enable logic. A stage's upstream-facing READY is asserted when the stage is empty (!valid) OR its output is being consumed (downstream ready). That same condition enables the stage's register to advance — taking a new beat from upstream. The combinational READY chain (ready_k feeding ready_out) is exactly what a skid buffer breaks when you need it registered.

3. Bare Registers vs. Skid Stages

The enable rule above describes a bare pipeline register (one slot per stage): correct, full-throughput, but it leaves ready_out combinational off ready_k — so the READY path ripples through the entire pipeline in one cycle, which defeats the timing purpose. Two options:

  • Skid stage per boundary. Replace each bare register with a skid buffer (Chapter 15.5): both VALID and READY are registered at every boundary, so no combinational READY path spans more than one stage. Full throughput, fully timing-closed, at the cost of two registers per stage and one cycle latency each.
  • Periodic skid insertion. Use bare registers for most stages and insert a skid buffer every few stages to chop the combinational READY chain into bounded segments — a pragmatic area/timing trade when the READY path through a few bare stages still meets timing.

The decision is the same as for a single stage: register the READY path (via skid) exactly where it would otherwise be the critical path; use bare registers where it wouldn't.

Bare register: VALID registered, READY ripples through all stages (long path). Skid stage: both registered, READY bounded to one stage.Bare registerVALID/data onlyREADY ripplespath grows with depthSkid stageboth directionsREADY boundedone stage only12
Figure 3 — bare register vs. skid stage. A bare pipeline register registers only VALID/data, leaving READY to ripple combinationally through every stage — the READY critical path grows with pipeline depth. A skid stage registers both directions, bounding the READY path to one stage. Choose skid where the cumulative READY path fails timing; bare registers are cheaper where it doesn't.

4. The Timing: Backpressure Propagation

The waveform shows a three-stage pipeline streaming one beat per cycle, then the sink stalls. Backpressure climbs the pipeline one stage per cycle — each stage holds its beat as its downstream ready drops — until the source is held. When the sink resumes, the pipeline drains forward and full-rate streaming returns. No beat is lost; the only cost is the stall depth in latency.

Backpressure climbing a 3-stage ready/valid pipeline

10 cycles
Three-stage pipeline streams one per cycle; sink stalls; ready deasserts stage by stage upstream; on resume the pipeline drains and full rate returns.stream 1/cycstall climbs updrain + resumesink stallssink stallssink resumessink resumesCLKsrc_validready_1valid_3ready_3ready_2t0t1t2t3t4t5t6t7t8t9
Figure 4 — backpressure propagating up a 3-stage pipeline. Beats stream one per cycle until the sink drops ready_3 (cycle 4). The stall climbs upstream: stage 3 fills and drops ready_2, then stage 2 fills and drops ready_1, then the source is held — one stage per cycle. When the sink resumes (cycle 6), beats advance again and the pipeline returns to full rate. Each stage holds its payload stable while back-pressured; nothing is dropped.

5. Common Misconceptions

6. Debugging Insight

7. Verification Insight

8. Interview Questions

9. Summary

Ready/valid pipelining chains registered handshake stages so data flows forward and backpressure propagates backward one stage per cycle, with no loss and full throughput. Every stage obeys one universal rule: it advances (latches a new beat) only when empty or its output is being consumedready_out = !valid || ready_downstream, which is also the register enable. That single invariant guarantees no overwrite of a pending beat (no loss) and acceptance of a replacement exactly when the current beat leaves (no bubble), so a chain of such stages is a lossless, order-preserving, one-beat-per-cycle channel of arbitrary depth.

A bare pipeline register registers only VALID/data, leaving the READY path combinational across the whole pipeline; to register the backward path and bound the READY critical path you use skid stages (Chapter 15.5) at the boundaries that need them — full skid where the READY path fails timing, bare registers (or periodic skid insertion) where it doesn't. Adding stages adds latency, not throughput loss, and backpressure's one-stage-per-cycle climb means deep pipelines have deep stall latency the source must tolerate. Compute blocks integrate by becoming handshake participants (output valid only when ready, input ready only when able, freeze under backpressure). Verification is a stall storm plus end-to-end conservation/ordering — the standard sign-off for any handshaked pipeline. Next, we add real buffering with FIFOs to decouple producer and consumer rates.

10. What Comes Next

You can now pipeline a handshake to any depth; next we add genuine buffering to decouple rates:

  • 15.7 — FIFO-Based Buffering (coming next) — using FIFOs to decouple producer and consumer rates on AXI, absorbing bursts and bridging rate mismatches beyond what a two-entry skid can.

Previous: 15.5 — The Skid Buffer. Related: 3.1 — The VALID/READY Handshake for the per-stage contract, 3.3 — Backpressure & Stalls for the stall propagation, and 13.2 — Latency Analysis for how pipeline depth shows up as latency.