Part of Curriculum: Sequential RTL Design (Module 1: On-Chip Protocols)
View Full Roadmap →
Level 3 Hard ★ Flagship #32 50 pts ✓ Solved

Parameterized Register Slice — Pipeline and Backpressure

On-Chip Protocols · memory, fifo, protocols, apb, uart, hard, axi-/-streaming

Design a Parameterized Register Slice (Skid Buffer) of width DATA_WIDTH (default 8) that breaks combinational paths in BOTH forward and backward directions with 0 bubble cycles.

Write a synthesizable Verilog module named top_module matching the ports below exactly.
📐 Circuit Schematic Diagram
s_valids_datam_readys_readym_validm_data>clkrst_nPARAMETERIZED REGISTRAM / STORAGE ARRAY
⚡ Timing & Synthesizability Constraints

Timing Contract: Both forward signals (`m_valid, m_data`) and backward signal (`s_ready`) must be registered. 0 pipeline stall bubbles.

RTL Constraints: Parameterized: `parameter DATA_WIDTH = 8`. Full throughput (1 beat per cycle sustained).

Objective: Master 2-slot skid buffers, pipeline timing closure, eliminating combinational loops, and 100% throughput under backpressure.

Prerequisites: Valid-ready handshake, AXI streaming.
NameDirWidthDescription
clkinput1Pipeline clock
areset_ninput1Active-low reset
s_validinput1Upstream valid
s_readyoutput1Registered upstream ready
s_datainputDATA_WIDTHUpstream data
m_validoutput1Registered downstream valid
m_readyinput1Downstream ready
m_dataoutputDATA_WIDTHRegistered downstream data
Expected Waveform (Golden Timing Contract)
💡 Need Guidance? Progressive Hints (3 Levels)
Hint 1: Conceptual Direction & Hardware Primitives
A Skid Buffer uses two internal data slots: `m_data` (primary output) and `skid_data` (temporary holding).
Hint 2: Implementation Architecture & Approach
When downstream asserts backpressure (`m_ready = 0`), the skid register absorbs one extra in-flight beat and pulls `s_ready <= 0`.
Hint 3: Edge Cases, Timing & Verilog Syntax
This cuts the combinational path on both forward and backward channels, enabling maximum clock frequency.
🔒 Reveal Verified Reference RTL Solution (Click to expand)
⚠️ Self-Discovery Warning: Try solving and simulating first! Viewing the verified reference implementation will bypass the real debugging experience.
Verified Synthesizable RTL
module top_module #(
  parameter DATA_WIDTH = 8
)(
  input                    clk,
  input                    areset_n,
  input                    s_valid,
  output reg               s_ready,
  input   [DATA_WIDTH-1:0] s_data,
  output reg               m_valid,
  input                    m_ready,
  output reg [DATA_WIDTH-1:0] m_data
);
  reg [DATA_WIDTH-1:0] skid_data;
  reg                  skid_valid;

  always @(posedge clk or negedge areset_n) begin
    if (!areset_n) begin
      s_ready    <= 1'b1;
      m_valid    <= 1'b0;
      m_data     <= {DATA_WIDTH{1'b0}};
      skid_valid <= 1'b0;
      skid_data  <= {DATA_WIDTH{1'b0}};
    end else begin
      if (m_ready) begin
        if (skid_valid) begin
          m_valid    <= 1'b1;
          m_data     <= skid_data;
          skid_valid <= 1'b0;
          s_ready    <= 1'b1;
        end else if (s_valid && s_ready) begin
          m_valid    <= 1'b1;
          m_data     <= s_data;
          s_ready    <= 1'b1;
        end else begin
          m_valid    <= 1'b0;
          s_ready    <= 1'b1;
        end
      end else begin // m_ready is low (downstream stalled)
        if (s_valid && s_ready) begin
          skid_data  <= s_data;
          skid_valid <= 1'b1;
          s_ready    <= 1'b0; // can no longer accept when skid is full
        end
      end
    end
  end
endmodule
Verilog-2001 / SV Saved
Font: |
// Click Run Tests (or press Ctrl+Enter) to compile your RTL and simulate against hidden testbenches.
Simulation Timing Diagram (VCD Waveform)
100%
No simulation waveform yet. Run tests to simulate and generate VCD traces.
No compilation run yet. Syntax warnings and elaboration messages will appear here.
No simulation output yet. Raw stdout from vvp will appear here.

RTL Problems / Level 3 · On-Chip Protocols

What You Will Learn

By solving Parameterized Register Slice — Pipeline and Backpressure, you will acquire core industry skills:

  • Synthesizable hardware modeling in standard Verilog-2001 / SystemVerilog.
  • Correct handling of interface port contracts, edge-triggered clocks, and active-low/high resets.
  • Simulation waveform interpretation and debugging using timing diagrams (VCD traces).
  • Architectural avoidance of timing violations, glitching hazards, and synthesis warnings.

Problem Statement & Requirements

Design a Parameterized Register Slice (Skid Buffer) of width DATA_WIDTH (default 8) that breaks combinational paths in BOTH forward and backward directions with 0 bubble cycles.

Hardware design teams at leading semiconductor firms evaluate these exact port contracts, race-condition assertions, and corner cases during technical design reviews and ASIC engineer interviews.

Objective: Master 2-slot skid buffers, pipeline timing closure, eliminating combinational loops, and 100% throughput under backpressure.

Prerequisites: Valid-ready handshake, AXI streaming.

Port List & Interface Timing

The hidden testbench instantiates top_module. Module port names and bit-widths must match the interface contract exactly:

NameDirWidthDescription
clkinput1Pipeline clock
areset_ninput1Active-low reset
s_validinput1Upstream valid
s_readyoutput1Registered upstream ready
s_datainputDATA_WIDTHUpstream data
m_validoutput1Registered downstream valid
m_readyinput1Downstream ready
m_dataoutputDATA_WIDTHRegistered downstream data

Timing Constraints & Synthesizable RTL Rules

⚡ Synthesizable Implementation Guidelines

Timing Contract: Both forward signals (`m_valid, m_data`) and backward signal (`s_ready`) must be registered. 0 pipeline stall bubbles.

Synthesis Constraints: Parameterized: `parameter DATA_WIDTH = 8`. Full throughput (1 beat per cycle sustained).

Architectural Deep Dive & Implementation Walkthrough

In long AXI streaming interconnects, backpressure paths (`ready`) create combinational paths spanning across entire chips. A standard register slice cuts forward paths but leaves `ready` combinational. A Skid Buffer cuts BOTH forward and backward timing paths, isolating timing domains while sustaining 100% throughput with 0 bubble cycles.

Common RTL Designer Pitfalls

⚠️ Common Mistakes to Avoid

['Dropping the in-flight data beat when backpressure asserts on the same cycle data was launched.', 'Introducing bubble cycles (idle cycles) after releasing backpressure.']

Silicon & Hardware Engineering Notes

🛠️ ASIC vs FPGA Hardware Considerations

Skid buffers are mandatory pipeline isolation cells placed along chip hierarchy boundaries in modern sub-3nm multi-die chiplet interconnects.

Starter RTL Code

module top_module #(
  parameter DATA_WIDTH = 8
)(
  input                    clk,
  input                    areset_n,
  input                    s_valid,
  output reg               s_ready,
  input   [DATA_WIDTH-1:0] s_data,
  output reg               m_valid,
  input                    m_ready,
  output reg [DATA_WIDTH-1:0] m_data
);

  // Full Skid Buffer breaking both forward and backward timing paths

endmodule

Verified Reference Solution

🔒 Reveal Verified Reference RTL Solution
module top_module #(
  parameter DATA_WIDTH = 8
)(
  input                    clk,
  input                    areset_n,
  input                    s_valid,
  output reg               s_ready,
  input   [DATA_WIDTH-1:0] s_data,
  output reg               m_valid,
  input                    m_ready,
  output reg [DATA_WIDTH-1:0] m_data
);
  reg [DATA_WIDTH-1:0] skid_data;
  reg                  skid_valid;

  always @(posedge clk or negedge areset_n) begin
    if (!areset_n) begin
      s_ready    <= 1'b1;
      m_valid    <= 1'b0;
      m_data     <= {DATA_WIDTH{1'b0}};
      skid_valid <= 1'b0;
      skid_data  <= {DATA_WIDTH{1'b0}};
    end else begin
      if (m_ready) begin
        if (skid_valid) begin
          m_valid    <= 1'b1;
          m_data     <= skid_data;
          skid_valid <= 1'b0;
          s_ready    <= 1'b1;
        end else if (s_valid && s_ready) begin
          m_valid    <= 1'b1;
          m_data     <= s_data;
          s_ready    <= 1'b1;
        end else begin
          m_valid    <= 1'b0;
          s_ready    <= 1'b1;
        end
      end else begin // m_ready is low (downstream stalled)
        if (s_valid && s_ready) begin
          skid_data  <= s_data;
          skid_valid <= 1'b1;
          s_ready    <= 1'b0; // can no longer accept when skid is full
        end
      end
    end
  end
endmodule

Related RTL Problems in Level 3

Frequently Asked Questions

What does Parameterized Register Slice — Pipeline and Backpressure require?

Design a Parameterized Register Slice (Skid Buffer) of width DATA_WIDTH (default 8) that breaks combinational paths in BOTH forward and backward directions with 0 bubble cycles. Implement it as Verilog module top_module matching the listed ports.

Is this design combinational or sequential?

Tags: memory, fifo, protocols, apb, uart, hard, axi-/-streaming. If a clock signal is present in the port table, implement it as sequential logic; otherwise, use continuous assignments or combinational blocks.

How is my solution graded?

A hidden SystemVerilog testbench simulates your module in the cloud judge. You pass when all directed corner cases match the golden model and the VCD timing waveform matches the contract.

How does this challenge help with semiconductor interviews?

Technical interviewers at NVIDIA, Qualcomm, Apple, and Intel routinely ask candidates to code, debug, and explain the timing waveforms of Parameterized Register Slice — Pipeline and Backpressure to assess real-world synthesizability and race-condition awareness.