Ready/Valid Skid Buffer
Build a one-entry skid buffer that preserves data when downstream backpressure arrives.
Task
Accept input transfers using in_valid/in_ready and present them on out_valid/out_ready without losing or duplicating data. Hold output data stable while stalled.
Examples
- in_valid=1 and in_ready=1 captures a word
- out_valid=1 and out_ready=0 holds out_data stable
Constraints
- Single clock domain.
- Synchronous active-high reset.
- Capacity is one word.
- Support back-to-back transfers when downstream is ready.
What this problem is testing
A strong answer translates the requirement into synthesizable state and combinational logic, states reset and update semantics precisely, and handles boundary conditions rather than only the nominal case.
Interview habit: before coding, state reset behavior, the state that must be stored, and the conditions that update each output.
Verification plan
- Check reset or initialization before normal operation.
- Exercise the nominal sequence cycle by cycle.
- Test boundaries such as zero, maximum count, wraparound, full/empty, or simultaneous controls when they apply.
- Prove the design holds state when an enable or qualifying condition is absent.
Edge cases worth testing
- An immediately preceding dependency.
- A dependency that can be forwarded versus one that requires a stall.
Common mistakes
- Incomplete combinational assignments that infer a latch.
- Blocking/non-blocking assignments that do not match combinational versus sequential intent.
- Parameter-width and boundary errors.
- Passing the happy path while missing reset, overflow, simultaneous operations, or illegal requests.
Interview follow-up questions
- How would you parameterize this design without introducing width or boundary bugs?
- What changes if reset timing or polarity changes?
Concepts to review
ready-valid, pipeline, backpressure, skid-buffer
Open Ready/Valid Skid Buffer in the HDLForge interactive editor.
Related problems
- 2:1 Multiplexer — Easy
- Parameterized Counter — Easy
- Priority Encoder — Medium
- Synchronous FIFO — Hard
- Shift Register — Easy
Explore the RTL Design Practice & Interview Preparation hub.