RTL Problems / Level 4 · Arbitration & Interconnect
What You Will Learn
By solving Multi-Request Round-Robin Arbiter — Advanced Arbitration, 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 an optimized 4-client Round-Robin Arbiter using the dual-priority-encoder algorithm with masking ($req \& mask$ and $req$) for single-cycle high-frequency timing closure.
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.
Prerequisites: Fixed priority encoders, priority masking, round-robin algorithms.
Port List & Interface Timing
The hidden testbench instantiates top_module. Module port names and bit-widths must match the interface contract exactly:
| Name | Dir | Width | Description |
|---|---|---|---|
clk | input | 1 | Clock signal |
areset_n | input | 1 | Active-low reset |
req | input | 4 | 4-bit request vector |
grant | output | 4 | 4-bit one-hot grant vector |
Timing Constraints & Synthesizable RTL Rules
Timing Contract: Pure single-cycle arbitration logic: grant vector generated combinationally, priority mask updated on `posedge clk`.
Synthesis Constraints: Mutual exclusivity: at most one grant line asserted (`$onehot0(grant)`).
Architectural Deep Dive & Implementation Walkthrough
Common RTL Designer Pitfalls
['Using sequential search loops that create timing bottlenecks on critical paths.', 'Failing to reset the mask when all clients above the last grant have completed.']
Silicon & Hardware Engineering Notes
This dual-arbiter scheme is the universal standard arbiter architecture employed across Cisco/Broadcom network switches and multi-core CPU L3 cache crossbars.
Starter RTL Code
module top_module(
input clk,
input areset_n,
input [3:0] req,
output [3:0] grant
);
// High-performance Dual-Priority-Encoder Round-Robin Arbiter
endmodule
Verified Reference Solution
🔒 Reveal Verified Reference RTL Solution
module top_module(
input clk,
input areset_n,
input [3:0] req,
output [3:0] grant
);
reg [3:0] mask;
wire [3:0] masked_req = req & mask;
wire [3:0] grant_masked;
wire [3:0] grant_unmasked;
// Priority encoder 1: operates on masked requests (above last grant)
assign grant_masked = masked_req & (-masked_req);
// Priority encoder 2: operates on raw requests (wrap around)
assign grant_unmasked = req & (-req);
// Grant logic: prefer masked request; fallback to unmasked if no masked request
assign grant = (|masked_req) ? grant_masked : grant_unmasked;
// Mask update logic: mask out all clients up to and including the current grant
always @(posedge clk or negedge areset_n) begin
if (!areset_n) begin
mask <= 4'b1111;
end else if (|grant) begin
mask <= ~((grant - 1'b1) | grant);
end
end
endmodule
Related RTL Problems in Level 4
- Two-Flop Synchronizer — Single-Bit CDC — Design a 2-flip-flop synchronizer to safely pass a single-bit control signal from an asynchronous source into the destination clock domain clk_dst.
- Pulse Synchronizer — Clock-Domain Crossing — Design a Toggle-based Pulse Synchronizer to transfer a single-cycle pulse from a fast clock domain (clk_src) to a slow destination domain (clk_dst).
- Gray Code Counter — Gray Encoding — Implement a 4-bit Gray code counter that advances by exactly one bit per transition: 0000, 0001, 0011, 0010, 0110, 0111, 0101, 0100...
Connected EcrioniX Learning Resources
Accelerate your VLSI engineering knowledge with these curated learning materials:
Progress through step-by-step verified modules from fundamentals to advanced silicon design.
Benchmark your hardware knowledge across 10 semiconductor domains and receive study roadmaps.
Explore foundational circuit theory, waveform timing, and physical hardware implementation.
Frequently Asked Questions
What does Multi-Request Round-Robin Arbiter — Advanced Arbitration require?
Design an optimized 4-client Round-Robin Arbiter using the dual-priority-encoder algorithm with masking ($req \& mask$ and $req$) for single-cycle high-frequency timing closure. Implement it as Verilog module top_module matching the listed ports.
Is this design combinational or sequential?
Tags: cdc, industry-rtl, arbiters, clock-domain-crossing, hard, advanced-arbiters. 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 Multi-Request Round-Robin Arbiter — Advanced Arbitration to assess real-world synthesizability and race-condition awareness.