Skid buffer

A valid/ready pipeline register that keeps full throughput under backpressure.

When to use it

On a valid/ready (AXI-stream) bus, you often want to add a register stage to break a long timing path. But a naive register stalls a cycle whenever the downstream isn't ready, and worse, wiring ready straight through defeats the point. A skid buffer registers both directions yet still moves one beat per cycle.

How it works

It keeps one extra holding ("skid") register. While the output is stalled and a new beat arrives, that beat skids into the holding register instead of forcing the upstream to stop on the same cycle. When the output frees up, the skidded beat moves out first. So upstream only sees backpressure one cycle late, which is exactly enough to register the ready signal.

Gotchas

Try it

Runs on our simulator, edit the code and press Run to see the waveform.

Open & fork in the playground → Ship the verified version: lfpga add lfpga_skid_buffer

The runnable example above is a teaching version. The libfpga library ships a hardened, parameterised, CI-tested module (lfpga_skid_buffer) for production use.

Next recipe: Priority encoder