Round-Robin Arbiter with Priority Override

Qualcomm
Nvidia

Problem Description

Design a 4-requester round-robin arbiter that grants access to exactly one requester per clock cycle. The arbiter maintains an internal pointer that tracks which requester was granted last, and on the next grant cycle it starts scanning from the next requester in circular order. When the priority input is HIGH and req[0] is asserted, requester 0 immediately wins the grant regardless of the round-robin pointer. On reset, the pointer initialises to 0 (scan starts from requester 0), and grant and grant_valid both deassert to 0.

Screenshot 2026-04-26 at 4.59.18 PM

All Scenarios Table:

Scenario

Pointer Before

Winner

grant[3:0]

grant_valid

req=0001, no priority, ptr=0

0

req[0]

0001

YES ✓

req=0110, no priority, ptr=0

0

req[1]

0010

YES ✓

req=0110, no priority, ptr=2

2

req[3]→wrap→req[1]

0010

YES ✓

req=1111, no priority, ptr=1

1

req[2]

0100

YES ✓

req=1111, priority=1, ptr=2

2

req[0] (override)

0001

YES ✓

req=1110, priority=1, ptr=0

0

req[1] (req[0]=0, override inactive)

0010

YES ✓

req=0000, any ptr

unchanged

none

0000

NO ✗

reset=1 asserted mid-grant

0 (cleared)

none

0000

NO ✗


Verilog

Code Editor Access

Log in to write, run and submit your solution to this interview question. It's free.

Output

Output goes here...