DescriptionQ722
Q722DesignMetaASIC interview problem
Four-requester round-robin arbiter
TechniquesDesignSystemVerilogArbiterRound robin
DifficultyMedium
TopicRTL Design
LanguageSystemVerilog
Requirements4 checkpoints
01
Problem
Four clients share a one-cycle service slot. Design a synthesizable combinational round-robin grant and sequential priority pointer with deterministic reset and idle behavior.
Starting declarationSystemVerilog
input logic clk, rst_n;
input logic [3:0] req;
output logic [3:0] grant;Example input and output
Use this case to check your interpretationInput
After reset, req=4'b0101 for two cyclesOutput
First grant=0001; next grant=0100Explanation
The pointer starts at requester 0 and then advances to requester 1 after the first grant.
02
Requirements (4)
- grant is combinational, one-hot-or-zero, and selects the first asserted requester encountered from the current priority pointer with wraparound.
- On a rising edge with a nonzero grant, move the pointer to the requester immediately after the granted one.
- If req is zero, drive grant zero and leave the pointer unchanged.
- Whenever rst_n is 0, drive grant=0; on a rising edge with rst_n=0, set requester 0 as the first priority.
